Why This Change?

Ken Ray kray at sonsothunder.com
Wed May 19 12:45:29 EDT 2004


I was just debugging the IDE because the Edit menu of *my* application was
getting a menu item from the MC IDE, so I was sure something was up. I
compared the last released IDE with the new one, and found this change in
the frontScript put into place by mctools.mc:

-- Old IDE
on selectedObjectChanged
  :
  :
  if the menubar is empty
  then send "mouseDown" to group "MetaCard Menu Bar" of stack "MetaCard Menu
Bar"
end selectedObjectChanged

-- New IDE
on selectedObjectChanged
  :
  :
  if the menubar is empty and "MetaCard Menu bar" is not in the
pendingmessages then
    send "mouseDown" to group "MetaCard Menu Bar" of stack "MetaCard Menu
Bar" in 100 millisecs
  end if
end selectedObjectChanged

What's happening is that this delay of 100 millisecs is enough time to
switch back to my menus, at which point the mousedown handler in the group
"MetaCard menu bar" attempts to set up the Edit and Text menus. In *that*
handler it then tries to set the default menubar to the MetaCard Menu Bar
before updating the Edit and Text menus, but for some reason the delay
causes my menus to be put into place and so I get menu items added to *my*
menubar.

I'm sure there was a good reason for this, but in the meantime, I'm setting
this handler back to the way it was in the old IDE. Any ideas why this
change was made?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the metacard mailing list