FireFly - Initial Overwhelm

Started by David Gwillim, April 13, 2004, 08:56:34 PM

Previous topic - Next topic

David Gwillim

Paul,

I downloaded the demo and have been playing with it. I have never done SDK development before, but I can recognize the openness of the route - e.g. not being tied to the limitations of DDT coding shortfalls.

The one thing that strikes me is that there is SO MUCH DETAIL presented in the source for even an empty window frame. Is there any way to navigate that detail so that I can still see the forest? What is there appears to be beautifully well thought out though.

I realize that FireFly has been written to provide the entirety of the Windows 32 messaging system, but initially it is quite an overwhelm. Perhaps some gradient examples that use one particular control and then build from simple to more complex interaction and message handling?

Excuse me if I am rambling...

Thanks,

Dave

TechSupport

Hi David,

Thanks for taking the time to evaluate FireFly. First off, let me say that there is even more coming in the next update (1.03)  :)  I have several new things in mind for FireFly that should make PB programming very easy to use.

One thing that you need to remember is that you DO NOT have to deal with the generated source code. You could create hundreds of projects and never even care about the FireFly generated source code. That is the beauty of the system. You never really need to know what is going on "under the hood". A lot of the generated code is merely housekeeping stuff that enables FireFly to deal with colors, keyboard, modal forms, blah, blah, blah. Not overly exciting to the FireFly user.

The best part of FireFly is that you only need to design your Forms and add code to the various messages in order to make your Forms and Controls work. FireFly will then take everything that you have entered in the FireFly environment and generate the final code. If you need to make changes, you make the changes in the FireFly environment *NOT* in the generated code. The generated code will only get overwritten the next time that you compile the program anyway.

Confused? Clear as mud?   :)

I agree that a step-by-step tutorial for creating a simple form and responding to simple controls would be a bonus. Consider it done. I will write it for the next update.

David Gwillim

Hi Paul,

Thanks for the rapid response. Much appreciated.

I understand the overall philosophy - it's very much like programming in VB6 - which I did a fair bit of professionally. The difference is that VB does not give access to the level of detail that Firefly does, in terms of canned event functions/procedures.

For me, when tackling a new paradigm in programming the hardest step is determining the order of importance of things. In the case of Firefly SDK programming, it's going to be necessary to be able to look at the drop down list of message handlers and KNOW which ones I have to use WHEN! Perhaps even a simple context sensitive help expressing this aspect would help not only me, but other potential Firefly SDK programmers.

What do you think?

Dave

Haakon Birkeland

I agree. I have never used SDK for programming. Using any of the events seem to have mostily 4 parameters. what are they used for. I tried deciphering WIN32 help all the examples are in C with different variable name. So I got a hard time even making a simple form. Where is there a simple app that will show how to respond to controls. Allot of the samples seem to use constants some have idcontrol numbers. Where are the constants listed?

bert mercier
Haakon 8o)

Roger Garstang

Ditto for me as well!    I have never mastered DDT due to these same reasons.  A tutorial would be a BIG HELP!  Even if the tutorial only has a simple form with just a few controls, that would be fine.  Just as an example, something that would give me a shove would be a form with maybe a couple of command buttons, and maybe a label and text box. Click the button and demostrate how to put some text in the box or maybe type something into the textbox, click a button and move the text to the label. Some real elementary examples would helps us all.

Thanks,

Anonymous

I think some words in defence of Firefly are in order here.

Firefly isn't supposed to be a replacement for VB6, or any other software building GUI product. It may have some similarities to other products and may leverage some of their ideas. But if you are looking for a direct VB6 replacement I think you've got the wrong product.

This isn't really FF's fault. It works by putting a convenience wrapper around PowerBasic. And PowerBasic is down in the engine room of development able to compete with the likes of other popular programming languages like C. Using the Windows API is commonplace to do anything useful.

Unless you have been involved in serious API development then it is likely you will struggle to develop PowerBasic programs - with or without FF's help.

I don't doubt that FF will be improved substantially in future releases, and new features will roll out to make your job easier without knowing so much about the (sometimes complex) API calls.

That's my opinion anyway. Others may differ.

If you want to get a good reference book on the API then Petzold is the reknowned master of the universe (okay, author) in the field, and any search on Amazon or elsewhere will soon drag up his Windows programming book(s). It's probably the one book that all serious Windows developers have on their bookshelf regardless of all others, because it explains in some detail, with examples, how different calls work.

There may be other books available, but that's the one I cut my teeth on.

Andrew

David Gwillim

Hi Andrew,

I fully understand that Firefly is for SDK/Win32API development, and such a programming paradigm is not  a "route of simplicity", but one of power. I also think that Paul understands that if he wants to expand his marketplace from the 5% of PB programmers (which might be a high estimate) who are skilled in WINAPI32 development, that he must open the door to learning the API via Firefly's interface. It obviously will never be VB6, in fact who would want that. However, there is no reason that the interface on Firefly couldn't make the transition to SDK/Win32API programming more approachable to the other 95% of the PB world.

Adding some context help for the Win32API message handlers which reminds the programmer of when to use them, along with a tutorial that shows bare-bones use through sophisticated use of them for a given control would be a major benefit.

There is no harm in studying the great Masters of the Win32 API like Petzold, I have quite a few of his books, and use them. But it is not always easy to find how to do one special thing with the API, in a book.

Dave

TechSupport

All good points. Thanks guys. The API can be overwelming, but so can DDT, or other 3rd party libraries.

I do believe that a simple tutorial would be a welcomed addition. Also, maybe even a "Common Operations Guide". Something that shows how to do common things with the API - like setting the caption of a label or retrieving text from a Textbox. I will start collecting those types of questions and create a document that can grow and change. I'll host it on this site.

Win API will take time to learn, but the benefits of this knowledge will unlock a wealth of power. I believe that most people bought PowerBASIC because they want the raw power of bare bones programming without the high overhead of a system like Visual Basic.

Give it time; ask a lot of questions; search POFFS; download the Win32 Help files; ask a lot of questions; ask a lot of questions; ask a lot of questions; ask a lot of questions; ask a lot of questions; ask a lot of questions; ask a lot of questions; ask a lot of questions. :mrgreen:

Maybe even start a Win32 API question and answers forum on this site???? What do you think?

TechSupport

... oh, and another thing... I don't want to come off as sounding like some Win API coding guru, hell no. I know enough of the API to make me dangerous, that's it!  ;)   I by no means know it all, but I do take the time to research and play with new code that I find. If I don't know the answer then I'm sure that others in this forum will jump in and provide the info.

Haakon Birkeland

Hi Paul
I think everybody needs a reason to buy a product. I have Cheetah,JellyFish, EZGUI, DDoc,pBforms etc. They all at one time gave me reason to buy the product. I use those products continually depending what I need to do. I also have VD which is also very good. I mostly use EZGUI for it's main value, the fact that I have very seldom ever had to use the API. If I can start understanding the product and can get over the first step I can see where learning how to use the API and having no DLL to attach would be a plus. I am willing to learn but the lack of knowing where to start is a real hindrance.
From my point of view the 30 day trial is great but since I have no real place to start. it tricles away without ever giving me a reason to do anything about it.
From all the reviews and comments from most users it seems to be a great tool, so obviously I have to see the light.

bert mercier
Haakon 8o)


David Gwillim

Paul,

The tutorial was easy to understand, but it did trigger an idea about the way that Firefly displays project elements. In the Code display Would it be possible to mark those items in the drop-down lists that had code entered in them - say with a color change or even a simple astersk - so that you could immediately see what messages were being handled for what controls?

Doing this would immediately help a great deal in terms of mentally being able to survey the project 's code structure.

Dave

William Burns

Quote from: David GwillimHi Paul,

... In the case of Firefly SDK programming, it's going to be necessary to be able to look at the drop down list of message handlers and KNOW which ones I have to use WHEN! Perhaps even a simple context sensitive help expressing this aspect would help not only me, but other potential Firefly SDK programmers.

What do you think?

Dave

Dave, you may know this already, but if you have downloaded the Win32API.hlp files and set them up in FireFly, then you can select any of the messages from the pull down list and then press F1.  Paul has set it up so that if your cursor is not on any other words it will pull up the help describing that message event.  (nice touch)

For example, if I pull down the message list and select WM_SIZE and then press F1, the help will open up to the WM_SIZE page that tells you "The WM_SIZE message is sent to a window after its size has changed." and it shows how to use it.   If you want more help choosing the correct message, you can also click on the group button at the top of the help page and it will list all the WM_ messages and you can click on any of them to see what they do.

If you have not already downloaded and setup the Win32 Api help files, you can get them several places like:

//www.PowerBASIC.com/files/pub/mstools/win32.zip
ftp://ftp.borland.com/pub/delphi/techpubs/delphi2/win32.zip

I have been programming for 20+ years and I still use those API help files on a daily basis.  :)

Roger Garstang

Hey Paul,

Yeah, the initial switch over was a little different, but you did an awesome job.  I just saw the announcement for 1.04 and just the speed of your improvements on this project made me click the Buy Now button instead of waiting for the OK on my Demo to enable.  Just purchased and put my key in...now it is time to make some real apps!

This is also now my official forum.  I'm now working on converting all my DDT code over.  There is mostly just sizing and placement issues and a few controls like trackbars and statusbars not going over, but they are a breeze with your tools.

Just one suggestion-  When XP Theme Support is turned off, the form image doesn't reflect it and shows XP style buttons, etc.

TechSupport

Hi Roger,

Great to have you aboard. :)

If you notice any problems then be sure to report them. I am compiling a list of things that need tweaking, so keep 'em comin'.