|
1 registered members (Quad),
3,790
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Simple Program, Doesn't Work
[Re: Shadow969]
#146819
08/08/07 21:55
08/08/07 21:55
|
Joined: Jul 2007
Posts: 7
SpaceXscape
OP
Newbie
|
OP
Newbie
Joined: Jul 2007
Posts: 7
|
|
|
|
Re: Simple Program, Doesn't Work
[Re: Shadow969]
#146821
08/08/07 23:09
08/08/07 23:09
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! Noticed your flag PANEL* panDisplay ={ flags = VISIBLE;} should be PANEL* panDisplay ={ flags |= VISIBLE;} Hope this helps  Ottawa
|
|
|
Re: Simple Program, Doesn't Work
[Re: Ottawa]
#146822
08/09/07 00:01
08/09/07 00:01
|
Joined: Jul 2007
Posts: 7
SpaceXscape
OP
Newbie
|
OP
Newbie
Joined: Jul 2007
Posts: 7
|
Quote:
Hi!
Noticed your flag
PANEL* panDisplay ={ flags = VISIBLE;}
should be
PANEL* panDisplay ={ flags |= VISIBLE;}
Hope this helps  Ottawa
Thanks, any ideas on where i can get a ball and paddle model?
|
|
|
Re: Simple Program, Doesn't Work
[Re: SpaceXscape]
#146825
08/10/07 13:37
08/10/07 13:37
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi!
Sorry SpacXscape to "but in" but a question on flags as come up because of this comment that I made and I would like to clear up the facts
Are you saying that flags = VISIBLE is used inside the panel def. and that or (my.flags |= VISIBLE;) is used only outside? I've got to read on this again. If this is the case I have a lot of corrections to do.
Hope this helps! Ottawa  Ver 7.86.2 Pro and Lite-C
|
|
|
Re: Simple Program, Doesn't Work
[Re: Ottawa]
#146826
08/10/07 13:42
08/10/07 13:42
|
Joined: Jan 2004
Posts: 2,013 The Netherlands
Excessus
Expert
|
Expert
Joined: Jan 2004
Posts: 2,013
The Netherlands
|
If you set a flag with "=", you will reset all other flags that where set before. This is normally not what you want, but it is when you are defining the panel. When defining a panel, there are no other flags set yet (you can be sure of that), so you can use "=".
Normally when you define a new variable it will have random content if you don't initialize it. If that where the case for the "flags" parameter, setting the flag with "|=" would be harmful because you MUST overwrite the content of flags. But I don't think flags contains random content becuase if you omit the flags parameter, all flags will be 0. So if I'm right, you can set it with both = and |=. Nevertheless, = is still clearer because |= indicates that other flags might have been set before (which is never the case in a panel definition.)
|
|
|
Re: Simple Program, Doesn't Work
[Re: Excessus]
#146827
08/10/07 22:41
08/10/07 22:41
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
HI Excessus!  I like this explanation. (I've copied it) I've done a bit of cleaning and it's not to bad. I had most of them right. Now I hope that SpaceXcape will find the models that he was looking for.  Ottawa
|
|
|
|