| Author |
Add o modify function or procedure in a defined custom class
|
|
|
| We can add or remove property from an object. Is there a way to add function
or procedure to a custom class after it is defined?
Thanks.
| |
| Anders Altberg 2005-05-13, 7:24 am |
| No can do. Use EXECSCRIPT to run adhoc code.
-Anders
"Peter" <Peter@discussions.microsoft.com> wrote in message
news:1B9C646C-9BAF-47C4-A66A- DE63B2804656@microso
ft.com...
> We can add or remove property from an object. Is there a way to add
function
> or procedure to a custom class after it is defined?
>
>
> Thanks.
| |
|
| Hi Anders,
Is it possible to use EXECSCRIPT to run Define Class coding?
Thanks.
"Anders Altberg" wrote:
> No can do. Use EXECSCRIPT to run adhoc code.
> -Anders
>
> "Peter" <Peter@discussions.microsoft.com> wrote in message
> news:1B9C646C-9BAF-47C4-A66A- DE63B2804656@microso
ft.com...
> function
>
>
| |
| Anders Altberg 2005-05-14, 7:24 am |
| No problem. All the code in the ExecScript will execute. The problem is that
the object disappears totally once that's done.
Why do you need to invent ad hoc, unplanned code?
"Peter" <Peter@discussions.microsoft.com> wrote in message
news:3D0DDC80-F8AB-4C0D-A6C1- 7D1D7293306A@microso
ft.com...[color=darkred]
> Hi Anders,
>
> Is it possible to use EXECSCRIPT to run Define Class coding?
>
>
> Thanks.
>
>
>
> "Anders Altberg" wrote:
>
| |
|
| Hi Anders,
You're right that the Execscript will execute but the object disappears
right away.
The reason that I want this is because:
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. I'm
hoping that VFP has some ways to add functions and procedures like the
addproperty().
I have also posted another thread "call a prg within define class to add
additional..." to see whether I can solve my problem using that way.
Thanks,
Peter
"Anders Altberg" wrote:
> No problem. All the code in the ExecScript will execute. The problem is that
> the object disappears totally once that's done.
> Why do you need to invent ad hoc, unplanned code?
>
> "Peter" <Peter@discussions.microsoft.com> wrote in message
> news:3D0DDC80-F8AB-4C0D-A6C1- 7D1D7293306A@microso
ft.com...
>
>
| |
| Anders Altberg 2005-05-15, 9:23 am |
| You can build class libraries from exisitng libraries with CREATE CLASS and
ADD CLASS
-Anders
"Peter" <Peter@discussions.microsoft.com> wrote in message
news:60AA5E4F-9AEB-47AA-B3FE- A7752C1B7DFE@microso
ft.com...
> Hi Anders,
>
> You're right that the Execscript will execute but the object disappears
> right away.
>
> The reason that I want this is because:
>
> 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[color=darkred]
> not good since App2 does not need it when it is running by itself. I'm
> hoping that VFP has some ways to add functions and procedures like the
> addproperty().
>
> I have also posted another thread "call a prg within define class to add
> additional..." to see whether I can solve my problem using that way.
>
>
> Thanks,
>
> Peter
>
>
> "Anders Altberg" wrote:
>
that[color=darkred]
add[color=darkred]
|
|
|
|