[futurebasic] Re: [FB] Was Re: [FB] About Menu Item / Display NIB more than once Now:

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

From: Stu Cram <stu@...>
Date: Mon, 31 Mar 2008 20:07:29 -0600
On Mar 31, 2008, at 7:30 PM, Brian Heibert wrote:
> Hi,
>
> I am using this code from Robert Purves to close a NIB window
> but I am running into problems with one line (see below)
>
> local fn InstallWindowCloseHandler ( w as WindowRef)
> dim as EventTypeSpec events(1)
> begin globals
> dim as proc sWindowEventUPP
> end globals
> #if def _FBtoC
> sWindowEventUPP = @fn WindowCloseHandler
> #else
> long if (sWindowEventUPP == 0)
> dim NewEventHandlerUPP
> sWindowEventUPP = CALL NewEventHandlerUPP ([proc  
> "WindowCloseHandler" + _FBprocToPtrOffset]])
>
> end if
> #endif
> events.eventClass(0) = _kEventClassWindow
> events.eventKind(0) = _kEventWindowClose
> end fn = fn InstallEventHandler (fn GetWindowEventTarget(w),  
> sWindowEventUPP,1,@events(0), #0, #0)
>
>
> Here's where I am running into problems...
> sWindowEventUPP = CALL NewEventHandlerUPP ([proc  
> "WindowCloseHandler" + _FBprocToPtrOffset]])
>
> FutureBASIC doesn't like this
>
> Brian
>
==================================================

Perhaps you did not put the instruction all on one line.
Or, you could add a continuation character (¬) after first line of  
the two.
(The email likely broke the instruction into 2 lines.)

-Stu