[futurebasic] Re: [FB] Databrowser ?s

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

From: Steve Crossman <steve@...>
Date: Sun, 16 Jan 2005 10:20:25 -0500
Alain and RP,

	Many thanks to you both for your help in this matter.  I was trying to 
implement editing in the browser window and found DBFD#11 as an 
example.  When I found the necessary pieces I needed I tried to insert 
them into my existing DB code.

	That's when the incompatibilities in the callback structures became 
apparent.  I started with a very simple browser, probably from the 
first examples sent out.  Waverly's name was at the beginning of the 
Tlbx ControlDefinitions.incl

	I will try the new code v1.6 you posted.

thanks again.

Steve

On Jan 16, 2005, at 3:04 AM, Alain Pastor wrote:

> Steve Crossman a écrit :
>> RP
>>  the record accessor eludes me right now, but i digress...  i don't 
>> see the obvious part you mentioned with the 
>> callbacks.v1.itemCompareCallback, as it is not used in the DBFD#11
>> upon further reading I see there is a difference in how the 
>> DataBrowserCallbacks are installed between the versions.
>> the new one is Fn DBFDInstallCallbacks the older one fn 
>> InstallDataBrowserCallbacks(browser as ControlRef)
>
> Steve,
>
> I don't comprehend your problem because I'm not sure how your are 
> using the DBFD library. I am at loss (well, it's the morning here, 
> maybe I need another cup of coffee) because I don't see which part 
> belongs to your project and which part is the code that you didn't 
> write or adapt.
>
> • DBFD#11 is an example file showcasing the cell edition feature of 
> the DataBrowser control using the DataBrowser For Dummies library. 
> Except from the regular declarations privy to the prog, there is 
> nothing here to screw up the Toolbox declarations, nor the library 
> functions.
>
> Note: a few DBFD examples broke with the advent of Panther. While I 
> can't positively remember which ones stopped working properly, I guess 
> DBFD#11 was one of them. There is an updated package running alright 
> in Panther available here: 
> <http://euro.futurebasic.com/download/DBFD1.4.sit.hqx>
>
> • Fn DBFDInstallCallbacks belongs to the DataBrowser For Dummies 
> library
>
> Note: I changed the name of the functions in the DBFD library to make 
> clearer the distinction between private and public routines: all 
> functions whose name starts with DBFDxxxx are private (normally, you 
> should have no need to call them from your own code), all the other 
> function names start now, in my current version, with Browserxxxx)
>
> • Fn NewDataBrowserItemDataUPP belongs to Tlbx ControlDefinitions.Incl.
>
> Note: normally you shouldn't mess up with the declarations in that 
> header file which is a conversion slightly enhanced of an Apple Header 
> file, except of course if you discover a bug that you can fix. 
> Nevertheless, this can happen easily since the FB runtime header files 
> are updated with each new release, the odds that you can find there a 
> duplicate Toolbox definition are not null.
>
> Additional note: the potential memory leak mentioned by Robert is not 
> addressed by the current DBFD library, however it is to note that the 
> DataBrowser callbacks installed by the library reference always the 
> same set of procs regardless of the number of DataBrowser controls you 
> create. Those procs are dynamically linked at runtime to the FB 
> callback FNs set by your own project when you build the controls. I 
> believe that this means that there is no point in disposing of the 
> callback routines and probably the fix should be to prevent the 
> library from calling the various NewDataBrowserXXXUPPs after the first 
> DataBrowser has been created. I'll see if I can do something about it.
>
> I have no idea if those explanations will be useful to you.
>
> Alain
>
> --
>