Welcome, Guest. Please login or register.

Author Topic: Do i have more logic than my compiler?  (Read 1032 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline iamaboringpersonTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show all replies
Do i have more logic than my compiler?
« on: July 19, 2003, 05:56:04 PM »
...or am i not reading the manual correctly?

ive been mucking around, setting up BOOPSI gadgets
i adjusted a program that worked fine, to make it a bit more efficient, and the new one would cause Intuition to freeze, or the gadgets would take a long time to render, and some would not render at all - i thought my code was fine

then i compared my code to the old code and noticed that basically the only difference between them was that the GA_Previous was pointing to the gadget currently being made using NewObject() !  this should not be, at least i think, strangly it works, and pointing it to the previous gadget only crashes the machine

basically i have an array of gadget pointers:
struct Gadget *mygads[32];

then i basically do this kind of thing:

mygads[0]=(struct Gadget *)NewObject(NULL,"buttongclass",,GA_Previous,mygads[0],TAG_DONE);
mygads[1]=(struct Gadget *)NewObject(NULL,"buttongclass",,GA_Previous,mygads[1],TAG_DONE);

that works! :-o

but [1] should point to
  • IMO!


is the compiler right? or should i be getting some more sleep :-?
 

Offline iamaboringpersonTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show all replies
Re: Do i have more logic than my compiler?
« Reply #1 on: July 19, 2003, 06:31:40 PM »
Quote
what happens if you leave out GA_Previous in the 1st call
sorry, yeah, i did leave it out in the first call, so the above example is not right
but in the many gadgets that i have created... they all point to themselves and that is the only way the program will work !