Página 1 de 1
Question about Classes
Publicado: Mié Oct 04, 2006 10:27 am
por Giuseppe Bogetti
Il Wed, 4 Oct 2006 13:11:20 +0400, Oleg ha scritto:
Oleg,
> Hello!
>
> How can I check in code if some class inherited from defined class?
> (For example, how to check if some Xailer object is TForm instance)
>
> o:=TForm1():New(Application:oMainForm)
> ...
> if IsForm(o) // ???
if ( __objDerivedFrom( o, "TFORM" ) )
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Question about Classes
Publicado: Mié Oct 04, 2006 10:27 am
por Giuseppe Bogetti
Il Wed, 4 Oct 2006 13:11:20 +0400, Oleg ha scritto:
Oleg,
> Hello!
>
> How can I check in code if some class inherited from defined class?
> (For example, how to check if some Xailer object is TForm instance)
>
> o:=TForm1():New(Application:oMainForm)
> ...
> if IsForm(o) // ???
if ( __objDerivedFrom( o, "TFORM" ) )
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Question about Classes
Publicado: Mié Oct 04, 2006 10:28 am
por jfgimenez
Oleg, Giuseppe,
>> How can I check in code if some class inherited from defined class?
>> (For example, how to check if some Xailer object is TForm instance)
>>
>> o:=TForm1():New(Application:oMainForm)
>> ...
>> if IsForm(o) // ???
> if ( __objDerivedFrom( o, "TFORM" ) )
Question about Classes
Publicado: Mié Oct 04, 2006 10:28 am
por jfgimenez
Oleg, Giuseppe,
>> How can I check in code if some class inherited from defined class?
>> (For example, how to check if some Xailer object is TForm instance)
>>
>> o:=TForm1():New(Application:oMainForm)
>> ...
>> if IsForm(o) // ???
> if ( __objDerivedFrom( o, "TFORM" ) )
Question about Classes
Publicado: Mié Oct 04, 2006 10:28 am
por jfgimenez
Oleg, Giuseppe,
>> How can I check in code if some class inherited from defined class?
>> (For example, how to check if some Xailer object is TForm instance)
>>
>> o:=TForm1():New(Application:oMainForm)
>> ...
>> if IsForm(o) // ???
> if ( __objDerivedFrom( o, "TFORM" ) )
A little more easy:
o:IsKindOf( "TForm" )
--
Regards,
Jose F. Gimenez
http://www.xailer.com
Question about Classes
Publicado: Mié Oct 04, 2006 10:28 am
por jfgimenez
Oleg, Giuseppe,
>> How can I check in code if some class inherited from defined class?
>> (For example, how to check if some Xailer object is TForm instance)
>>
>> o:=TForm1():New(Application:oMainForm)
>> ...
>> if IsForm(o) // ???
> if ( __objDerivedFrom( o, "TFORM" ) )
A little more easy:
o:IsKindOf( "TForm" )
--
Regards,
Jose F. Gimenez
http://www.xailer.com
Question about Classes
Publicado: Mié Oct 04, 2006 11:27 am
por Oleg
Giuseppe,
thank you.
Regards,
Oleg
Question about Classes
Publicado: Mié Oct 04, 2006 11:27 am
por Oleg
Giuseppe,
thank you.
Regards,
Oleg
Question about Classes
Publicado: Mié Oct 04, 2006 11:45 am
por david fung
Jose F. Gimenez wrote:
> Oleg, Giuseppe,
>
>>> How can I check in code if some class inherited from defined class?
>>> (For example, how to check if some Xailer object is TForm instance)
>>>
>>> o:=TForm1():New(Application:oMainForm)
>>> ...
>>> if IsForm(o) // ???
>> if ( __objDerivedFrom( o, "TFORM" ) )
>
> A little more easy:
>
> o:IsKindOf( "TForm" )
>
>
Is IsKindOf() a real or just a psuedo function, can't find from
documentation ?
Question about Classes
Publicado: Mié Oct 04, 2006 11:45 am
por david fung
Jose F. Gimenez wrote:
> Oleg, Giuseppe,
>
>>> How can I check in code if some class inherited from defined class?
>>> (For example, how to check if some Xailer object is TForm instance)
>>>
>>> o:=TForm1():New(Application:oMainForm)
>>> ...
>>> if IsForm(o) // ???
>> if ( __objDerivedFrom( o, "TFORM" ) )
>
> A little more easy:
>
> o:IsKindOf( "TForm" )
>
>
Is IsKindOf() a real or just a psuedo function, can't find from
documentation ?
Question about Classes
Publicado: Mié Oct 04, 2006 11:52 am
por david fung
david fung wrote:
> Jose F. Gimenez wrote:
>> Oleg, Giuseppe,
>>
>>>> How can I check in code if some class inherited from defined class?
>>>> (For example, how to check if some Xailer object is TForm instance)
>>>>
>>>> o:=TForm1():New(Application:oMainForm)
>>>> ...
>>>> if IsForm(o) // ???
>>> if ( __objDerivedFrom( o, "TFORM" ) )
>>
>> A little more easy:
>>
>> o:IsKindOf( "TForm" )
>>
>>
>
> Is IsKindOf() a real or just a psuedo function, can't find from
> documentation ?
It is real & it works. However, where is this property be found in the
documentation, where is it group under ?
Thanks
David
Question about Classes
Publicado: Mié Oct 04, 2006 11:52 am
por david fung
david fung wrote:
> Jose F. Gimenez wrote:
>> Oleg, Giuseppe,
>>
>>>> How can I check in code if some class inherited from defined class?
>>>> (For example, how to check if some Xailer object is TForm instance)
>>>>
>>>> o:=TForm1():New(Application:oMainForm)
>>>> ...
>>>> if IsForm(o) // ???
>>> if ( __objDerivedFrom( o, "TFORM" ) )
>>
>> A little more easy:
>>
>> o:IsKindOf( "TForm" )
>>
>>
>
> Is IsKindOf() a real or just a psuedo function, can't find from
> documentation ?
It is real & it works. However, where is this property be found in the
documentation, where is it group under ?
Thanks
David
Question about Classes
Publicado: Mié Oct 04, 2006 12:07 pm
por ignacio
David,
In xHarbour documentation I guess.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <
davfung@yahoo.com> escribió en el mensaje
news:45238454$[email=
1@news.xailer.com...]
1@news.xailer.com...[/email]
> david fung wrote:
>> Jose F. Gimenez wrote:
>>> Oleg, Giuseppe,
>>>
>>>>> How can I check in code if some class inherited from defined class?
>>>>> (For example, how to check if some Xailer object is TForm instance)
>>>>>
>>>>> o:=TForm1():New(Application:oMainForm)
>>>>> ...
>>>>> if IsForm(o) // ???
>>>> if ( __objDerivedFrom( o, "TFORM" ) )
>>>
>>> A little more easy:
>>>
>>> o:IsKindOf( "TForm" )
>>>
>>>
>>
>> Is IsKindOf() a real or just a psuedo function, can't find from
>> documentation ?
>
> It is real & it works. However, where is this property be found in the
> documentation, where is it group under ?
>
> Thanks
> David
>
Question about Classes
Publicado: Mié Oct 04, 2006 12:07 pm
por NoName
David,
In xHarbour documentation I guess.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <
davfung@yahoo.com> escribió en el mensaje
news:45238454$[email=
1@news.xailer.com...]
1@news.xailer.com...[/email]
> david fung wrote:
>> Jose F. Gimenez wrote:
>>> Oleg, Giuseppe,
>>>
>>>>> How can I check in code if some class inherited from defined class?
>>>>> (For example, how to check if some Xailer object is TForm instance)
>>>>>
>>>>> o:=TForm1():New(Application:oMainForm)
>>>>> ...
>>>>> if IsForm(o) // ???
>>>> if ( __objDerivedFrom( o, "TFORM" ) )
>>>
>>> A little more easy:
>>>
>>> o:IsKindOf( "TForm" )
>>>
>>>
>>
>> Is IsKindOf() a real or just a psuedo function, can't find from
>> documentation ?
>
> It is real & it works. However, where is this property be found in the
> documentation, where is it group under ?
>
> Thanks
> David
>