FireFly Object Framework - Open Beta (BETA PERIOD IS NOW OVER - THANKS!)

Started by Paul Squires, October 02, 2013, 06:18:31 PM

Previous topic - Next topic

Paul Squires

Hi Everyone,

*** UPDATED: Version 1.70 is attached (Oct 3, 2013)
- Fixed: Not being able to selecting Object name from popup F4 list and insert directly into code editor.
- Fixed: Incorrect popup list of properties/methods for a Form could display. That is, the list for the Form object would show properties/methods of a different Form object.


If you are interested, you can download and try out the attached FireFly beta that includes the new FireFly Object Framework. This is basically the object "dot" syntax that we talked about in another post. The Framework is not totally complete but it will give you a very good idea of the power and convenience it provides.

To use the framework here is what you need to do:

(1) Make a copy of your existing FireFly installation.
(2) Unzip the attached FireFly beta archive (preserve directory structure).
(3) Read the pdf called FireFly_ObjectFramework.pdf

When you create a new test project, don't forget to enable the object framework for the project by going into "Project Properties" and enabling it.

The beta also includes many fixes and new features that have been added to FireFly since the last FireFly update. Using this beta will not harm any of your existing projects and you can easily switch back and forth between the beta and your existing FireFly installation.

Here are the changes:
- 0000845: [New Feature Request] FIREFLY OBJECT FRAMEWORK (Paul Squires) - closed.
- 0000840: [New Feature Request] Allow SLL option as well as DLL for external controls (Paul Squires) - closed.
- 0000843: [Change] Enable TBSTYLE_AUTOSIZE style by default for new ToolBar Buttons (Paul Squires) - closed.
- 0000839: [Bug] Form not set to dirty when only Custom property changes (Paul Squires) - closed.
- 0000844: [Bug] Cancel property of CommandButtons getting reset to False when Form closed and opened inside FireFly (Paul Squires) - closed.
- 0000842: [Bug] StatusBars not resizing on multiple instances of the same Form (Paul Squires) - closed.
- 0000841: [Bug] Correct Control ID numbering in code generartion for multiple toolbars in rebar control (Paul Squires) - closed.
- 0000832: [Bug] Duplicate message handlers created if control name changed and source file not saved (Paul Squires) - closed.
- 0000837: [Bug] WebBrowser code generation error if 'Custom' property not accessed prior to first compile (Paul Squires) - closed.
- 0000836: [Bug] Font handle not deleted when control destroyed (Paul Squires) - closed.
- 0000835: [Bug] Correct client offset calculation when Toolbar exists (Paul Squires) - closed.
- 0000834: [Bug] Code generation for TabCtrl_SetItemSize and TabCtrl_SetPadding not scaling in DPI > 100% (Paul Squires) - closed.
- 0000833: [Bug] Code generation now keeps UNION and TYPE declarations together (Paul Squires) - closed.
- 0000831: [Bug] Fonts in 3rd party external controls not scaled per DPI setting (Paul Squires) - closed.
- 0000830: [Bug] GDI+ controls failing to load in DLL's (Paul Squires) - closed.

Please try the beta and provide your comments, criticisms, and ideas here. I greatly appreciate your help.

Paul Squires
PlanetSquires Software

Elias Montoya

Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

John Montenigro

#2
Oh, this is so cool!!!!  Been fiddling with a bunch of things, and I can't wait to get more time to do some serious stuff (won't be till the weekend, drat!)

Thank you!!!


Two quick questions:
1. Will it be possible to copy a property name from the F9 workspace for pasting into code?
2. How to tell what kind of parameter the property is expecting?

For example, I don't have the proper syntax for frmMain.Show

Function FRMMAIN_CMDOK_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

   frmHelp.Show = %TRUE
   
End Function

-John

Carl Oligny

All code that I have changed to the dot syntax in an existing project works great. I noticed that my executable grew from 3,248,128 bytes to 4,255,744 bytes on my first test which consisted of no changes other than enabling the Firefly Object Framework. Thanks for the great new feature, Paul.

Paul Squires

Thanks Carl. That is a pretty big project you have there so it is nice to see that the Framework co-existed correctly in your program. That is a substantial increase in size though. FireFly now dynamically generates an object for every Form and Control in your Project (eg. CODEGEN_PROJECT1_FRAMEWORK_CLSAPPFORMS.inc). I wonder if it would be advantageous for FF to scan your code and only output objects that are actually referenced similar to the way FireFly only outputs the FF functions that are referenced. Makes sense.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: John Montenigro on October 02, 2013, 07:26:22 PM
Oh, this is so cool!!!! 
:)  Lots to work on to make it even better but I am impressed with the overall direction so far. Thanks!

Quote
1. Will it be possible to copy a property name from the F9 workspace for pasting into code?
I assume you mean, F4, but yes that should be done however it looks like the object name is not being pasted. Other references in that popup are being pasted though. For example,  frmMain is not, but frmMain.hWnd is. I will have to fix that.

Quote
2. How to tell what kind of parameter the property is expecting?
A tooltip popup should have displayed when you pressed the Space bar after typing .Show. Eventually I will expand the intellisense functionality better. Likewise, I plan to add descriptions of all the properties and methods to FireFly's "Reference Charts" located at the bottom of the screen.

frmHelp.Show [ ( hWndParent As Dword, ShowModal As Long, Optional nValue As Long ) ]
Paul Squires
PlanetSquires Software

Theo Gottwald

#6
I have loaded and recompiled my most complex project, and it works as befrore.
The EXE-size changed just fropm 4.23 MB to 4.24 MB.
On closing FF i got this Error (attached), WIn7/x64.
Also my FF-Project still crashes in Windows 8, while no problems in Windows 7 or below.
I could never find out, why. The crash happens when Listviews enter the game, even if they are from an System-Open Dialog.
@Elias ... you know that project.

Paul Squires

I fixed that F4 popup selection problem per: http://www.planetsquires.com/protect/forum/index.php?topic=3406.msg24711#msg24711

I also found a more significant problem whereby the popup selection list for an Form object would should the actual properties/methods belonging to a different Form. That is, it would show in the list the Control Objects belonging to a different form. This is fixed now and I will update the Beta download later today (may find more problems as the day goes on).
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Theo Gottwald on October 03, 2013, 09:15:44 AM
I have loaded and recompiled my most complex project, and it works as befrore.
The EXE-size changed just fropm 4.23 MB to 4.24 MB.
On closing FF i got this Error (attached), WIn7/x64.
Hi Theo - that error will show when FireFly attempts to save your config file to a Read Only area on your computer. FireFly first attempts to write a random file to the folder and if it fails then it will display the message. Are you sure you installed FireFly correctly? For example, the config file can not be saved to the 'Program Files' folder/subfolders.
Paul Squires
PlanetSquires Software

Theo Gottwald

Paul, i did not install it new, just replaced the working files with the one in the update.
I would say that I did not get these messages with the original version.

Also my FF-Project still crashes in Windows 8, while no problems in Windows 7 or below.
I could never find out, why. The crash happens when Listviews enter the game, even if they are from an System-Open Dialog.
@Elias ... you know that project.

John Montenigro

Quote
frmHelp.Show [ ( hWndParent As Dword, ShowModal As Long, Optional nValue As Long ) ]

If I'm reading this syntax correctly, the params appear to all be optional, but it won't compile with just: frmHelp.Show

However, it compiles and works fine with:  frmHelp.Show (0,0) 

Paul Squires

I didn't mean to put the square brackets there. hWndParent and ShowModal are required. nValue is optional.

eg. If you have a main form (frmMain) and want to show a modal popup form (frmOptions) then you would do this:

   frmOptions.Show frmMain.hWnd, %TRUE
Paul Squires
PlanetSquires Software

John Montenigro

Thanks for the clarification!

All's well in this part of the sandbox!!  :)

-jhm

Elias Montoya

#13
Quote from: Theo Gottwald on October 03, 2013, 09:34:43 AM
@Elias ... you know that project.

I imagine it is the one i worked with. :) I still remember it very well, even though 3 years have passed.
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Paul Squires

First post updated. New upload, v1.70 of the beta Framework uploaded.
Paul Squires
PlanetSquires Software