Script Editor menus

Tariel Gogoberidze tariel at mac.com
Thu Apr 27 15:20:06 CDT 2006


On Apr 2006 00:53:19 -0500, J. Landman Gay" wrote:

> And while we're on the subject, has anyone figured out a way to get out
> of the "sticky" menus bug, where the script editor menus won't stop
> popping down no matter where you click? I always have to force-quit 
> when
> that happens. I don't know why it happens in MC and not in Rev, but
> maybe moving the script editor menus to the OS menu bar would help 
> after
> all.

Long ago I had the similar "sticky" menu problem in script editor and 
since this time I'm applying fix   "automatically" on each new release 
of MC IDE, so I don't even know if it is currently fixed in latest IDE 
or not.

Symptoms:

In script editor, if you click on "Edit" menu and having mouse pointer
inside "Edit" (so that "Edit" menu is still pulled down" ) move mouse
pointer to "Go" menu -- the "Go" menu will pull down and since that you
are "stick" with it. No matter where you click thereafter  it pulls
down "Go" menu and the only way to get rid of it is to quit MC.

Solution:

Check if borderWidth = 0  and showBorder = true in "Go" button of 
script editor, and if yes, apply the following script that would fix it

on mouseUp
    repeat with i = 1 to 10
      put "Script Editor "&i into tEditor
      if there is a stack tEditor then
        delete stack tEditor
      end if
    end repeat
    set the borderwidth of button "Go" of card 1 of stack "script 
editor" to 2
    set the showBorder of button "Go" of card 1 of stack "script editor" 
to false
    save stack "script editor"
end mouseUp

Speaking about menus, there is another fix I apply automatically and 
again, not sure if it is fixed in latest IDE or not. The bug was 
discovered by Klaus Major (post  14 Jul 2004)

  > Sometimes my custom menus (especially the EDIT) are messed up
  > somehow  with the MC Edit menu...

The solution that worked for me is the slightly modified version of
solution posted later by Klaus (his exact solution would not work under
some conditions)

------------
In the script of grp "MetaCard Menu Bar" of cd 1 of stack "MetaCard
Menu Bar"

on setupedit
    local otype
    put word 1 to 2 of the selobjs into otype
    if word 1 of otype is "card" and word 2 of otype is among the items
of "field,button,image,player,scrollbar,graphic"
    then delete word 1 of otype
    else delete word 2 of otype
    if otype is empty or otype is "card" or otype is "stack"
    then put "(&Group/G" into line 9 of btn "Edit" of grp "MetaCard Menu
Bar" of cd 1 of stack "MetaCard Menu Bar"
    else
      if word 1 of the selobjs is "group" and the number of lines in (the
selobjs) is 1
      then put "Un&group/G" into line 9 of btn "Edit" of grp "MetaCard
Menu Bar" of cd 1 of stack "MetaCard Menu Bar"
      else put "&Group/G" into line 9 of btn "Edit" of grp "MetaCard Menu
Bar" of cd 1 of stack "MetaCard Menu Bar"
    end if
    if the editBackground of the topStack
    then put "Stop Editing &BG/T" into line 10 of btn "Edit" of grp
"MetaCard Menu Bar" of cd 1 of stack "MetaCard Menu Bar"
    else put "&Backgrounds.../T" into line 10 of btn "Edit" of grp
"MetaCard Menu Bar" of cd 1 of stack "MetaCard Menu Bar"
end setupedit
-------------

best regards
Tariel




>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com



More information about the metacard mailing list