hypercard domenu comptability

Richard Gaskin ambassador at fourthworld.com
Fri May 20 12:28:00 EDT 2005


Eric Engle wrote:
> Something about metacard that really bothers me... domenu... domenu in
> hypercard is really important and convenient.
> 
> problem is: the menus in metacard don't match.
...
> This is an avoidable and easily solved problem. It could even be solved open
> source. If rev or metacard promises to incorporate the hidden button with
> missing menu items I would do it open  source as a fun project. So it could
> even be solved at no cost (presuming my scripting is up to scratch).
> 
> What do people think? I know the invisible button would not solve syntax like
> do menu item 3 of menu 2 (or similar)
> but I never used that syntax - and the syntax example i just gave could well be
> buggy
>  - I always wrote 
> doMenu "cut picture"
> which would work using an extra invisible menu button with the missing commands
> exactly as appearing in hypercard (and if someone else would supply missing
> supercard buttons we could cover that too).
> 
> What do you think?

For doMenu the docs say:

    The doMenu command is not implemented for all menu items.
    This command is included in Transcript for compatibility
    with imported HyperCard stacks.

This implies that only menus common between HC and MC are supported.  I 
verified this by trying this in the Message Box:

    domenu "create card"

...and got this result:

    doMenu "create card" not implemented

So while I agree it might be handy to come up with a generic solution, 
doMenu appears to be hard-wired for a very specific and limited use.

Even if it did work, there should be no need for making invisible 
objects -- we could simply trap doMenu in the stack and handle it from 
there.

But one of the reasons MC is so darn fast is that it doesn't allow the 
overriding of built-in commands and functions (it cuts the token search 
space down dramatically).  Fortunately, for the few cases where that 
might be useful it isn't hard to work around it:

For example, you could write a menuPick handler at the stack level and 
move your doMenu stuff there.  That way you could handle visible menu 
items there and also makes calls to it from other scripts by writing:

   menuPick "Menu Item Name"

...rather than HC's:

   doMenu "Menu Item Name"


-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


More information about the metacard mailing list