Of about 11 utility programs that I had under FF2, only 2 converted and compiled without any problems. Most report a problem with the RES file. A few others report a different problem, and I'll deal with those separately.
I'm not having any problem compiling and running FF3 examples, so I know FF3 is OK and that it's my projects that need re-organization. SO, I'm tying to understand what to look for, which files FF3 expects where...
Before FF3, my programming environment was organized:
E:\Program Files\PS JellyFish and FireFly2
E:\PBWIN (in sub-folder BIN) PB9 compiler, resource compiler, other such tools
E:\WIN32API Win32API.inc, my own Include files, and others from forums
E:\ProjWIN my projects; one sub-folder per project, with ALL files in that one folder
(.frm, .rc, .ico, etc.)
It seems to me that FF3 changes some of that structure/organization, as well as some FF2 coding style that I had developed:
1. The new FF3 Function Library and old .INC files:
Under FF3, can I just leave my .INC files as they were and where they were, insert the same old-style "#INCLUDE ONCE xxx" statements somewhere, and invoke the routines as in the past with FF2? Or is that not feasible?
In order to have easy access to those routines while coding, I'd like to get them into the Function Library. It seems that, in order to make those routines visible in the Function Library (making FF3 projects easier to code), I will have to divide the .INC file into an individual .INC file for each "atomic" routine... Is this true?
(In a separate thread, I've raised questions about separating other .INC items such as DECLAREs, GLOBALs, #IF NOT %DEF statements, etc. No need to duplicate those details here.)
2. Under FF2, at the top of my Main Form's code, I used to put various Equates, Macros, TYPEs, GLOBALs, etc.
Can I leave those statements where they are, or does FF3 expect them to be elsewhere?
3. Should I gather up all my .ICO files from all projects into the Image tool?
4. After conversion to FF3, the Project file for some projects is named "Project1.ffp". Can I simply rename that file from outside FF3, or is it synchronized internally anywhere? How do I fix the filename without screwing up anything else?
5. In other threads, I read that the FF2-to-FF3 conversion moves certain files from old locations to one of the new sub-folders. Which files are affected, and how can I tell?
I'm sure that once I understand these issues, I'll be able to straighten out all the projects.
Thanks!
-John
Quote from: John Montenigro on November 21, 2009, 08:52:18 PM
Of about 11 utility programs that I had under FF2, only 2 converted and compiled without any problems. Most report a problem with the RES file. A few others report a different problem, and I'll deal with those separately.
Most RES errors are the result of the resource compiler not being able to find an icon or bitmap file. Open up the CODEGEN*.rc file in a text editor and look for references to icons or bitmaps to see if the paths are correct.
Feel free to send me any of your projects that you're having trouble with and I will explain why they did not convert cleanly.
Quote
1. The new FF3 Function Library and old .INC files:
Under FF3, can I just leave my .INC files as they were and where they were, insert the same old-style "#INCLUDE ONCE xxx" statements somewhere, and invoke the routines as in the past with FF2? Or is that not feasible?
Sure you can. However, in FF3 the best place to put your #INCLUDE statements would be in the new FF_AppStart special message handler. That's where I always put mine now.
Quote
In order to have easy access to those routines while coding, I'd like to get them into the Function Library. It seems that, in order to make those routines visible in the Function Library (making FF3 projects easier to code), I will have to divide the .INC file into an individual .INC file for each "atomic" routine... Is this true?
Yes that is correct. However, if your routines are many and intermixed (ie. one routine depends on another) then sometimes it is just as easy to #INCLUDE the file in your project rather than put them all in the Functions Library.
Quote
(In a separate thread, I've raised questions about separating other .INC items such as DECLAREs, GLOBALs, #IF NOT %DEF statements, etc. No need to duplicate those details here.)
The Function Library is geared towards standard one of type of functions. Functions that are more or less standalone. Introducing equates and globals kind of violates this principle. Not to say that it won't work, but it certainly complicates the process. The problem is that there is no common place in the Functions Library to put globals and equates. You would have to put them in one of your functions.
Quote
2. Under FF2, at the top of my Main Form's code, I used to put various Equates, Macros, TYPEs, GLOBALs, etc.
Can I leave those statements where they are, or does FF3 expect them to be elsewhere?
Yes, you can leave them there. Personally, I put all of my Equates, Types, Globals, etc... into a Module rather than put them in a Form file.
Quote
3. Should I gather up all my .ICO files from all projects into the Image tool?
No, not for
all projects. Each project would have its own set of icons/bitmaps. They should be placed in the "\images" folder for that particular project.
Quote
4. After conversion to FF3, the Project file for some projects is named "Project1.ffp". Can I simply rename that file from outside FF3, or is it synchronized internally anywhere? How do I fix the filename without screwing up anything else?
You should be able to simply rename the *.ffp project files. That will not cause any problems.
Quote
5. In other threads, I read that the FF2-to-FF3 conversion moves certain files from old locations to one of the new sub-folders. Which files are affected, and how can I tell?
Well, take a look at the new folder structure and see what files are placed in each. It is somewhat obvious that Forms go in the "\Forms" folder, Modules go in the "\Modules" folder and images go in the "\Images" folder. Make sure that if your application depends on any external DLL's (eg. SQLitening, SQL Tools, etc...) that you put them in the "\Release" folder - you do that because the EXE resulting from your compiled project will be in the "\Release" folder.
Excellent! Thanks so much for the explanations, Paul! I feel pretty confident I can work out the kinks now.
I'll try tackling one or two projects tomorrow before the Pats kick off at 4pm... I'll let you know how things go. (with my setup, of course - you won't need me to tell you how things go with the Pats!)
OMG !!!! Don't tell me you're a Pats fan!!!!!! :D
I'm a Dolphins fan....
(My brother was a Pats fan when we were real young so I've always had it against the Pats).
Oh no! :-\
I had no favorite teams until I moved to the Boston area in 1983, and I watched in fascination as the Pats continually snatched defeat from the jaws of victory. It was like watching a car wreck in slow motion.
I moved to NJ in 1989, and had no attachement to the Giants or Jets. Then ironically the Pats got Parcels and turned things around. Bellicheck has continued to do good things. So now I'm still a Pats fan, just a lot happier.
The Dolphins have always been a good team (until recently), and I've always held them in high regard. I miss seeing Marino pull off 4th quarter upsets.
So, no worries, I'm a fan, not a fanatic. I usually remember the flow of the game, but rarely the scores. As long as it's played with passion and professionalism, I just enjoy a good game of football.
This is the game that turned me from the Patriots forever: http://en.wikipedia.org/wiki/Snowplow_Game
I remember it like it was yesterday. :)
Marino is still my favorite player ever. The Dolphins have had a rough time ever since he retired.
It is funny though that I am a Dolphin fan and not a Pats fan because in every other major sport I am a Boston fan (Celtics, Bruins, Red Sox). Strange.
Wow! I had no idea. That was a few months before I went to Boston, and I just never knew about it.
I was about 6 when the Dodgers moved out of Brooklyn, and heartbroken, I lost interest in all sports until High School, when I played 2-hand touch - so to this day my only sports interest is football, but I don't follow player's careers or stats, or team histories...
The only game that I recall the score: Pats win at Jets 21-16, December 2003.
http://web.archive.org/web/20070809184550/http://www.nfl.com/gamecenter/recap/NFL_20031220_NE@NYJ (http://web.archive.org/web/20070809184550/http://www.nfl.com/gamecenter/recap/NFL_20031220_NE@NYJ)
My wife got us tickets at Giants Stadium (in the Jets section), in the below-freezing, windy night. More extraordinary than the fact that she planned this and attended - it was our anniversary, and that's how she wanted to celebrate! What a woman!
Boston's a great place and has had colorful teams, so I understand your being a fan in the other sports. Are you from the area?
(I've written this over the past 4 or 5 sets of commercials - the Pats are ahead 0-7, but they've made a few mistakes that have me on edge...
OK, 1st quarter is over, Wes Welker is making Brady look great, it's 1st and goal at the 5, TOUCHDOWN to Moss! 0-14!
So no more computer - back to the game! Talk with you later tonight...)
Halftime question:
This is what my .RC file contains. It compiled OK under FF2.
Do I need to change anything, or put statements into some other place?
//To compile the PBR, remove the comment slashes from the following line
//#include "resource.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,1
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
//FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
FILEFLAGS 0x0
FILEOS VOS__WINDOWS32
//FILETYPE VFT_DLL
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" //US English, Multilingual
// BLOCK "040904B0" //US English, Unicode
BEGIN
VALUE "CompanyName", "JMCC, LLC.\0"
VALUE "FileDescription", "DCC Utilities\0"
VALUE "FileVersion", "0.0.0.1\0"
VALUE "InternalName", "DCC-Utils\0"
VALUE "LegalCopyright", "Copyright © 2008, John H. Montenigro. ALL RIGHTS RESERVED.\0"
// VALUE "LegalTrademarks1", " "
// VALUE "LegalTrademarks2", " "
VALUE "OriginalFilename", "DCC-Utils.exe\0"
VALUE "ProductName", "DCC Utilities\0"
VALUE "ProductVersion", "1.0\0"
VALUE "Comment", "a mixed bag for Model Railroaders...\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 0x4E4 //US English, Multilingual
END
END
OK, I've got one of the larger projects compiling fine under FF3.
1. In the Environment Options (compiler PB9), I need to better understand what
"RC INCLUDE PATH" expects to find. I tweaked a lot and got it working, but I'm still not clear...
2. I dropped my .RC from the project and turned on FF3's VERSION INFORMATION.
3. The FF2-to-FF3 conversion created the following line:
#INCLUDE "..//modules//EGRID32PRO.INC"
The CODEGEN...rc file showed it was translating to:
#INCLUDE "..EGRID32PRO.INC"
So I removed the "..//modules//" and hardcoded:
#INCLUDE "EGRID32PRO.INC"
4. I gathered my INCLUDEs, DECLAREs, TYPEs, and GLOBALs from all around the project and moved them to FF_AppStart
5. I got rid of the old "User_Includes.inc" from FF2
Observations:
A. I noticed that on one form, it seems that the FF2/FF3 conversion changed the Back-to-Front setting of the last control that had been added to the form. While it was easy to fix, I thought you should know.
B. Under FF2, I had been able to open a particular form and programmatically set the FOCUS to a particular button control. If the user pressed ENTER, that button fired and all was fine. (Optionally, the user could click with mouse, and all was fine.)
But now under FF3, I cannot seem to get the use of the ENTER key to operate the same as is did under FF2. I can get the mouse operation to work, but not the ENTER key. Actually, it's only AFTER the button is clicked once via the mouse, THEN the ENTER key works as it should.
I'm using:
FF_Control_SetFocus (HWND_FRMSPEEDCALC_CMDBTNSTARTTIMER)
C. I now appreciate the use of the new FF3 "run the last compiled EXE" button! A number of times I just wanted to see how the EXE was CURRENTLY working... Nice!
D. I REALLY appreciate the bottom tab bar (I do wish it were a bit more visible and accessible), epecially the Project Notes/Tasks! I have always used 'ToDo: in my code, and they are all gathered in one place for me to work thru!
E. I REALLY REALLY REALLY REALLY appreciate the new Search/Replace that lets me change text across the "entire project"!!!!! Saved me tons of time when I realized that I had forgotten to prefix a Global variable name with "g". Took literally one second, instead of 5 to 8 minutes. (This project has 8 forms with LOTS of code.)
Paul, FF3 is awesome! At first I wasn't too thrilled at having to convert everything, but now I'm seeing lots of time-savings with the new features. It's totally worth it!!! Thanks!
In my FF2 projects, I used .RC files mostly for version info, and in FF3 I've switched to using FF3's Project Properties/Version panel.
However, in one .RC file, I had the following lines:
sndButton WAVE E:\PBWin9\WinAPI\Button.wav
sndSuspend WAVE E:\PBWin9\WinAPI\Suspend.wav
sndResume WAVE E:\PBWin9\WinAPI\Resume.wav
Where do I put them in FF3?
Quote from: John Montenigro on November 26, 2009, 12:02:36 AM
Where do I put them in FF3?
"Project", "Add Resource File"
Simply add those three lines to the resource file that you add to the project. During code generation, FF3 takes all of the user defined resource files and merges it with the primary resource file that FF itself creates. in the end, the result is just one rc file that gets compiled to a RES by the Microsoft Resource Compiler and finally to a PBR by the PB Resource Compiler.
Thanks Paul, I had added a Module instead of Resource file... Doh!
Paul, I'd like to go back to 3 items from message #8:
3., A., and B.
Should we review them in this thread, or start a new thread for each?
Happy Thanksgiving!