2.04 Tags confusion
06-Feb-92 09:21:54
Sb: #20033-2.04 Tags confusion
Fm: KEITH YOUNG 73170,307
To: Harry Callesis 72025,117
Harry,
Are you setting up the tag list in the data section and then passing the
address of it to the OpenWindow() call? If so, then that's probably the
problem… remember, the 'myscreen' variable is a pointer (which is what
the WA_CustomScreen tag needs). Since it's a pointer, at compiletime, it's
a null pointer (it gets initialized by your code after the screen is
opened).
If that tag took 'the address of a pointer' as the arguement, you could
use { WA_CustomScreen, (ULONG) &myscreen } and the compiler would be happy
because it could resolve that… but it doesn't, so you need to do
something else.
I typically use the variable args OpenWindowTags() version of
OpenWindow() and pass the tags on the stack. You can pass them all or just
a few, with a TAG_MORE pointing at the rest of them.
I hope that made sense…
Keith