Popup menu

Marty Knapp martyknapp at comcast.net
Thu Jan 5 03:08:04 EST 2006


Ken Ray wrote:

>On 1/4/06 10:32 PM, "Marty Knapp" <martyknapp at comcast.net> wrote:
>
>  
>
>>I have a mouseDown script in a field that pops up a menu from a hidden
>>button. It works fine on my Mac, but not my PC - any clues?
>>    
>>
>
>Well, can you post the script so we can see what's going on?
>  
>
That would be helpful wouldn't it . . .  (sorry, I was rushing out the door)
The object is to have a popup menu to save the tabstops & header button 
rect to a preference file. So from my Mac I save a Mac & PC standalone. 
The Popup works on the Mac, but with the PC version it just pops the 
menu up, but won't run the menuPick handler. However, if I save it as a 
standalone on my PC it works. (I have Rev 2.2.1)

script in the field:

on mouseDown which
  if which is 3 then popup btn "saveTabstops"
end mouseDown

script in the hidden button:

on menuPick which
  if which is empty then exit to top
  put stackPath() & "Preferences.txt" into thePath
  if there is a file thePath then
    get URL "file:" & thePath
  else get empty
 
  repeat with x=1 to 7
    put the rect of btn x of group "Header1" into line x of it
  end repeat
  put the tabStops of fld "Main" into line 8 of it
 
  put it into URL ("file:" & thePath)
end menuPick


Thanks for any help,
Marty Knapp



More information about the use-livecode mailing list