FireFly Visual Designer for FreeBASIC (Updated March 8, 2016)

User projects written in or related to FreeBASIC.
Post Reply
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

John Spikowski wrote:Have you thought about doing a version of FireFly for BCX?
No, I have not. I'll get FF3 working perfectly for FreeBASIC first before I entertain any further languages. :-)
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

FireFly will fail for programs compiled using the latest sources:
http://www.freebasic.net/forum/viewtopic.php?t=15823

The problem is my use of EnumChildWindows which worked in the earlier version of the compiler that I had been using but caused a crash in later versions.

I have fixed this problem along with all of the other crashing problems. Spent a good 8 hours yesterday finding all of the problems. Kind of embarrassed that I had let so many problems creep into the source!

I'll have a new upload available very soon.
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Post by John Spikowski »

PaulSquires wrote:
John Spikowski wrote:Have you thought about doing a version of FireFly for BCX?
No, I have not. I'll get FF3 working perfectly for FreeBASIC first before I entertain any further languages. :-)
Are you using your PB version to generate FB source or is FF3 a rewrite in FB?

James Fuller will be happy as well that MAYBE is still an option. ;-)
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

This is the PB version generating the FB source. I couldn't bare to rewrite the entire designer in FB at this point. :-) Many thousands of lines of code....I get tired just thinking of how big a chore that would be.

I have already spoken with James regarding this last week.
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Original post has been updated. FF3 has been updated to 3.09. I am much happier now with the program's performance (no more crashes). As always, if you notice anything out of the ordinary then please let me know.
dasyar
Posts: 372
Joined: Dec 04, 2008 15:31

Post by dasyar »

I decided to give your program a test run, looks impressive so far. Although, there are a couple of annoyances; once you install, and do the initial setup, you should not have to redo the setup every time you start the program. I noticed on the initial setup window, the location of FBC is not there on your next program start up. If you minimize the program window, and then exit the program, I would expect that the next start up would be with a minimized window. Theses are just a couple of things that I noticed for right now, maybe I am to picky?

I will probably be trying to make Myterm.bas into a GUI using your program. Does FF3 have any of the COMxx port selections automated with a standard function call, or do I have to code that? I guess an example would be, the Visual C# does it?

Thanks for the neat program!
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Hi dasyar

Sounds like the location where you installed FF3 does not have write permissions. When you installed, did you choose the "Local" or "My Documents" install.

If you choose "Local" then the files that need write access (Code Library, Settings, Projects) get located immediately off of your install folder. If you choose the "My Documents" option then the write files get copied to folders located in your "My Documents" folder.

A situation where you will run into trouble is if you choose a "Local" install but you install to "Program Files". Doing so instructs FF to put the files that need write access off of your FF installation folder in "Program Files". Because the "Program Files" folder is write protected because of Windows security then the saving of the compiler settings, windows positions, etc... will fail.....epic fail.
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Does FF3 have any of the COMxx port selections automated with a standard function call, or do I have to code that?
FF3 does not have any built-in functionality for that sort of thing. Sorry.
dasyar
Posts: 372
Joined: Dec 04, 2008 15:31

Post by dasyar »

I guess I forgot to mention that I am running Windows 7 64-bit. I had to load it in the Program Files (xx86) folder, any other place, and it really gets tricky as to how the program will function. But, I guess it is a bit tricky right now, maybe I will have to live with what I got, unless of course you will be offering up a 64-bit version.

Will you making any other improvements to the program, or is this the final product?
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Hi dasyar,

There is nothing wrong with installing to Program Files (32-bit vs 64 bit doesn't matter).

When installing, you are given the option to select an install folder. Select something like: C:\Program Files\FireFly Visual Designer which I believe is probably the default choice.

A couple of screens later you are presented with "additional tasks" such as creating a shortcut and/or quick launch icon. Below that is a set of two option buttons. By default, the option to "Install to the FireFly installation folder". You need to select the first option, "Install to the user's "My Documents" folder.

Please see this screenshot: http://www.planetsquires.com/files/additional.png

Hope this helps.

Oh, and this is just the beginning for FF3 with FreeBASIC. I hope to continue to expand the program and make it better.
dasyar
Posts: 372
Joined: Dec 04, 2008 15:31

Post by dasyar »

I implemented your suggestions, and it now works, as intended. Is there a tutorial or something, that gives some explanation as how FF3 is supposed to be used. By used I mean, how do you get stuff to get displayed into a text frame, as one example?

As I mentioned in the other post, I started to build 'MyTerm' GUI program. In FB I code something like this:

Code: Select all

'Check for input
  while Loc(1) > 0
     buffer = input$(loc(1),#1)
     print buffer;             'Prints character to the screen
  wend
So, how do I get the contents of 'buffer' to get passed to the text frame? And, probably what I will want to do is capture the keypress in the text frame, and pass it out to the com port. For now It will suffice to get some incoming characters passed to the text frame.

I created a text frame, and renamed it to serialIO, now I can not figure out how to get the text passed to serialIO. It would be nice if you had a PDF for the detailed information.
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

FF3 comes with a help file (in chm format). It would be impossible for me to document every Windows control (well, not impossible but highly impractical). All of the documentation already exists for how to program with the various Windows controls.

Check out:

http://msdn.microsoft.com/en-us/library ... S.85).aspx

Older version of Win32 Help file:
http://www.powerbasic.com/support/downl ... /Win32.zip

Lots of resources on the Net with how to create ListBoxes, TextBoxes, CommandButtons, Frames, Labels, etc.....

Also, FF3 has hundreds of built in functions that make interacting with controls easier.

In your case you probably should use a multiline textbox or a listbox to handle the displaying of the text.
Leonheart
Posts: 82
Joined: Nov 20, 2007 9:08
Contact:

Post by Leonheart »

Impressive!! Superb!! XD
Did you working on this alone without team member? o.o?
PaulSquires
Posts: 999
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Leonheart wrote:Did you working on this alone without team member? o.o?
All by myself.... over the course of several years! :-)

A good friend from Norway designed the icons for me.
Rens
Posts: 256
Joined: Jul 06, 2005 21:09

Post by Rens »

Hi Paul,

Excellent work!

When compiling a test project which loads a backbitmap on a form i get this error message:
Error 3::EXPECTED END-OF-LINE, FOUND 'LOCAL' IN 'LOCAL FLY_HPICTURE as long
Contents of _compilelog.txt:

Code: Select all

FreeBASIC Compiler - Version 0.21.0 (06-15-2010) for win32 (target:win32)
Copyright (C) 2004-2010 The FreeBASIC development team.
Configured as standalone
objinfo enabled using C BFD wrapper

compiling:    CODEGEN_PROJECT2_MAIN.bas -o CODEGEN_PROJECT2_MAIN.asm
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_UTILITY.inc(171) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(36) error 3: Expected End-of-Line, found 'Local' in 'Local FLY_hPicture As Long'
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(37) error 41: Variable not declared, FLY_hPicture in 'FLY_hPicture = LoadImage( App.hInstance, "IMAGE_EFFEKT", IMAGE_BITMAP, 0, 0, 0 )'
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(37) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(56) warning 1(1): Passing scalar as pointer, at parameter 1 of CREATEPATTERNBRUSH()
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(174) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(177) warning 1(1): Passing scalar as pointer, at parameter 1 of DELETEOBJECT()
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(292) warning 4(1): Suspicious pointer assignment
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(293) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(331) warning 4(1): Suspicious pointer assignment
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(399) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(404) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(430) warning 4(1): Suspicious pointer assignment
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(481) warning 4(1): Suspicious pointer assignment
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(507) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(570) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(577) warning 5(0): Implicit conversion
C:\Program Files\FireFly Visual Designer\Projects\Project1\release\CODEGEN_PROJECT2_FORM1_FORM.inc(582) warning 5(0): Implicit conversion
CODEGEN_PROJECT2_MAIN.bas(165) warning 2(1): Passing pointer to scalar, at parameter 1 of FF_WINMAIN()
CODEGEN_PROJECT2_MAIN.bas(165) warning 2(1): Passing pointer to scalar, at parameter 2 of FF_WINMAIN()
CODEGEN_PROJECT2_MAIN.bas(282) warning 5(0): Implicit conversion
CODEGEN_PROJECT2_MAIN.bas(291) warning 14(0): Function result was not explicitly set
CODEGEN_PROJECT2_MAIN.bas(309) warning 5(0): Implicit conversion
CODEGEN_PROJECT2_MAIN.bas(344) warning 4(1): Suspicious pointer assignment
CODEGEN_PROJECT2_MAIN.bas(366) warning 2(1): Passing pointer to scalar, at parameter 3 of SENDMESSAGE()
CODEGEN_PROJECT2_MAIN.bas(368) warning 2(1): Passing pointer to scalar, at parameter 3 of SENDMESSAGE()
CODEGEN_PROJECT2_MAIN.bas(389) warning 5(0): Implicit conversion
CODEGEN_PROJECT2_MAIN.bas(395) warning 5(0): Implicit conversion
CODEGEN_PROJECT2_MAIN.bas(432) warning 3(1): Passing different pointer types, at parameter 3 of MAPWINDOWPOINTS()
This error is due to using:

Local FLY_hPicture As Long

in file: CODEGEN_PROJECT1_FORM1_FORM.inc

This must be:

Dim FLY_hPicture As Long

I can make the change by hand but it would be nicer when this is done by firefly itself.

PS:
I don't mind all of those warnings but some will.
I usually try to avoid any warning by using cast, setting all function results, etc, etc.
Post Reply