FireFly and Visual Basic "dot" syntax - Interested?

Started by Paul Squires, August 29, 2013, 04:00:59 PM

Previous topic - Next topic

Nathan Durland

I'll give this a thumbs up as well.  My biggest concern would be for existing projects that use the "classic ff_function" can still be changed and updated.  I've got lots of programs in play here at work; on some, a conversion process would be a daunting task.

John Montenigro

Quote from: TechSupport on August 30, 2013, 01:51:48 PM
... My thoughts are now is that we can have the best of both worlds in that the traditional and new style will be able co-exist within the same project. Hopefully my tests over the weekend will confirm this belief.  :)


I have not been coding much this year, and am happy to think that I could learn the new Object syntax without having to discard or re-write old code.
-JohnM

Paul Squires

I have tested and prototyped the new object syntax in FireFly. I have it working and it seems to be pretty easy to use. It will take me some time to create all of the methods and properties for forms and all the different controls. I will post a preview/test version for you guys to play with as soon as I can.
Paul Squires
PlanetSquires Software

Rolf Brandt

I am really looking forward to that preview version!

Rolf
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

David Kenny


Petrus Vorster

Definitely something i would like.
The dot syntax does help a lot with finding that option/procedure and is way faster to type.
Thumbs up.
-Regards
Peter

Paul Squires

Just a quick update: Everything is progressing perfectly with the new syntax. It is called "FireFly Object Framework". It is the closest VB6 / VB.Net representation for any PowerBasic product available today. Stay tuned, hopefully I will have it completed soon and ready to upload in the next FireFly update.

Paul Squires
PlanetSquires Software

Dan English

I don't suppose the new PowerBasic leadership would finally open up the debugger, thereby giving FireFly the final killer feature???

We can dream...

Paul Squires

Several years ago I asked for access to the pbd file format. At the time, Bob was not in favor of sharing that type of information. IIRC, compiling with the -d option generated the debug file.

Paul Squires
PlanetSquires Software

Carl Oligny

Will the new syntax be able to work with multiple instances of a form? I have an entry form with multiple open copies. I use the GetDLgItem(hWndForm,ID_Control) to get the unique control handles.

David Kenny

Carl,

I was going to ask about that myself.  I have done what you are in a similar way. I used to copy the handles and ID's into an array, as each one is opened.  In FF, opening the next form re-uses the same variables to store the Form handles and ID's as the one before  because it wasn't design to be used the way we are).  The variables always contain the the last-opened-form values.  I switched to using a PowerCollection  to store a UDT containing the handles I need (where the hWndForm is the key) a while ago.

Additionally I was going to ask Paul if it would be easy to have Form Arrays (much as we have control arrays). Then you could use: CustomerForm(2).NameTxtBx.hCtrl to retrieve the NameTxtBx handle from the second instance of the CustomerForm.  Of course you wouldn't need the handle as often if we could also do this:  CustomerForm(2).NameTxtBx.Text = "Carl Oligny"

David

Paul Squires

hmmmm.... those are very good questions. Multiple instances of forms. Not sure, I will take a look. Off the top of my head I would say 'no', but I will try to come up with a workable solution. It does seem like something that a programmer could regularly encounter.
Paul Squires
PlanetSquires Software

Stephane Fonteyne

#27
Quote from: TechSupport on September 24, 2013, 08:39:01 AM
hmmmm.... those are very good questions. Multiple instances of forms. Not sure, I will take a look. Off the top of my head I would say 'no', but I will try to come up with a workable solution. It does seem like something that a programmer could regularly encounter.

Paul,

I look forward  that FF3 is OOP based with the dot syntax very interesting for VB5/VB6 translated into PowerBasic with FF3. I love FF3 and PowerBasic.

Look to the website with the developer Larry Carliton he started all the windows controls and developed it with PowerBasic Objects. All his code is source and free for use

http://www.cur-ion.net/
Windowing Classes : http://www.cur-ion.net/classes.html



Begining of using classes for Windows in PB. Has application, and main window classes as well as most common controls. Still working on demos and some of the properties / methods for common controls.

Some of the features

"Message reflection" - Sends parent notifications to child class.
Message Bridge - Intermediary class that bridges from a windows procedure call back to classes.
Most windows common controls, still working on these
MessageExtensions - Allows injecting handling of messages. This allows an application to handle way the click event for a button without modifying the button common control class.
There are 4 common ways to insert user code into existing controls:

Add an extension to a control
Write code in the controls Proc method, use this for code common to all controls of this type
Add an extension to a window
Write code in the windows Proc method. Feels more like SDK programming.
The 1st two methods work because WM_COMMAND, WM_NOTIFY are reflected back to originating window. Also WM_SIZE is sent to child windows.

List of latest changes until it stabilizes a bit:

3/27/2012 - Merged test app and demos so each .bas file is a demo. Demo's that respond to events are shown using a control extension. Fixed a small bug with reflected messages that could recurse infinitely.
4/2/2012 - Updated Button, ImageList, ComboBoxEx, ListView, TreeView demo's and controls. Minor other changes.

http://www.powerbasic.com/support/pbforums/showthread.php?t=49849

Stephane Fonteyne
Ba. Elektronica - ICT
GSM : +32-xxxxxxxxxx
PowerBasic Developer & Hardware Support

Robert Rioja

I used VB for many years and are quite comfortable with the "dot" syntax.  I use FireFly daily and had to get used to the FF functions.  I miss the VB approach and welcome your trying to integrate it into a new FireFly.  GOOD WORK !!!
Robert

Haakon Birkeland

QuoteInterested?

Late to the game â€" indeed I am interested. It increases code readability and efficiency, and I'm so about the latter. Especially since I've become a pretty serious procrastinator the last year or so. Shortcuts like this and really good Intellisense is so easy to like that I still often want Word/Thunderbird etc. to suggest the ending of my words while I type. Hey, I'd even take a suggestion for whole sentences.

Reading through the thread I've seen no evidence to chip my interest in this syntax for the mentioned benefits. Cant credit a lot of thumbs to deter the desire, so mine's up too! 8o)

Now I'm off to read myself up on the progress of the framework, in risk of being overly exited for a while.
Haakon 8o)