[futurebasic] Passing parameters from function to function

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2005 : Group Archive : Group : All Groups

From: Bernie <fblist@...>
Date: Thu, 7 Jul 2005 11:33:19 +0100
I can never remember all those part codes and tags that are used in  
def Get/SetButtondata() and I regularly have to QuiXample my stash of  
examples. As well as a shed load of other projects, I'm compiling a  
set of easy-to-remember wrappers for some of this stuff. The one  
below was suggested by a VIP in the FB community.

Anyway, I have a general question regarding passing parameters to and  
from functions... In the example, I want(ed) to eliminate the need to  
dim and copy the boolean. I've tried variations of the following:

..., @set as ^Boolean )
... sizeof( Boolean ), #set )

but I either get a compile error or a crash.

Any suggestions?

Bernie


'----------
/*
    Wrapper for def SetButtonData(...PushButtonDefaultTag...)
*/
local mode
local fn PushButtonSetDefault( btnID as long, set as Boolean )
'~'1
dim as Boolean  @ bool

bool = set
end fn = fn SetControlData( button&( btnID ), _kControlEntireControl,  
_kControlPushButtonDefaultTag, sizeof( Boolean ), bool )


err = fn PushButtonSetDefault( _cBtn, _true )
'----------