PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Gary Stout on December 31, 2014, 03:15:39 PM

Title: Where to put SQLitening file open routines
Post by: Gary Stout on December 31, 2014, 03:15:39 PM
I am making good progress on a rewrite/conversion and trying to learn FF along the way. I am curious where I need to put my SQLitening file open routines? I put them in the WM_Create function of the main form, but it seems that the child forms are not aware that the file is open. Where should I put the file open routines so that they are seen throughout the program?

Thanks in advance,
Gary
Title: Re: Where to put SQLitening file open routines
Post by: Eddy Van Esch on December 31, 2014, 04:01:40 PM
FF_WINMAIN (FF's equivalent of PBMAIN) seems like a good place to put init stuff ...

Constants, variables, type definitions etc are best placed in FF_AppStart
Title: Re: Where to put SQLitening file open routines
Post by: Gary Stout on December 31, 2014, 04:26:49 PM
Thanks for the tip Eddy!
I started learning FF way back and gave up on it and now am starting again. I am now in the process of converting a perfectly working app over to FF, for the benefits and the experience. I am sure I am going to run into some difficult areas when it comes to doing some tricky things that require a lot of API stuff, but I will work through them with the help of my friends here on the forum.

One thing I have noticed it that FF apps seem to run much better under WINE than what i have been using in the past.

Thanks again for your help and hope you have a Happy New Year!
Gary
Title: Re: Where to put SQLitening file open routines
Post by: Eddy Van Esch on December 31, 2014, 04:51:05 PM
Quote from: Gary Stout on December 31, 2014, 04:26:49 PM
.. tricky things that require a lot of API stuff,
I think you will find that Paul has a lot of thing covered with his FF_.. functions.  F8 ("Functions Library") is your friend.
Personally,  I rarely ever have to use API function directly, and even then only the more simple ones.

While we are mentioning function keys. I just love F4 ("Handles and ID's"). A real time saver!
Oh, and a very Happy New Year to you too, Gary!
Title: Re: Where to put SQLitening file open routines
Post by: Gary Stout on December 31, 2014, 04:56:59 PM
Thanks Eddy....

I know my next challenge is going to be with a combobox. In the old program, I have the combobox (which contains a list of names last,first) setup so that if the user types the first letter of the last name, the combobox will open and scroll to the beginning of last names that begin with that letter. Right now, when I type a letter, the combobox will open, but it is not yet scrolling where I need it to go. If you have any tips or pointers on this, I would be greatful as well.

Thanks again,
Gary
Title: Re: Where to put SQLitening file open routines
Post by: David Kenny on December 31, 2014, 05:54:52 PM
If you have a working version in PB then it will be really easy to "port it" to FF.  The only "tricky" part will be with the messages you will receive from the control.

I have included a test project I wrote a while back.  I didn't use a combo box (and I don't remember why), but simulated it with a textbox and listbox. As it sits right now, the listbox is only rolled up (hidden) when the user double-clicks an item. But you have full control of that. Any change to the text box will bring the listbox back. It doesn't do a search as you mentioned but a filtered search.  So the more you type, the smaller the list of matches gets. BTW, the test data is a list of female names.

David
Title: Re: Where to put SQLitening file open routines
Post by: Gary Stout on December 31, 2014, 06:01:37 PM
Quote from: David Kenny on December 31, 2014, 05:54:52 PM
If you have a working version in PB then it will be really easy to "port it" to FF.

Thanks David,

I have a working version in PB, but it is using the EZ way of doing things  :-\  I may still be able to adapt the code...haven't really spent much time on that part yet.
Thanks also for the sample code. I will take a look at that as well.

Gary