Path: utzoo!attcan!uunet!cs.utexas.edu!hellgate.utah.edu!cc.utah.edu!kofoid From: KOFOID@cc.utah.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Drawing _on_top_of_ HyperCard's window Message-ID: <49699@cc.utah.edu> Date: 9 Mar 90 17:26:39 GMT Lines: 52 Greg -- About your "evil note": funny you should mention... I've been writing a stack which I want to look as much as possible like an application running under the standard Mac GUI. I'm doing it partly out of curiosity, partly as the people it's written for know zilch about HyperCard and don't want to. They want a tool that behaves like the average Mac program (requiring no manual reading) that works yesterday. What I've found is that the entire menu bar can be completely redefined from an XCMD. You can use all menu items, as long as you kill the normal HC event loop with the stack scripts on doMenu theItem end doMenu on choose myTool end choose You use the menus from an idle handler at stack level running a second XCMD which screens menu events. This is all relatively easy. I will post the code as soon as it is debugged sufficiently. Please do your own experiments, however, as I'm working in a vacuum and you may find much better ways to do this. Please keep in touch. If you just want to add a couple of items to existing menus, make sure they are added to the end of the item list. You can trap them with the appropriate statements in an "on doMenu" handler. Things will get mysterious if you try to upset the order of things in the normal list. Apparently, HC deals with its intrinsic menu items only through the item number, and doesn't look at the menu definition itself. I'm sure this makes the code more compact and efficient. If you rename "Copy Card..." to "FooBar", for instance, you will not be able to use "FooBar" in the handler, as HC will stubbornly insist on sending the "Copy Card..." command. Things get even stickier if you do item *insertions*. You can actually end up sending the disabled gray-line separator as a parameter to doMenu. If you decide to redefine the menu bar, do it with an MBAR resource. This is faster, saves memory, and is very convenient, as you can define several of them and swap them about quickly. In the meantime, I'll try to finish up my little project and post it ASAP. By the way, the groans you hear in the background are voices of HyperCardists thirsting for my blood. This advice is heresy and I expect the Apple cops to take away my Mac any day now. Good luck and cheers, Eric.