CompuServe Thread

#Modula-2 Oxxi Gadgets

11 messages in this thread
#84786From: Jim VogelSep 13, 1987 9:27 AM
Steve, I am having some problems getting some gadgets to work the way I want to, and wondered if you might have any suggestions. I have 3 Boolean text gadget's, in a requester; I would like to select one, and have that deselect the other two. Since MutualExclusion is not working for gadget's yet, I have had to come up with some cludge's. First I tried OffGadget on all three, selecting and deselecting, then OnGadget, and RefreshGList. While this made the gadget's blink quite nicely, it didn't do what I wanted to! Now I EndRequest, select and deselect, and then Request, which works OK, except that the request blinks once, which does not look good. Here's the code that I finally came up with… PROCEDURE SwitchSel(gp1,gp2,gp3:GadgetPtr); BEGIN EndRequest(rp^,wp^); IF NOT (Selected IN gp1^.Flags) THEN INCL(gp1^.Flags,Selected); END; IF (Selected IN gp2^.Flags) THEN EXCL(gp2^.Flags,Selected); END; IF (Selected IN gp3^.Flags) THEN EXCL(gp3^.Flags,Selected); END; DC := Request(rp^,wp^); END SwitchSel; … any suggestion's? Thanks, Jim Vogel
#84794From: Pat Cummings, OXXISep 13, 1987 12:19 PM
Hi Jim: I realise your message was for Steve but I thought I might be able to help. The proper way to disable/enable gadgets is with OnGadget()/OffGadget() and it really works, I checked. However, here is the problem the text is rendered again when you issue a call to OnGadget() but the ghost pattern is still their and is not erased. If you try OnGadget()/OffGadget() with an Image based gadget you will notice it works just fine, because the whole image is redrawn. In order to work properly you have to clear the rectangle where the text gadget is located and then do a call to OnGadget(). I hope that helps. >> Leon <<
#84829From: Jim VogelSep 13, 1987 5:57 PM
Leon, Your help is allways appreciated! I had known about that about image gadget's but find that text gadgets are less work. when you say clear the rectangle, what do you mean? It would look a lot a lot better that way. Also, is there going to be any improvment's in the editor from Oxxi? I would like to see three things added; 1. Allow the keypad keys to work like an IBM keypad, with home, end, page up, ect. 2. Allow the mouse to work like a cut and paste(like textcraft) and highlight as you mark. 3. Allow programing of the keys for often used words, like PROCEDURE, MODULE BEGIN, END, ECT.; somewhat like what is available in UEDIT, and turbo Pascal. Thanks, Jim Vogel
#84838From: Pat Cummings, OXXISep 13, 1987 7:09 PM
Jim: I am always glad to help. Here is a piece of code which I experimented with for doing mutual exclude gadgets: IF (gad = GadOne) THEN WITH GadTwo^ DO SetAPen(rp^, 0); RectFill(rp^, LeftEdge, TopEdge, LeftEdge+Width, TopEdge+Width); END; OnGadget(GadTwo^, win^, NIL); OffGadget(GadOne, win^, NIL); ELSIF (gad = GadTwo) THEN WITH GadOne^ DO SetAPen(rp^, 0); RectFill(rp^, LeftEdge, TopEdge, LeftEdge+Width, TopEdge+Height); END; OnGadgetd(GadOne^, win^, NIL); OffGadget(GadTwo^, win^, NIL); END; Corrections: first RectFill() should have TopEdge+Height. NOTE: The order of the calls to OneGadget()/OffGadget() is important OnGadget() must be called right after calling RectFill()! The EMACS editor included with Benchmark Modula-2 has been improved significantly from the first release and will continue to be improved. Thank you for your suggestions. >> Leon <<
#84859From: Jim VogelSep 13, 1987 9:41 PM
Leon, Thanks for the hint, will see how that will fit into my program. I think I see what you mean; I had never used rectangle fill before, so didn't know about it. Hope I didn't seem like I was bitching, I really like BenchMark; It's great by itself, but compared to the TDI it SUPERGREAT!! Wish I had seen it before I upgraded to their commercial, what a waste. The only other thing is the they had good customer concern in the begining, but seemed to lose it(don't know why). Hope that that doesnot happen to Oxxi, I have had a good response every time I've delt with them. Thanks for listening, Jim Vogel
#84862From: Erv ThompsonSep 13, 1987 9:58 PM
Are any of you like me, i.e. looking in the mail wondering if TDI is going to send me anything. Even a notice of discontinuance of their support for the Amiga Modula-2 compiler. Me thinks that their correspondence with the boys in England is handled by sea going vehicles. Maybe that's where Joyce came up with the name for his book!
#84929From: Jim VogelSep 14, 1987 3:18 PM
Erv, I quit looking as soon as I bought Oxxi!!! Jim V.
#84860From: Erv ThompsonSep 13, 1987 9:51 PM
Wouldn't RefreshGadgets do the trick? I haven't tried it with a Requester but it will take a Requester as an argument.
#84895From: John DraperSep 14, 1987 3:08 AM
Erv, That would work for an image gadget, but a text gadgets doesn't refresh the entire gadget, it just re-renders the text. (hope this is right… just heard someone mention it earlier). Regards, Larry.
#84928From: Jim VogelSep 14, 1987 3:17 PM
Larry, That's what happens, as I tried that! I'm using what Leon suggested, and that works well, except that with 3 gadgets, the flicker while ongad and offgadget, but then look ok. Wish mutualexclusion worked. Jim V.
#84924From: Steve FaiwiszewskiSep 14, 1987 1:43 PM
Well, I guess you've already got your answer from the best source around, so I'll leave it at that… – Steve –