Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiled Project to .APP doesn't seem to include forms?
Message
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00745080
Message ID:
00745289
Views:
26
>1. If you have open project (modify project), then do you see forms there MARKED as included?

Yes

>If you build the app_name.APP, do you get app_name.ERR file?

No

>2. Where do you get an err message: when calling the form from app? Or are you trying to call the form from EXE (that certainly does not have those forms included)?

I call the .APP from the .EXE. The exe calls the form by using a custom method that I created in my main application object (goApp). The application object is a .VCX which is included in the .EXE. I instantiate the application object in my .EXE with the following code:

SET CLASSLIB TO uapp ADDITIVE
goApp = CREATEOBJECT("Application")

Where goApp is a public variable and uapp is a .VCX with my application code in it. I know that my custom method in goApp works when I include the source code for the forms with my distribution. But, if I don't include the .SCX form files with my distribution than I get the error message that the .SCX file does not exist. But, I shouldn't need it since it should be included in the compiled .APP file.

I thought maybe it would help if I included the uapp.vcx file in my project for the .APP, but that didn't seem to help anyway because it is instantiated from the .EXE so it shouldn't matter.

Thanks again for your help.

Sincerely,
Don

>Ok, perhaps we are talking about different issues.
>
>1. If you have open project (modify project), then do you see forms there MARKED as included? If you build the app_name.APP, do you get app_name.ERR file? If so, what is inside?
>If you do not have err file, and forms are MARKED as included in the project, then you need to correct your code.
>
>2. Where do you get an err message: when calling the form from app? Or are you trying to call the form from EXE (that certainly does not have those forms included)?
>
>
>
>>Yuri,
>>
>>That is the problem. The files are in the project already, yet when I compile the project to an .APP and then distribute it, that's when I get the error message.
>>
>>That is what makes this so baffling. The form files are included in the project and yet once it is compiled they seem to dissappear (At least I get the File Does Not exist message anyway)?
>>
>>Sincerely,
>>Don
>>
>>>Usually EXTERNAL command works. But if not, then all what you need to do is:
>>>-modify project (to open it)
>>>-add manually forms to the project if they are not there.
>>>-build exe
>>>
>>>>Thanks again Yuri. I tried the syntax that you gave me and unfortunately it's still not working. The form file is not in the defa dir but it is in the path dir when I compile the .APP.
>>>>
>>>>If I supply the enduser with all the source code than it works fine. The problem is that I have to deliver it compiled only so I can't give them the .SCX form file.
>>>>
>>>>Any other thoughts you might have would be greatly appreciated.
>>>>
>>>>Thanks,
>>>>Don
>>>>
>>>>>Should be:
>>>>>
>>>>>EXTERNAL FORM (FILE_NAME.scx)
>>>>>
>>>>>Also the file should be in the defa or path directories.
>>>>>
>>>>>>I tried adding this line to the MAIN.PRG program:
>>>>>>
>>>>>>EXTERNAL FORM form1
>>>>>>
>>>>>>But, it was no use. I'm still getting the file does not exist error. Any other ideas?
>>>>>>
>>>>>>Thanks,
>>>>>>Don
>>>>>>
>>>>>>>Thank you so much, I'll check out the help file on the EXTERNAL command. That sounds like what I need.
>>>>>>>
>>>>>>>Thanks,
>>>>>>>Don Knoup
>>>>>>>
>>>>>>>>Add to main.prg a line EXTERNAL FORM.... to alert the project. See VFP HELP on EXTERNAL command for more details
>>>>>>>>
>>>>>>>>>I have a project file with several forms in it. (All forms are marked to be included in the project) I build this project into an Application file. This .APP file is called by another VFP .EXE program.
>>>>>>>>>
>>>>>>>>>When the .APP is called it fires off my MAIN.PRG and based on whichever parameter is passed it should open the appropriate form. This worked fine when my MAIN.PRG looked something like this:
>>>>>>>>>
>>>>>>>>>...
>>>>>>>>>DO CASE
>>>>>>>>> CASE lcParameter = 'Form1'
>>>>>>>>> DO FORM form1
>>>>>>>>> CASE lcParameter = 'Form2'
>>>>>>>>> DO FORM form2
>>>>>>>>>...
>>>>>>>>>
>>>>>>>>>I decided to change the way that I called forms so that I could control them better. I have a method in application object does the "DO FORM" as well as some other stuff every time a form is opened.
>>>>>>>>>
>>>>>>>>>I change my MAIN.PRG program code to look more like this:
>>>>>>>>>
>>>>>>>>>...
>>>>>>>>>DO CASE
>>>>>>>>> CASE lcParameter = 'Form1'
>>>>>>>>> goApp.m_opnform("form1.scx","",-1,.F.)
>>>>>>>>> CASE lcParameter = 'Form1'
>>>>>>>>> goApp.m_opnform("form2.scx","",-1,.F.)
>>>>>>>>>...
>>>>>>>>>
>>>>>>>>>Now when I compile the project to the .APP file it seems the FORM1.SCX, etc. are not included. I get an error message in my compiled application when it is run that says "FILE c:\myprg\form1.scx does not exist". (Obviously, I don't want to distribute the .SCX form with my compiled system. How can I get the project to include the form when it is compiled?
>>>>>>>>>
>>>>>>>>>Thanks in advance for your help!
>>>>>>>>>
>>>>>>>>>Sincerely,
>>>>>>>>>Don Knoup
>>>>>>>>>US Software, Inc.
Don Knoup
don.knoup@ticomix.com
Ticomix, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform