Apple Dylan Question 
Author Message
 Apple Dylan Question


Quote:

> I have been doing a bit of programming with the Apple Dylan system since
> the new patches came out. I have got a bit stuck using QuickDraw globals.
> I am trying to use what would be in a C or Pascal program "qd.black", I
> have figured that it should actually look like "qd.QDGlobals$black" but
> the variable "qd" does not seem to be defined/exported from the
> mac-toolbox library. I tried defining it in my code but that only
> partially worked. Has anybody got any ideas?

The Creole in Apple Dylan TR doesn't allow importing global variables from
C, only functions can be imported.  I think there was a good reason for
this, but I don't remember what it was.  qd is a global variable, in fact
the only global variable of any significance in the MacOS API.  But the
stuff in qd isn't much use now that the operating system supports color
monitors.

Perhaps you can use the black color $black-color exported by the
application framework instead of the black Pattern that is a member of
QDGlobals.

If you have to have the QuickDraw globals, you can use LMGetCurrentA5 in
LowMem.h to get a pointer to them.  Note that you have to subtract
structure-size(QDGlobals) - 4 from this pointer to get the real pointer, a
MacOS wart.
--Dave Moon



Fri, 02 Jul 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. PPC Apple Dylan Questions

2. Apple Dylan questions

3. Dylan Programming Book and Apple Dylan

4. Dylan is the Name was(Re: Dylan (Bob) eats rotten Apple (Computer))

5. Pre-newbie questions about Apple Dylan

6. Old Apple Dylan Archive

7. Apple Dylan TR

8. apple's dylan technology release CD

9. Apple Dylan t-shirt: Geek History though T-shirts

10. Apple's Dylan's FAQ postable?

11. Apple Dylan Rel. 1 - for sale CA

12. Posting Apple's Dylan Ref Manual?

 

 
Powered by phpBB® Forum Software