Open File for Viewing

Started by RhodyRich, February 19, 2009, 10:15:50 AM

Previous topic - Next topic

RhodyRich

I am converting code from Visual Basic to Firefly. Some of the routines can be simply copied and pasted into Firefly, others require significant changes. I have been opening the file with the Visual Basic code using JellyFish Pro and Alt Tabbing back and forth with Firefly for the copying. It would be nice to be able to simply open the file with the Visual Basic code for viewing with Firefly without adding it to my project. Anyway of doing this?

TechSupport

Use the PowerBasic #INCLUDE statement to include the module in FireFly rather than putting it into FireFly via "Add Module".

The placement of the #INCLUDE is always an issue with FireFly 2 (not with FireFly 3). The easiest solution is to put the #INCLUDE statement in a special text file called "user_includes.inc" that should be located in the same directory as your FireFly.exe file.


RhodyRich

I have not been using the #INCLUDE statements as you suggest with FireFly 2.95 and all seems well. I assume I would know if there was a problem.

My issue was not really about this, it was just porting code from Visual Basic to FireFly. I cannot import the code which is in a VB FRM file directly into FireFly so I copy the routines I need from the VB FRM file which I view with JellyFish Pro and paste it into the FireFly code. Works fine except it requires me to have two editors open. I was wondering if there was a way to open the file in FireFly without adding it to the project so I did not need to use JellyFish Pro.

TechSupport

Ahhh, now I understand. The answer is 'no'. :)

John Montenigro

Quote from: TechSupport on February 19, 2009, 02:13:46 PM
a special text file called "user_includes.inc" that should be located in the same directory as your FireFly.exe file.

Interesting... I thought that user_includes.inc was project-specific, so I customized it for my main (big) project and left it in the subdir that contains all my forms and other project-related files... Seems to work fine.

I haven't used it in other projects; they're pretty small and simple.

TechSupport

Right you are John... it is project specific. You can have multiple "user_includes.inc" - one for each project if you wish. Just place the file where your project is.

I must have been half asleep when I wrote my original post.  :)