[futurebasic] RunApplicationEventLoop() needs include

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Fri, 18 Jan 2008 09:48:27 -0500
In various threads, Bernie and others have suggested we:

> [1] Use RunApplicationEventLoop() instead of do : HandleEvents :  
> until  gFBQuit.



I was playing with some Carbon Events code when it dawned on me that  
not everyone here may realize that RunApplicationEventLoop() is  
defined in include ""Tlbx CarbonEvents.incl". In this snippet, if you  
REM out the include, the program won't run which might leave some  
scratching their head.

Just wanted to document it here for posterity.

Ken

include "Tlbx CarbonEvents.incl"

window 1

print
print "A byte is"  ; sizeof( byte   ); " byte"
print "A char is"  ; sizeof( char   ); " byte"
print "An int is"  ; sizeof( int    ); " bytes"
print "A word is"  ; sizeof( word   ); " bytes"
print "A short is" ; sizeof( short  ); " bytes"
print "A long is"  ; sizeof( long   ); " bytes"
print "A single is"; sizeof( single ); " bytes"
print "A double is"; sizeof( double ); " bytes"
print "A str15 is" ; sizeof( str15  ); " bytes"
print "A str31 is" ; sizeof( str31  ); " bytes"
print "A str63 is" ; sizeof( str63  ); " bytes"
print "A str255 is"; sizeof( str255 ); " bytes"
print
print "A shorthand byte is"  ; sizeof( x` ); " byte"
print "A shorthand int is"   ; sizeof( x% ); " bytes"
print "A shorthand long is"  ; sizeof( x& ); " bytes"
print "A shorthand single is"; sizeof( x! ); " bytes"
print "A shorthand double is"; sizeof( x# ); " bytes"
print "A shorthand string is"; sizeof( x$ ); " bytes"

RunApplicationEventLoop()