America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, June 9, 1992 10:00 p.m. Eastern Time Topic: Toolbox Programming Forum Leader: Gary Jacobson (AFL GaryJ) AFL GaryJ Welcome to the Apple II Development Forum! AFL GaryJ Tonight's topic is Apple IIGS Toolbox Programming! AFL GaryJ We'll now open things up to your questions and comments. Let's dispense with AFL GaryJ protocol for the time being (I reserve the right to enact it at a moments notice, AFL GaryJ however :) Sheppy :) AFL GaryJ Does anyone have a question or comment they'd like to start off with this AFL GaryJ evening? AFL GaryJ Is everyone up to speed on all the new toolbox calls with System 6? Sheppy I'm up to about 40 MPH so far... :) AFA Andy Gary, I'm still trying to learn the old stuff. :D AFL Marty Got a flyer in the mail today from ByteWorks.. AFL Marty they're offering a toolbox programming course. AFL Marty 50 bucks if you already have the Pascal compiler AFL GaryJ Is this a correspondence course, or is this the thing they (Byteworks) were AFL GaryJ trying to offer online here? AFL Marty It looks like a correspondence thing. AFA Andy Marty, it's like the Learn to Program Tutoiral for C and Pascal. AFL Marty 400 pages of documentation, notebook, inserts, 4 disks of source. AFL GaryJ I haven't received that announcement yet. I do know that Mike tried AFL GaryJ to offer that particular course online (it sounds like the same course, anyway) AFL Marty You're probably right. AFA Andy When he first started talking about this he was gonna do it both ways. Has the AFA Andy online course been dropped? AFC SteveB Believe I read that in the Byteworks area. AFL GaryJ I think the toolbox oriented course was dropped due to lack of sign-ups. AFL GaryJ (The online course) AFA Andy :( I thought he had found enough sign ups. AFC DYAJim I thought he was still going on with it because of all the questions AFC DYAJim he has been asking. AFL GaryJ I think he's gearing up for a Pascal class, however. But I need to talk to him. AFL Marty At any rate, $50 for the course is a good price. AFL GaryJ Programmer U is getting ready to start the IIGS specific Pascal course too. AFL GaryJ I appreciate you bringing it up, Marty (as it applies to tonight's topic) AFL GaryJ The IIGS Pascal class being offered a Programmer U will concentrate on AFL GaryJ toolbox programming, and there is no charge other than the normal online AFL GaryJ connect charges. AFL GaryJ I bought the "Learn to Program in C" course from him a few years ago, and AFL GaryJ I thought it was worthwhile. AFA Andy That's what I'm working through now, Gary. AFL GaryJ I was starting to mention the IIGS Pascal class.... the details are still being worked out, AFL GaryJ but it is tentatively scheduled to start on July 13th, with an open house on AFL GaryJ July 6th. Matt DTS Who's teaching it? AFL GaryJ The teacher will be Jim Merritt (Presbyte) Sheppy Oooooh, cool!! Matt DTS Cool! AFL GaryJ He's put together an EXCELLENT course schedule. AFL GaryJ The course will assume that you have some previous experience with Pascal, but not necessarily AFL GaryJ on the IIGS. AFL GaryJ The course is designed to be a follow-up to the generic (non-machine specific) AFL GaryJ Pascal class that completed last month. AFL GaryJ (Which was for beginning Pascal) AFL GaryJ I'm bringing this up here because the class WILL be oriented to the IIGS toolbox and features. AFL GaryJ Look for details on this class soon. We'll be posting them as AFL GaryJ soon as we solidify them :) AFA Brian Those will be posted before 6:00 PM Eastern tommorow in the Programmer U area :) AFA Brian You can even start signing up for the class at that time :) AFL GaryJ Does anyone have a toolbox question they'd like to ask this evening? AFC DYAJim Is there any way to display an equiv for an NDA? AFC DYAJim (An equiv that you'd handle with systemSaysMenuKey) Matt DTS A what? Sheppy Key equivalent? AFC DYAJim a keyboard equivalent for an nda Sheppy Can't you attach them to the controls? AFC DYAJim You can't put it in the title string, because then it would override the AFC DYAJim bottom program (and wouldn't use systemSaysMenuKey) AFC DYAJim Just to display the little apple and char. AFA Andy SuperInfo has one, doesn't it? AFC DYAJim Say I want my NDA to have equivs of "T" and "t", and I track these equivalents Matt DTS There's no real way to do this, no. Sorry. AFC DYAJim oh, ok.. that's all I was wondering.. Sheppy Especially not if you're going to use letters like "T", since they're used Sheppy a lot. AFC SteveB Does Control-Command-W have any signifigance to the Finder? AFC SteveB I've been told it does, but it doesn't seem to. Matt DTS Sure it does. Matt DTS Command-W is "close", and Control means "reverse the preferences setting for this", so... Matt DTS ...Control-Command-W makes the Finder close all windows and save/not save your Finder.Data files Matt DTS (it does the opposite of whatever your preferences are). Not easily visible, but significant. GA. AFC SteveB How come it's sent as a menuKey that the Finder didn't want AFC SteveB to handle? Sheppy I thought it was supposed to close w/o saving the Finder's data files, but... Sheppy it never works. Sheppy (The key is ignored entirely-- does nothing) AFC SteveB Right -- The MM sees the key hit as CONTROL-W, -not- W or w) AFC DYAJim ahh AFC DYAJim open apple-`control-w` Matt DTS Hmm. Well, it's supposed to do what I said. It works if you hit the close box. :( Sheppy I try it now and then with no luck at all, wind up having to click close box. Sheppy :(... GA. Matt DTS I can't get it to work either. Someone Email Dave and complain. :) AFC SteveB 'Cause currently I have it wired for my "Close all except front window" AFC SteveB FinderExtention...anyone got a suggestion for a better AFC SteveB key sequence? :) AFL Marty command-K? Matt DTS I have an even better suggestion -- don't hard-wire key equivalents, like the documentation says. :) AFC SteveB So I should have a preferences window someplace asking the user AFC SteveB to select the key equivalent? :) Matt DTS That's a good way to do it. Sheppy Sounds like a good idea to me -- there are already so many FE's that... Sheppy there'd be all kinds o' trouble... Matt DTS Speaking of Finder bugs... Matt DTS (I'll bet Andy's looking over his shoulder, too...) AFC SteveB Hey Dave, got a bug for you. :) Sheppy Hi, Dave... you picked a bad time to show up... :) Dave Lyons Okay, hit me.... AFC SteveB Command-Control-W doesn't close all windows while reversing... AFC SteveB The "Save Finder preference" option. :) (MM is seeing Command-'Control-W') Dave Lyons You mean Command-OPTION-Control-W, no? Command-Control-W ought to close 1 window. Dave Lyons Anyway, noted. AFC SteveB Command-Control-W does nothing, and is brodcast as a key that AFC SteveB wasn't handled by the Finder. Sheppy Apple-Control-W doesn't work; I dunno about the Option added... AFL GaryJ Jim Merritt's course description will be posted tomorrow in Programmer U, but AFL GaryJ here's a sneak preview: "The class will examine Pascal topics, good software AFL GaryJ engineering habits, and specific details on how to write applications software that AFL GaryJ takes full advantage of the Apple IIGS operating system and toolbox". AFL GaryJ I think I may take this class too :) AFL GaryJ Jim will be a good teacher. WinkieJim I've already found my work around, but anyone know why when an NDA get's it's WinkieJim Init routine called it's menu id is not set in the menu line in it's header? Matt DTS ! Because I hate the Desk Manager, that's why. Dave Lyons Because the menu IDs are not determined until FixAppleMenu time, when they get added to Dave Lyons the Apple menu. Dave Lyons It's supposed to work that way...might even be documented that way (I hope). In technote & 6.0 Dave Lyons docs. ga WinkieJim Yea, had to put a Heartbeat task in to add an icon to my NDA's menu entry WinkieJim (my first sys 6.0 programming task :) Matt DTS No you don't... Matt DTS ...just listen for request "systemSaysFixedAppleMenu" and do it then. WinkieJim Ya, well I don't have my request procedure in yet. will change to it when I get WinkieJim to that point... Matt DTS Just do it soon. :) It's not hard. Dave Lyons If you use a heartbeat, you need to check the BUSY flag & conditionally use the schedulre--otherwise Dave Lyons making a Menu Manager call is unsafe. WinkieJim Well, it looks neat anyway...you guys should have had the CP add an icon :) MikeF32 Hey, does anyone here remember the Program Launcher "RunQ"? AFA Jay Hey, I still have it laying around somewhere :) AFL GaryJ Yes (I remember it) MikeF32 Well, it's not too keen w/ system 6, but I liked it... WinkieJim I used TransProg instead...until 6.0 came out...:( MikeF32 So, to get to the point: is there any clean way for an INIT to read the MikeF32 mouse inside a desktop app? Matt DTS Sure. MikeF32 Don't Say "ReadMouse2" matt Matt DTS If EMStatus=True then GetNextEvent(eventMask == noEvents). Matt DTS GNE fills in the mouse position, modifiers and tick count without taking anything from the event queue Dave Lyons Mike, it depends *when* you need to read the mouse. Dave Lyons What Matt sez works fine as long as you're *not* at interrupt time. Dave Lyons If you need to do it at interrupt time there's no clean way. MikeF32 Yeah, true: I'll explain then MikeF32 I want to pop up a menu when the mouse is down, and some modifiers MikeF32 And I need to find this out at /any/ time that happens MikeF32 ReadMouse2 at RunQ time doesn't help, because RunQ tasks (of course) MikeF32 don't get run when the Finder is tracking a drag rect Matt DTS Wait...you want someone who presses your modifiers in the middle of a DragRect to get your pop-up? Matt DTS That's bizarre. AFC DYAJim (I just use ReadMouse and take my chances from a heartbeat :) Dave Lyons Jim, I gave that approach up for my screen dimmer after it started trashing screen memory. Dave Lyons (I don't recommend it.) MikeF32 Matt, have you ever seen RunQ? Matt DTS Nope. It crashed on my system. MikeF32 Ahh... Ok, what it does is pop up a menu when you hold down the mouse w/ MikeF32 certain modifiers down... Matt DTS Oh. You have a misunderstanding about how such things need to work. Matt DTS You're trying to _notice_ the mouse-down and act on it. You don't want to do that. Matt DTS You want to _intercept_ it -- see it, act on it and never let the application see it. MikeF32 Yeah MikeF32 Tool patch? MikeF32 (watching Matt reach for scissors) Matt DTS You'll have to patch something to keep the application from seeing it. It's a toss-up as to Matt DTS what to patch, though. Matt DTS You can't do it on GetNextEvent without tail-patching, which is evil... MikeF32 I know..I was reading about the evils of Tail Patching MikeF32 And I'd rather /not/ patch the event manager... Dave Lyons (Yes, tail patching GetNextEvent specifically would mess up some stuff in the system in 6.0.) Matt DTS ...and no other tool call patch will get it every time. Any ideas, Dave? Dave Lyons PostEvent? AFC DYAJim So far I have had no problems calling ReadMouse every 10 vbls. MikeF32 Doesn't work Jim, that's what I do now :-) Matt DTS Jim: Do _not_ call ReadMouse from interrupts. You can steal mouse movement from the Event Manager. Matt DTS He can do PostEvent, but then he'll notice it when it happens and not when it's read. AFC DYAJim But it doesn't steal anything - it stopped stealing things when I went from AFC DYAJim calling it every 5vbls to every 10. MikeF32 Does the Event Manager call ReadMouse2?] Dave Lyons Jim, my problem was when my heartbeat task called GNE & a foreground GNE was already in progress-- Matt DTS (Like what if someone presses the mouse button while in a CDA, for example.) Dave Lyons sometimes it would mix the high word of an event record pointer with the low word of a -different- Dave Lyons event record pointer. This is probably happening to you even if it isn't obvious. Does your Dave Lyons system ever crash?? AFC DYAJim The only thing that I think is affected by my using ReadMouse every 10 vbls AFC DYAJim from a heartbeat is that closeview crashes immediately when you turn on its AFC DYAJim black follow frame (even with no magnification)