[futurebasic] Re: [FB] Initialisation (was )

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 1999 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Wed, 3 Mar 1999 19:45:39 +1300
>     I got the Inside Macintosh Overview book, and I am trying to use the FB
>equivilent:
>
>InitGraf(@thePort);
>InitFonts;
>InitWindows;
>InitCursor
>
>I know CALL InitFonts,CALL InitWindows, and Call InitCursor replaces the
>above, but I don't know how to do InitGraf (when I do Call
>InitGraf(@theport) the computer crashes (system bomb icon)

The compiler automatically inserts these initialisation calls into the
start of an ordinary FB application, which will certainly crash if you
repeat the INITGRAF etcetera.

An application compiled with the mini-runtime, on the other hand, _must_ do
its own initialisation, including some or all of:-
 CALL INITGRAF(REGISTER(A5)-4) ' QuickDraw
 CALL INITFONTS                ' font manager
 CALL INITWINDOWS              ' window manager
 CALL INITMENUS                ' menu manager
 CALL TEINIT                   ' text edit manager
 CALL INITDIALOGS(_nil)        ' dialog manager
 CALL INITCURSOR               ' standard arrow cursor

Robert