Getting Started Help

Why am I getting this error?
Me.AddRow “2”
This is behind the Open event for a PopUp Menu

Any help is appreciated. Thanks!

This is not an Error message.

This only add a new Row and fill it with a 2 (the number character).

What do you want to do ?

If you want effective help then you need to

  • specify which system you are running (like Win7, MacOS X Sierra)
  • specify which Xojo version you are using
  • the error you are getting (we are not clairvoyant)

The code you posted should work fine. Though it does look like you are using curly quotes.

Try copy/paste with this

me.AddRow(“2”)

and see if it makes a difference.

The documentation PopupMenu example explain how to populate it.

I just fired 2018r1, load a current project (yes, this takes time), add a PopupMenu, Add the Open Event to it and copy/Paste the code of the first example from theLR, then Run:

I get April as the default PopupMenu value.

No error message.

Please, answer Markus question to get help.

Edit: I forgot: I use El Capitan on a MacBok Pro 13".

Yes, your problem are the curly quotes. You can already see this in the code as “2” is shown in black and not like “2” in purple, so it is not a string.

Hello,
some time ago I wrote some mySQL queries and always got error messages. It turned out that macOS automatically replaced the quotes I typed with other types of quotes. If you have this problem got to System Preferences -> Keyboard. Select the „Text“ tab and deselect the „Use smart quotes and dashes“ option.