[futurebasic] Re: [FB] Detecting clicks in edit fields

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2011 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Sun, 26 Jun 2011 16:01:03 -0700
On Jun 26, 2011, at 12:09 PM, Dan Baeckström wrote:

> Alain's code obviously works very well. However, parts of it read like modern poetry to me. I can grasp that
> fn CEInstallControlEventHandler( button&(_bouton1), @fn MyControlHitHandler,_bouton1,0 )
> gives instructions to execute fn MyControlHitHandler when the specified control event has occurred to the specified individual control.
fn CEInstallControlEventHandler is a nice management wrapper function for InstallEventHandler(). InstallEventHandler() tells the Carbon Events( commonly referred to as CE in many Util functions ) runtime to install our handler for a specific type of event ( ---like a control hit such as _kEventControlHit ---look in Tlbx CarbonEvents.incl for list of these ). Carbon Events defines what parameters are sent to the handler ( go to Xcode docs and type Carbon Events -- you will need the legacy docs installed-- and Apple’s Carbon Event Manager Programming Guide should show up ) and in what order. Reading CE documentation will be necessary for a complete understanding of how this works. Basically, CE handles all events automatically with default behavior. CE must be notified when different/additional behavior is desired. 


Brian S