I am getting some weird behaviour when trying to create menues in MB, when
menu items call an OLE callback. It's as if the compiler isn't correctly
detecting the end of the menuitem clause, and tries to read the proceeding
code as part of the menu item definition. But only when creating an OLE menu
item.

It means the OLE menu item has to be the last item in the menu, and you have
to follow the Create Menu statement with another Create Menu statement
otherwise it thinks the next command is part of the menuitem clause.

I have included two tiny code samples which demonstrate the problem below.

Anyone come across this, or even better found a workaround or fix? Any help
would be greatly appreciated.

Cheers
Mark O.


The following samples will not compile:
'*************
'Example 1
declare sub main
sub main

Create menu "bug_menu" as
        "item1" calling OLE "ue_callback",
        "item2" calling OLE "ue_callback"

end sub 'main
'Compiler error: "Unrecognised command: ,."
'*************
 '*******************
'example 2
declare sub main
sub main

Create menu "bug_menu" as
        "item1" calling OLE "ue_callback"
alter menu "bug_menu" add "item3" calling OLE "ue_callback"

end sub 'main
'Compiler error: "Unrecognised command: end."
'***************
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to