Author: Michael Babcock, mbabcock@kepro.org
Posted: 1999-10-08 13:52:24 Link
Paul,
That's what I kind of thought but ruled that out after reading Ed's reply. But then again, I'm not well today (sick) so I'm somewhat in the fog. I need
the weekend <g>.
So can I do this on the fly programmatically, or am I limited to having to use
the GUI development? I would think I should be able to do it in code, but the
DEFINE CLASS helpdoc makes me wonder how I alter an existing object's method. I'm not adding an object, because it's already there. So how I address this? --Mike
>>> "pmcnett@pcs-blc.com" 10/08/99 01:15pm >>>
On 8 Oct 99, at 12:28, Michael Babcock wrote:
> It's from a vcx using CREATEOBJECT(), not an .scx subclassed form. (Or do
> I misunderstand you?) --Mike
Mike, .scx's are not classes, but forms that are either subclassed from a vcx
library, or from the VFP base classes.
The fact that you have a your form in a vcx means that all you have to do is
create a new class based on frmdates, put your overriding code in the
appropriate places, and then, instead of issuing CREATEOBJECT("frmdates"),
issue CREATEOBJECT("frmnewdates").
Paul McNett
Computer Consultant / Custom Application Developer
Professional Computer Solutions
Hollister, CA 95023
mailto:pmcnett@pcs-blc.com
********************************
Michael Babcock
KePRO, Inc.
Tel: 717-564-8288
Fax: 717-564-4188
Internet Address: mbabcock@kepro.org
Home Page: http://www.kepro.org
********************************
Author: Ed Leafe, ed@leafe.com
Posted: 1999-10-08 14:09:57 Link
On 10/8/99 1:52 PM, Michael Babcock supposedly said:
>So can I do this on the fly programmatically, or am I limited to having to
>use the GUI development? I would think I should be able to do it in code,
>but the DEFINE CLASS helpdoc makes me wonder how I alter an existing
>object's method. I'm not adding an object, because it's already there. So
>how I address this?
If you are doing this in code, just re-define the method. So if you
have a textbox named "txtBlah" on your form and you want to override its
RightClick() method, you'd add a proc to your define as follows:
PROCEDURE txtBlah.RightClick
{your custom code here}
ENDPROC
If you are creating the forms using the visual tools, just open the
code editing window, select the proper control and method, and add your
code. That's it!
___/
/
__/
/
____/
Ed Leafe
Author: Allan Lindgren, allan_lindgren@starkey.com
Posted: 1999-10-08 14:39:00 Link
Michael,
a method is code and will be compiled prior to run time. You can not
write new code durring run time
the define class is a development code not a runtime code
if you make a procedure file [.prg] with a define class, then if you set
procdure to <myproc>
you can use the define clss when you do createobject(<myclass>)
HTH
Michael Babcock wrote:
>
> Paul,
>
> That's what I kind of thought but ruled that out after reading Ed's reply. But then again, I'm not well today (sick) so I'm somewhat in the fog. I need
> the weekend <g>.
>
> So can I do this on the fly programmatically, or am I limited to having to use
> the GUI development? I would think I should be able to do it in code, but the
> DEFINE CLASS helpdoc makes me wonder how I alter an existing object's method. I'm not adding an object, because it's already there. So how I address this? --Mike
>
[snip]
--
Allan Lindgren
allan_lindgren@starkey.com
If you offer me a penny for my thoughts,
and I give you my two cents worth,
Who gets the change?
Author: Michael Babcock, mbabcock@kepro.org
Posted: 1999-10-08 15:08:28 Link
Well that makes sense; I know that. Man, I'm really out of it today (sick). That's it...no more questions today....time for nappy.... <g>.
>>> "allan_lindgren@starkey.com" 10/08/99 02:55pm >>>
Michael,
a method is code and will be compiled prior to run time. You can not
write new code durring run time
the define class is a development code not a runtime code
if you make a procedure file [.prg] with a define class, then if you set
procdure to <myproc>
you can use the define clss when you do createobject(<myclass>)
HTH
Michael Babcock wrote:
> > Paul,
> > That's what I kind of thought but ruled that out after reading Ed's reply.
But then again, I'm not well today (sick) so I'm somewhat in the fog. I need
> the weekend <g>.
> > So can I do this on the fly programmatically, or am I limited to having to
use
> the GUI development? I would think I should be able to do it in code, but
the
> DEFINE CLASS helpdoc makes me wonder how I alter an existing object's
method. I'm not adding an object, because it's already there. So how I
address this? --Mike
> [snip]
-- Allan Lindgren
allan_lindgren@starkey.com
If you offer me a penny for my thoughts,
and I give you my two cents worth,
Who gets the change?
********************************
Michael Babcock
KePRO, Inc.
Tel: 717-564-8288
Fax: 717-564-4188
Internet Address: mbabcock@kepro.org
Home Page: http://www.kepro.org
********************************