Using addobject to add say a preprepared custom checkbox class seems to lose
the method code in that class? Is that right?
e.g. I have a class lmcheckboxgrid based on checkbox which has code in the
When and Valid methods. After using addobject to add an instance of that
class inside a grid column, the when and valid methods don't fire. The only
way I can get it to work is to drop the checkbox class into each of the
columns of the grid class which I was hoping not to have to do.

Is this standard behaviour for addobject?

Regards,
Bernie

Re: addobject - loses original class methods? by Olaf

Olaf
Fri May 13 04:49:26 CDT 2005

> Is this standard behaviour for addobject?

I'd bet if you

addobject("name",colmn1)

and afterwards set it visible (although it already
is) with

column1.name.visible = .t.

valid and when will work.

Background info:
Every object instanciated with createobject
or addobject is invisible by default. And in-
visible controls are not enabled and some
events don't fire then.

In the grid controls appear despite of their
visible property set to .f., that's a bug.

Bye, Olaf.



Re: addobject - loses original class methods? by BernieBeattie

BernieBeattie
Fri May 13 07:26:10 CDT 2005

Thanks Olaf. Setting visible did the trick. Strange behaviour though!

"Olaf Doschke" wrote:

> > Is this standard behaviour for addobject?
>
> I'd bet if you
>
> addobject("name",colmn1)
>
> and afterwards set it visible (although it already
> is) with
>
> column1.name.visible = .t.
>
> valid and when will work.
>
> Background info:
> Every object instanciated with createobject
> or addobject is invisible by default. And in-
> visible controls are not enabled and some
> events don't fire then.
>
> In the grid controls appear despite of their
> visible property set to .f., that's a bug.
>
> Bye, Olaf.
>
>
>