Another Gotcha

Bob Sneidar bobs at
Thu Dec 29 17:23:26 EST 2011

Hi all. 

I have been using a trick John Craig showed me for appending to a contextual menu which has been very handy for me. The gotcha is that instead of building the menu on the fly using "put theMenuItem into line 1 of theMenu" (or something like that) I decided to simply create a custom property with the additional menu items I wanted, and then put that property before pMenu in the revHookBuildObjectEditorContextMenu handler in my front script. And of course, I used carriage returns. 

It seems that if pMenu contains carriage returns, it will disable contextual menu items after the first time you call dispatchContextMenuPick with the new menu options. Apparently Menus can only have line feeds. Seems someone should add "replace cr with lf in pMenu" somewhere in the dispatchContextMenuPick handler. 

Just an FYI. 


More information about the Use-livecode mailing list