[futurebasic] Re: [FB] Button/Return/EFs (a bit more)

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

From: Martin Fitzgibbons <rush@...>
Date: Sat, 20 Jul 2002 12:41:30 +1000
Stu

Many thanks, I actually understood what you are talking about which is 
not usually the case once the programming moves to its more technical 
aspects.

Martin

>> Ken
>>
>> Many thanks for the 2 examples. What does the @ indicate in the @ fn
>> CaptureEFReturn?
>> Martin
>>     <---large area clipped--->
>>
>>  > filterFN = @ fn CaptureEFReturn
>>  > EDIT FIELD 2,    "", (10, 35)-(190, 70), _framed,, filterFN
>>     <---more clipped--->
>>
> -----------------------
>
> The @ symbol in this syntax provides the memory address of the given 
> function. It's the same as this older but less common way:
> LET filterFN = VARPTR(FN CaptureEFReturn)
>
> Then that address is used on the next line that creates an edit field; 
> it indicates that this function will be called to examine the 
> keystrokes as they are typed in edit field #2. It is called every time 
> the user presses a key destined for this edit field -- they all 'pass 
> through' this routine and are sometimes modified, hence the term 'filter'.
>
> This option for a 'key filter function' at the end of the EDIT FIELD 
> statement only works with the appearance manager (FB^3.6). In previous 
> versions, one had to use ON EDIT FN CaptureEFReturn to achieve 
> something similar.
>
> HTH
> -Stu
> -------------------------
>
> Just an extra note:
>
> The program also had this line in FN BuildWindow:
>    DIM AS POINTER @ filterFN
>
> Here, the @ symbol forces variable 'filterFN' to be placed into RAM 
> rather than a register. This is required for getting the the EDIT 
> FIELD instruction. And it's a POINTER type variable because it 'points 
> to' the address of the indicated routine.
>
>