PlanetSquires Forums

Support Forums => General Board => Topic started by: Rolf Brandt on November 08, 2009, 07:32:23 AM

Title: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 08, 2009, 07:32:23 AM
Here is the full set of SQLitening functions for the FireFly3 Functions Library for download. Text of the help file is also supplied in the description window. (See screenshots)

To use these functions unzip the contents of the SQLitening_v130_Lib.zip file to the following folder:
<Program Files>\FireFly Visual Designer\CodeStore\PowerBASIC

Start FF3 and press F8. You will see the new SQLitening functions. All you need to do now is to include SQLitening.inc into you project, put it into the Modules folder, and copy the needed SQLitening Dll's into your Release folder.

Hope someone else finds it helpful too. Enjoy.

Rolf

2009-11-14:
Updated functions library for FireFly v3.03 and higher
Now with Code tips.
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Paul Squires on November 08, 2009, 09:37:40 AM
Hi Rolf,

Are you sure that this will work? When FF3 parses and finds one of the sqlitening functions in the library then it will use the Code as written in the library to put in the final code generated by FF3 during compile. This would mean that you will get a lot of compile errors complaining of "End Function Expected" errors.

You would need to copy over the entire code for each of the functions into the Functions Library rather than just #INCLUDE'ing the SQLitening include file.

See what I mean? Try creating a sample program and enter a function like slOpen and try to compile.

Maybe an option could be added to the Functions Library to treat the entry as a "prototype" (or some other better name) that would indicate to FF3 to bypass including the code into the final EXE but still use the function prototype for purposes of displaying the CodeTip, etc...
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 08, 2009, 09:50:12 AM
Not quite sure if I understand you right. But I'll try a little sample program. Maybe I understood the functionality of the Functions library a little wrong.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 08, 2009, 10:21:55 AM
Paul,

you were of course right. I tried a little example. Exactly what you said happened. But I found a little workaround already. So I just removed the download file and change it. Will load up the corrected file later today.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Haakon Birkeland on November 08, 2009, 10:25:00 AM
QuoteI found a little workaround already.
Tell us, tell us ... 8o)
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 08, 2009, 10:35:29 AM
I will, I will ...

This Functions Library is a much more fantastic tool then I thought. I just took a little closer look at it to fully understand what you can do with it.

I am just reorganizing the SQLiting folder a little so that FF3 will not generate any End Function errors anymore. When you doubleclick the function it will insert code like this:

slAttach (rsFileName_String, rsAsName_String, Opt_rsModchars_String)_Long

Just tried a little code and compiled it. Worked fine.

Rolf

Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 08, 2009, 02:35:21 PM
OK - I uploaded the fixed file. Works fine now, creates no problems with FF3.

If anyone finds any errors let me know.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Paul Squires on November 08, 2009, 05:16:09 PM
Yes - it does seem to work. However, now you lose the CodeTip popup. Actually, it only displays the function name in the popup rather than the function name and the parameters for the function.

I am thinking that my previous suggestion adding an option to the Function Library seems like a good soluition. Just need to add an extra checkbox option where the "Set as Favorite" and "Expand".

Quote
Maybe an option could be added to the Functions Library to treat the entry as a "prototype" (or some other better name) that would indicate to FF3 to bypass including the code into the final EXE but still use the function prototype for purposes of displaying the CodeTip, etc...
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 08, 2009, 06:15:56 PM
Yes, that certainly would be a great option! If you can do this in one of the next updates I centainly adjust the files.

Meanwhile it works basically like the F8 function in FF2. Might be of help too.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Paul Squires on November 09, 2009, 09:03:13 PM
Hi Rolf,

Did you keep a copy of the original zip file that you had attached to the first post in this thread? You know, the one with the full FUNCTION/END FUNCTION definition?

I just added a checkbox to the Functions Library and called it "Prototype only. Do not include code in code generation." I wanted to use your first version of the SQLitening functions to see if the new addition actually works as it should.  :)
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 10, 2009, 08:50:33 AM
Yes, I still have it. I email it to you.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 13, 2009, 07:58:21 PM
New SQLitening Functions Library for FireFly.

You must have at least FireFly v3.03.

Now with Code Tips!
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Andrew Lindsay on November 13, 2009, 08:38:50 PM
Rolf,

Excellent work.  Thanks for all your assistance in porting SQLite 3 across to PB, and especially SQLitening!!!  Fantastic stuff.

Regards

Andrew
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 14, 2009, 03:53:37 AM
Thanks for the kind words Andrew. But that was only possible with Paul's aid and the changes he made to the Functions Library in version 3.03.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Marc van Cauwenberghe on November 14, 2009, 05:44:18 AM
Rolf, Paul,

thank you very much. One thing, if I put the folder in the right place and then look at the functions details I see the the expand option is set not the prototype option. Is this just me having this?

Marc
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 14, 2009, 06:04:55 AM
Hi Marc - now that you mention it....

Strange - really the prototype should be checked the way I understood it. Nether the less I just gave it a quick try and the compile generates no error and executes properly. I guess we have to wait for Paul's comment.

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Paul Squires on November 14, 2009, 01:15:48 PM
I unchecked the "Expand" and checked the "Prototype". Why would you want the Expand set? Pressing CTRL+Enter would enter the whole code block. Maybe that is the effect that you want? I thought that people would enter the function name and then use the CodeTip to guide the rest of their parameter list.

There is no reason why you could not have the Expand option checked as well. It is just personal user preference.

Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Marc van Cauwenberghe on November 14, 2009, 01:36:20 PM
Hello Paul,
I also did this with every function. Just wondered why Rolf set it like that. The provided inc files must have the wrong parameter checked then because I think Rolf intended the 'Prototype to be checked.

Marc
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 14, 2009, 01:42:22 PM
Hold on, guys - I'm just trying to figure out what happened!

Rolf
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Rolf Brandt on November 14, 2009, 01:56:57 PM
Not sure what happened - maybe I grabbed the wrong zip file and uploaded. Anyway here is the right one with Prototype checked.

Sorry for any inconvenience!
Title: Re: SQLitening v1.30 FireFly3 Functions Library (F8)
Post by: Douglas McDonald on January 23, 2010, 12:26:17 PM
Rolf,

Thank you for your hard work with this project and to Paul for supporting it. Magic...press F8 and its there

I've never used SQLitening but I'm looking forward to dive in. Actually I very seldom ever do any DB programming but I have a project now that needs it.

Doug