CompuServe Thread

#Benchmark RefreshGList

13 messages in this thread
#120550From: Jim VogelApr 22, 1988 9:30 PM
Has anyone had any problems using RefreshGList; specifically with the Benchmark compiler? No matter what number I give it for how many gadget to refresh, it allways does all the gadgets from the gadget I pass it to the last gadget. The only workaround I have found is to temporarily store the NextGadget var, NIL it out, RefreshGList, and then restoreNextGadget. The purpose behind this particular procedure is to refresh a text boolean gadget, and allow you to change the text depnding on whether it is selected or not; Or to allow you to have one gadget do "Dotted Lines", "Solid Lines", "Double Lines", ect. PROCEDURE ReWrtGad(GW:Window; REQ : RequesterPtr; GAD : Gadget; txt : ADDRESS); VAR tgp : GadgetPtr; BEGIN WITH GW DO WITH GAD DO WITH GadgetText^ DO IF (txt # NIL) THEN IText := txt; END; IF (Selected IN GAD.Flags) THEN SetAPen(RPort^,CARDINAL(FrontPen)); SetBPen(RPort^,CARDINAL(BackPen)); ELSE SetAPen(RPort^,CARDINAL(BackPen)); SetBPen(RPort^,CARDINAL(FrontPen)); END; END; RectFill(RPort^,LeftEdge,TopEdge,LeftEdge+Width,TopEdge+Height); tgp := NextGadget; NextGadget := NIL; RefreshGList(GAD,GW,NIL,1); NextGadget := tgp; END; END; END ReWrtGad; I have the same problem with RefreshGList in other procedure's that use RefreshGList, so I odnt think it is my usage, but anything is possibe :^) PROCEDURE UnsSelGad(); VAR tgp : GadgetPtr; BEGIN IF (Selected IN gptr^.Flags) THEN EXCL(gptr^.Flags,Selected); IF (GadgImage IN gptr^.Flags) THEN tgp := gptr^.NextGadget; gptr^.NextGadget := NIL; RefreshGList(gptr^,window,NIL,1); gptr^.NextGadget := tgp; ELSE ReWrtGad(window,NIL,gptr^,NIL); END; END; END UnsSelGad; This is used when I want to toggle between 2 or more gadget's , turning one on, and all the other's off. Any suggestions would be appreciated. Jim Vogel
#120611From: Leon FrenkelApr 23, 1988 2:58 AM
Hi Jim: The problem you encounter is due to the fact that some of the Intuition functions are documented improperly as taking 16-bit values and actually use the full 32-bits, if you look in the 1.2 autodocs you will find they are specified as USHORT or SHORT when in fact this is wrong. I found this a long time ago and fixed it, however the now year-old beta version still has the problem. I'm sorry you have encountered the problem, but I have to assume the Amiga docs are correct until found otherwise. Obviously, the Benchmark Modula-2 from Avant-Garde Software does not have the above problem. Leon Frenkel Avant-Garde Software (214)-964-0260
#120621From: Jim VogelApr 23, 1988 9:41 AM
Leon, Thanks, I'm glad to know that it is the procedure, and not the the way I was using it. I'll have to do it the way I am until I can get a final release version. As A courtesy to those of us who purchased the Beta version, and for one reason or another don't have a final version yet, could you put up as a message any known bugs in the beta version, This would probably prevent a lot of hair pullling on our part :^). Thanks Again, Jim Vogel
#120698From: Leon FrenkelApr 23, 1988 11:19 PM
Hi Jim: It's kind of hard to do that since I don't even know exactly what version you have, it has been about a year and it's pretty hard to remember exactly what's different. But, I doubt you will be running into any more problems. Sorry, I can not be more specific but it's been a very long time. >> Leon <<
#120721From: Jim VogelApr 24, 1988 7:11 AM
Leon, Ok, thanks , hopefully there won't be any more. Jim Vogel
#120703From: Erv ThompsonApr 23, 1988 11:39 PM
Jim – Just use some of the example code around and write your own binding routine for RefreshGList. It's quite simple once you see some examples of how it's done.
#120722From: Jim VogelApr 24, 1988 7:15 AM
Erv, I gave that a try, but it didn't seem to work. And since I have a workable workaround, I probably wont mess with it now. I find that if I let myself gewet off on too many tangents, I lose sight of the main project I am working on. Jim Vogel
#120810From: Erv ThompsonApr 24, 1988 9:23 PM
I certainly can identify with that position. I've been off on so many tangents lately I've accomplished absolutely nothing of any substance in the last few months. Later…. (* ET *)
#120735From: Steve FaiwiszewskiApr 24, 1988 11:29 AM
Leon already pointed out that the call to RefreshGList is flawed in the Beta relase of Benchmark. My suggestion: code a call to the Intuition procedure yourself. If you have a debugger (MetaScope is GREAT), or a disassembler, simply disassemble Benchmark's RefreshGList procedure, and duplicate it in your own procedure, and fix the problem. I can give you the exact (and correct) assembly code. You can simply use INLINE and SETREG to get it working. – Steve –
#120811From: Erv ThompsonApr 24, 1988 9:30 PM
Steve – Out of curiosity I once tried to ZAP some TDI code with the correct lib offsets. For the record, the compiler/linker won't accept ZAPped files. Wrong checksums or something along those lines. Tjhought I'd mention it for anyone thinking they can fix a buggy file that way. I realize you're not suggesting that type of fix, of course. By the way, I have a question concerning the compilation of the "make" files with Benchmark. I've tried doing it a couple times and GURUed. Command line = "m2 <make". I've a rather early beta release of BM.
#120907From: Steve FaiwiszewskiApr 25, 1988 5:28 PM
"m2 < make" works fine for me. It also worked fine for me when I used the Beta release. Try upping the stack. Maybe you have something funny in the make file. What's its contents? – Steve –
#120951From: Erv ThompsonApr 25, 1988 10:55 PM
I'll try upping the stack. The ma files are "stock" ones on the demo disks. I'm sure it's the stack. Thanx for reminding me. I think I'll hang a note on the monitor "Check the stack!!!".
#121038From: Brendan PrattApr 26, 1988 6:56 PM
I've done that a couple of times too!!….and i've got the release version from Leon direct!…what i kept on forgetting to do w to do was to increase the stack…sometimes just going wild and doing things like STACK 30000 or some very high figure,no worries. C u laitr Brendan Pratt