Hi Michael,

You did post this last week and I responded with my theory on the problem.
Here it is again... :-)

I haven't tested this, but it sounds as if the selection is being set AFTER
the menuPick event.

Try just using the parameter passed to menuPick - that will give you the
name of the selected menuItem and you could use lineOffset to find the line
number.

Alternatively, try reading the menuHistory. I have only used this for
setting a popup, but it deals with line numbers rather than text. I haven't
tested it, but it may get set earlier than the selectedLine.

Cheers,
Sarah


> I thought that I reported this last week and have been waiting for a
> response, but now that I look back through the digests, I can't find
> my post. So here it is, or here it is again!
> 
> Rev 1.1.1 beta 1 iBook OS 9.2 and also PowerBook 3400 OS 8.6.
> 
> Make a new mainstack.
> Use the menu manager to make a new menubar, and a new menu with two items.
> Put this script into that menu (menu 4 in this test):
> 
> on menuPick pWhich
> put the selectedLine of button "menu 4" &","&& pWhich
> end menuPick
> 
> Check the "Set as menu bar on ac OS" box.
> Close the menu manager.
> 
> Select the first menu item. The message is "line 1 of button 2, Item
> 1". OK so far, but now select item 2 of the menu and the message is
> "line 1 of button 2, Item 2": not what I expected. Select item 2
> again and this time it gives "line 2 of button 2, Item 2". That seems
> to be wrong behavior. If it is correct behavior then the next bit
> must be wrong:
> 
> Uncheck the "Set as menu bar on ac OS" box.
> 
> Now selecting the menu items gives the behavior that I expected:
> Select the first menu item. The message is "line 1 of button 2, Item
> 1". Select item 2 of the menu and the message is "line 2 of button 2,
> Item 2". Select item 2 again and this time it gives "line 2 of button
> 2, Item 2".
> 
> One of these behaviors looks like a bug to me.
> 
> -- 
> Michael J. Lew
> 
> Senior Lecturer
> Department of Pharmacology
> The University of Melbourne
> Parkville 3010
> Victoria
> Australia
> 
> Phone +613 8344 8304
> 
> **
> New email address: [EMAIL PROTECTED]
> **
> _______________________________________________
> improve-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/improve-revolution
> 

_______________________________________________
improve-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/improve-revolution

Reply via email to