I have finally implemented code to address this long standing new feature request. So far in my tests it is working pretty well.
Whenever you change the name of a Form or the name of a Control, FireFly will now search the code for that Form and change any message handlers from the old name to the new.
For example, changing FORM1 to FRMMAIN would alter the WM_CREATE as follows:
From this....
Function FORM1_WM_CREATE ( _
hWndForm As Dword, _ ' handle of Form
ByVal UserData As Long _ ' optional user defined Long value
) As Long
to this....
Function FRMMAIN_WM_CREATE ( _
hWndForm As Dword, _ ' handle of Form
ByVal UserData As Long _ ' optional user defined Long value
) As Long
Likewise, changing a Control name (COMMAND1 to CMDOKAY) has the same effect.
From this....
Function FORM1_COMMAND1_BN_CLICKED ( _
ControlIndex As Long, _ ' index in Control Array
hWndForm As Dword, _ ' handle of Form
hWndControl As Dword, _ ' handle of Control
idButtonControl As Long _ ' identifier of button
) As Long
To this....
Function FORM1_CMDOKAY_BN_CLICKED ( _
ControlIndex As Long, _ ' index in Control Array
hWndForm As Dword, _ ' handle of Form
hWndControl As Dword, _ ' handle of Control
idButtonControl As Long _ ' identifier of button
) As Long
The code does not update any entered variables such as HWND_FORM1 or HWND_FORM1_COMMAND1. Maybe it will at some point.
This new addition will be in 3.08.
That is really cool Paul, thank you.
Marc
You're very welcome. :)
So far we're looking at 10 new feature additions and 9 bug fixes for the upcoming 3.08.
That sounds like a great new feature Paul. Keep 'em coming!! ;)
Kind regards
Very nice... looking forward to the next revision!
Quote from: TechSupport on May 07, 2010, 02:40:21 PM
So far we're looking at 10 new feature additions and 9 bug fixes for the upcoming 3.08.
What have you been doing in all your spare time ;D
We certainly appreciate all of your hard work and making our job easier in the process!
Thanks again,
Gary
That is a very useful enhancement Paul, I'm glad you have implemented it.
I have been spending quite a bit of time using FF3 lately and one observation I have made is that FF3 is really stable.
You can spend all day chopping and changing things around and it robustly carries on without GPFing or complaining.
I have all the toys installed, SQLitening (Wow), SQLite Expert Professional 2 (Fantastic), EGrid (Amazing), RMChart (Tremendous and I wish Rainer well as he seems to have disappeared from the scene). I am going to take a look at the VPE (Virtual Print Engine) Community Edition at some point as it seems quite capable of producing attractive print previews.
The point is, all of the above tools although powerful in their own right are greatly enhanced when accessed via the overarching FireFly environment. It simplifies application development enormously and is a pleasure to use.
What I have described is for me a close replacement to all the functionality I use in Microsoft Access. But with the ability to distribute easily, that is to say, no runtime overhead or installation issues.
Way to go Paul! (as our American cousins are so fond of saying).
FireFly3 really is a joy to use.
All the Best,
David
If only PB supported indexed and named arrays like PHP, then all the controls of a form could just be in an array and you could just change the array name, etc. I guess internally you could have each control/control variable be an index within a form array.
So, say your form1 hwnd is 123 and button1 is a control on form1 with an hwnd of 1234. You'd then have a form1 array and element 0 would be 123 and element 1 would be 1234. button1 would then be set to 1 and its hwnd would be form1(button1). You could name it better like hwnd_form1(button1) and ctlid_form1(button1), etc...or maybe even make the control ids the index into the array...although cancel and ok ids would mess it up.