[futurebasic] 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: Brian Heibert <heibert@...>
Date: Mon, 31 Mar 2008 21:30:09 -0400
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