|
Home > Archive > FoxPro Help and Support > May 2005 > Re: Call a prg within define class to add additional function or p
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Call a prg within define class to add additional function or p
|
|
| Peter 2005-05-13, 11:24 am |
| Hi Olaf,
I have 2 applications (App1 and App2) which create custom classes which have
same name but App1 has more functions and procedures within those classes.
Now I'm going to have a 3rd application (App3) which can be integrated with
those 2 applications but it needs all the App1 functions and procedures. So,
the App1 and App3 can be run together and App2 and App3 can be run together.
The easiest way is to add all App1 functions and procedures to App2 but it is
not good since App2 does not need it when it is running by itself.
Any suggestion how to design such a system? If there is something like
addproject() for functions and procedures, it will be nice.:-)
"Olaf Doschke" wrote:
> You can only do this with a builder.
> A builder may use commands like
> oClass.READMETHOD and oClass.WRITEMETHOD.
>
> But a Builder works on a class (oClass) that
> isn't instanciated as an object, it works on the
> source code of the class.
>
> I think this is especially not possible with prg
> classes, but I haven't tried that.
>
> Ehy would wou want that? You can extend
> or overload behaviour nicely with BindEvent
> or RaiseEvent and another object.
>
> Bye, Olaf.
>
>
>
| |
| Dan Freeman 2005-05-13, 11:24 am |
| No can do.
Go ahead and add the functionality to app2, but just don't call it. Won't
hurt a thing.
Dan
Peter wrote:[color=darkred
]
> Hi Olaf,
>
> I have 2 applications (App1 and App2) which create custom classes
> which have same name but App1 has more functions and procedures
> within those classes. Now I'm going to have a 3rd application (App3)
> which can be integrated with those 2 applications but it needs all
> the App1 functions and procedures. So, the App1 and App3 can be run
> together and App2 and App3 can be run together. The easiest way is to
> add all App1 functions and procedures to App2 but it is not good
> since App2 does not need it when it is running by itself.
>
> Any suggestion how to design such a system? If there is something like
> addproject() for functions and procedures, it will be nice.:-)
>
> "Olaf Doschke" wrote:
>
| |
|
| Hi Dan,
Yes it won't hurt but this will change the maintenance process of the
applications. App3 is an application which requires frequent upgrades.
App1 is an application which requires upgrade once a year or as necessary.
App2 is an application which requires upgrade once a year or as necessary.
So, if App2 has the App1 functions and procedures, this means there is a
higher probability that all 3 applications need to be upgraded more
frequently. If App3 has the App1 functions and procedures, only App1 and
App3 has higher probability need to be upgraded.
My dilemma is ease of development vs ease of maintenance. For business,
ease of maintenance is important since it lowers company's cost in a long run.
Peter
"Dan Freeman" wrote:
> No can do.
>
> Go ahead and add the functionality to app2, but just don't call it. Won't
> hurt a thing.
>
> Dan
>
> Peter wrote:
>
>
>
|
|
|
|
|