[futurebasic] Re: [FB] It might be documented

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2009 : Group Archive : Group : All Groups

From: Bernie <fblist.bw@...>
Date: Mon, 14 Dec 2009 07:23:44 +0000
Wave wrote:

> It might be documented but I have overlooked this a bit of information that would have saved me some time.
> 
> Instead of using button&(id) I decided to write a function that retrieved the HIViewRef from the ID.
> The reason is that when using button&(id), you get the HiViewRef/ControlRef from the button in the front window.
> If you need the referenced button of another window, you need to manipulated the output window, which is
> something I didnt want to do.  I am currently using the function MakeIntoFBWindow which enables nib based
> windows and the included controls to be used just as though they were created programatically.  It works great.
> There is one catch.  The signature of the controls were changed to kFBtoCAppSignature.  This is something you
> definitely need to know in order to get a positive result.
> 
> Here is a function someone may want.  I thought it important, since I spent an extra 15 minutes trying to figure
> out why a "viewID.signature" of zero would not work.  I did a little dancing through the runtime in order to figure
> out why my function was not working.  kFBtoCAppSignature is the key.
> 
> It may have been documented somewhere but I hope this information will be useful to someone.
> < ... >

I wouldn't convert the nib objects to FB windows/controls but use the functions in UI Utils in the FBShell example.

Bernie