Path: utzoo!mnetor!uunet!husc6!cmcl2!beta!hc!ames!oliveb!amiga!jimm From: jimm@amiga.UUCP (Jim Mackraz) Newsgroups: comp.sys.amiga.tech Subject: Re: String gadgets Message-ID: <2035@amiga.UUCP> Date: 13 Apr 88 20:35:05 GMT References: <239@gtss.UUCP> Reply-To: jimm@amiga.UUCP (Jim Mackraz) Organization: Commodore-Amiga Inc., 16795 Lark Ave. Suite 106, Los Gatos CA 95030 Lines: 53 Keywords: string gadget intuition de-selection In article <239@gtss.UUCP> chas@gtss.UUCP (Charles Cleveland) writes: )String gadgets are de-selected by pressing return or clicking the mouse )elsewhere. We can tell the system knows in both cases that the gadget )is de-selected because the cursor in it disappears. If my string gadget )has RELVERIFY set I get a GADGETUP event when I deactivate the sucker by )pressing return, but not when I click the mouse elsewhere. Well known problem. People have posted ways that this can be handled by little checks scattered about your event processing loop (when you think the gadget is active, and you get a message that indicates the contrary (or the SELECTED flag is cleared), you process the routine you want to do upon gadget termination). ) )Is there some reason for this? Is there SOME combination of flags that )will get Intuition to send me some (not necessarily GADGETUP, though )that would be nice) event when a string gadget is de-selected by mouse- )click? Reason? I think the intention was that the user would only hit return if he was SURE and wanted action right now, similar in Zen to the RELVERIFY Boolean gadget, but that doesn't fly too well. It's not clear how far we can go in fixing this: many file requesters take action when they hear about that RETURN, and sending them ENDGADGET when the user isn't really done would be a problem. We probably should have used the Code field of the message to tell the termination condition. I fear that we can't fix programs in the field automagically on this one. We will certainly provide a method for future programs to handle this, it's too bad we can't do more, now. You basically have to listen to almost every other message class, and there are still some edge cases (like window dragging) when you still won't hear. Poll that SELECTED flag (on INTUITICKS, for example). )Oh, and yes I know that string gadgets are broken. I just don't think )I know all the ways they are broken yet. Anybody have a canonical list? All I can do is fix 'em. Harriet Tolly's articles in Amazing Computing had a lot of stuff *I* didn't know (and *I* broke 'em in the second place). )-Life would be so much easier if we could just look at the source code.- In this case, I don't think so. You might have just sold your Amiga. Anyway, it's been rewritten for V1.4 (this week) although that won't help you much for a while. But gee, it sure is great in the lab ;&) )Charles Cleveland Georgia Tech School of Physics Atlanta, GA 30332 sorry charlie. jimm I and I -- Jim Mackraz, I and I Computing amiga!jimm BIX:jmackraz Opinions are my own. Comments regarding the Amiga operating system, and all others, are NOT to be taken as Commodore official policy.