Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Classes Design
Message
 
 
To
19/01/2007 14:02:46
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01187089
Message ID:
01187140
Views:
23
>>>>>Within Project1, execute the command:
>>>>>
>>>>>SET PATH TO "..\aControls\,..\cControls"
>>>>>
>>>>>Fox will then look for a File in Project1, if it cannot find it, it will look for it in aControls, if it cannot find it here as well it will look for it in cControls.
>>>>>
>>>>>Notes:
>>>>>(1) I assume your working folder is Project1.
>>>>>(2) aControls can be a sub-class of cControls if necessary
>>>>
>>>>The way I understood the question and I do not know a simple answer to it is to have a composite class (container based) with some controls (textboxes, labels, etc.) The class should be generic enough to be reused in multiple projects yet have custom look depending on the project (e.g. different label fonts, textbox fonts, etc.).
>>>
>>>I would not try to subclass everything in sight, i.e. making a separate class for every textbox font looks overzealous. Imho, one custom class for each baseclass is a requirement (e.g. mytextbox with few generic methods/properties), and few subclasses can be added on real demand, i.e. when intricated code will be reused.
>>
>>what if you want specific look and feel for one project but still you want use basic functionality from the base class?
>>
>Hi William
>
>This is one of those things that I wish we had a simple way to do. You would need something like a factory class. Theoretically, you'd create a container class. You'd refer to it in the factory's controlling table.
>
>The factory would instantiate that container. You'd also put other controls into the container at runtime. They would be instantiated by a factory too.
>
>The collection of factory records would be similar to the content of an SCX.
>
>There would be no way and possibly no need to put custom code into the final assembly. All custom code would go into the classes referred to in the factory table.
>
>I have experimented with this approach a little and it has promise, but I've not refined it enough to share, yet.
Hi Mike,

your idea sound intersting, do you any link so I can take a look at this in more detail.

Thanks.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform