Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Breaking a big project up.
Message
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00335380
Message ID:
00335639
Views:
17
>I understand your procudure but I'm missing the purpose.

In my experience, an excluded form will not be able to find a needed class that is only provided compiled into an APP or EXE. Therefore, you need to provide all classes used by your excluded forms separately. I normally provide my classes in a "Classes" folder, and include that folder in my VFP SET PATH command. So, if you exclude all those classes from the project, just provide the VCX and VCT separately. As long as the classes are in a folder that is part of your SET PATH, your forms, APPS, and EXEs will be able to find them. The only gotcha I can think of is VFP stores relative pathing in forms and classes. I have a PRG that will open all my VCX and SCX files and replace all CLASSLOC fields with justfname(Classloc).

>When you exclude a form from a project, any classes that form uses must be
provided separately [effectively excluding those classes from the project
as well]. For simplicity, you may just want to exclude all forms and
classes from he project.

>
>I am excluding forms from the main executable, but some classes for that form are used else where in the executable.
>
>What I do is put all my forms in a Forms sub-folder under my APP folder. I
place all my classes in a Classes sub-folder under my APP folder as well.
IN my MAIN PRG, I have a SET PATH statement that includes these sub-folders.
>

>This is good, I have this set up too so that I don't get confused. I also have sub - directories to break up which forms are included for each app.
>
>When I get ready to run the setup wizard I have a SetupWiz folder where I re-create
my folder tree and put any APPs, EXEs, BMPs, ICOs, etc., including copies
of all my form [SCX, SCT] and class files [VCX, VCT] in their respective
sub-folders. I then run a PRG that will strip all the Method code from
these copies. e.g.:
>
cd c:\MyApp\SetupWiz\Classes
>lnRetVal = adir(aClasses, "*.VCX")
>for i = 1 to lnRetVal
>   lcClass = aClasses(i,1)
>   use (lcClass) excl
>   repl all methods with ""
>   pack memo
>   pack
>   use
>endfor
If you have any code you want to protect in the DBC, you can also open the
DBC as a table and remove the un-compiled code from the record that has
StoredProceduresSource as the ObjectName [should be the 3rd record]. The
actual code is in the CODE field. Remember to only do this on a copy of the
DBC or at least have the code stored in a separate file. You might want to
open the database exclusivley [open data mydbc excl] first and issue a
compile database mydbc before removing the SP code.
>

>
>Why do I strip out all method code?

Because anyone can then open the SCX or the VCX and browse through all the Methods fields and see all your code. The Methods field contains all your un-compiled code. The compile code that runtime uses is in the ObjCode field. That is why I replace all methods with "" for all the SCX and VCX files that I distribute. I, of course, never do this to my working copies of forms and classes. Well, actually, I did once. Thank goodness for backups. :)

use myclass.vcx && or use myform.scx
set filter to not empty(methods)
browse
*-- then double-click on any record's Methods field. There is your code.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform