Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!usc!oxy!sonenbli From: sonenbli@oxy.edu (Andrew D. Sonenblick) Newsgroups: comp.sys.mac.programmer Subject: Why do Managers fail when called from code resources? Message-ID: <52218@tiger.oxy.edu> Date: 6 Oct 89 17:09:47 GMT Distribution: usa Organization: Occidental College, Los Angeles, CA 90041 Lines: 40 Ok, I posted the preliminary problem yesterday (and thanks to all those millions of subscribers who replied to it.... sorry, please excuse my sarcasm but this problems has induced premature hair loss, teeth grinding, and general self-disfiguring practices.) The problem began with MenuManager calls from code resources (which are locked, detached, unpurgable and in the system zone). Some would seem to work (such as GetMHandle) and others wouldn't (such as when I used the MenuHandle from said GetMHandle call to InsMenuItem( ... ) with the result that a garbage string was *appended* to the *worong* menu.) Now, I find that other Managers also fail to operate properly. If my code resources put up a window the WindowMgr seems to whimsically decide whether to put up the window or not! Dialogs don't works properly, either. Any time I use Pascal Str255 (I'm using LSC) such as in the call DrawString(&myString) I get nothing (the big null, nil, void) or garbage! Now you can understand my frustrations---the Frigging ToolBox is not operating as it expected to! I cannot rely on it when calling from a code resource (How am I to trust that my "outline" for making an INIT, a patch, etc will not end with me spending hours coding only to have the managers fail and ruin my programming life.) Anyway, I appreciate everyone for letting me vent my $(%#@! If Anyone has aaaannnyyy ideas what the heck is going on, please reply (to me is fine, perhaps to the net to appraise everyone else of the problem/solution is better.) But if you have any insight, please respond and save a fellow Mac enthusiast/programmer from premature senility! Thanks again, Ando Sonenblick. My address is: sonenbli@oxy.edu -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ What ever happened to the good ole days when we were all dinosaurs and would wallow around eating... Ok, so half the time we ate each other, but other than THAT, did you have any complaints? -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_