Hello!
I want to make Value property in TCombobox class which have the same value
as nIndex property.
I did it like this:
--------
#include "Xailer.ch"
CLASS TCOMBOBOX FROM XCOMBOBOX
PROTECTED:
METHOD SetValue(nVal)
PUBLISHED:
DATA bBlock
DATA xEmpty
PROPERTY Value INIT 0 READ ::nIndex WRITE ::SetValue( nVal )
ENDCLASS
METHOD SetValue( nVal ) CLASS TCombobox
::nIndex:=nVal
RETURN Nil
--------
but when I try to access Value property it is not found (error).
Can I achieve this?
If I use PROPERTY clause without READ/WRITE (PROPERTY Value INIT 0) it
works.
Thank you.
Oleg.
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
TCombobox redifinition
- ignacio
- Site Admin
- Mensajes: 9443
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TCombobox redifinition
Oleg,
Just change this:
PROPERTY Value INIT 0 READ INLINE ::nIndex WRITE SetValue
I hope it will work.
Consult the doucmentation about OOP
Regards,
"Oleg" <info@cluster.samara.ru> wrote in message
news:[email=452637d4@news.xailer.com...]452637d4@news.xailer.com...[/email]
> Hello!
>
> I want to make Value property in TCombobox class which have the same value
> as nIndex property.
> I did it like this:
>
> --------
> #include "Xailer.ch"
>
> CLASS TCOMBOBOX FROM XCOMBOBOX
> PROTECTED:
> METHOD SetValue(nVal)
> PUBLISHED:
> DATA bBlock
> DATA xEmpty
> PROPERTY Value INIT 0 READ ::nIndex WRITE ::SetValue( nVal )
> ENDCLASS
>
> METHOD SetValue( nVal ) CLASS TCombobox
> ::nIndex:=nVal
> RETURN Nil
> --------
>
> but when I try to access Value property it is not found (error).
> Can I achieve this?
>
> If I use PROPERTY clause without READ/WRITE (PROPERTY Value INIT 0) it
> works.
>
> Thank you.
> Oleg.
>
>
Just change this:
PROPERTY Value INIT 0 READ INLINE ::nIndex WRITE SetValue
I hope it will work.
Consult the doucmentation about OOP
Regards,
"Oleg" <info@cluster.samara.ru> wrote in message
news:[email=452637d4@news.xailer.com...]452637d4@news.xailer.com...[/email]
> Hello!
>
> I want to make Value property in TCombobox class which have the same value
> as nIndex property.
> I did it like this:
>
> --------
> #include "Xailer.ch"
>
> CLASS TCOMBOBOX FROM XCOMBOBOX
> PROTECTED:
> METHOD SetValue(nVal)
> PUBLISHED:
> DATA bBlock
> DATA xEmpty
> PROPERTY Value INIT 0 READ ::nIndex WRITE ::SetValue( nVal )
> ENDCLASS
>
> METHOD SetValue( nVal ) CLASS TCombobox
> ::nIndex:=nVal
> RETURN Nil
> --------
>
> but when I try to access Value property it is not found (error).
> Can I achieve this?
>
> If I use PROPERTY clause without READ/WRITE (PROPERTY Value INIT 0) it
> works.
>
> Thank you.
> Oleg.
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
TCombobox redifinition
Oleg,
Just change this:
PROPERTY Value INIT 0 READ INLINE ::nIndex WRITE SetValue
I hope it will work.
Consult the doucmentation about OOP
Regards,
"Oleg" <info@cluster.samara.ru> wrote in message
news:[email=452637d4@news.xailer.com...]452637d4@news.xailer.com...[/email]
> Hello!
>
> I want to make Value property in TCombobox class which have the same value
> as nIndex property.
> I did it like this:
>
> --------
> #include "Xailer.ch"
>
> CLASS TCOMBOBOX FROM XCOMBOBOX
> PROTECTED:
> METHOD SetValue(nVal)
> PUBLISHED:
> DATA bBlock
> DATA xEmpty
> PROPERTY Value INIT 0 READ ::nIndex WRITE ::SetValue( nVal )
> ENDCLASS
>
> METHOD SetValue( nVal ) CLASS TCombobox
> ::nIndex:=nVal
> RETURN Nil
> --------
>
> but when I try to access Value property it is not found (error).
> Can I achieve this?
>
> If I use PROPERTY clause without READ/WRITE (PROPERTY Value INIT 0) it
> works.
>
> Thank you.
> Oleg.
>
>
Just change this:
PROPERTY Value INIT 0 READ INLINE ::nIndex WRITE SetValue
I hope it will work.
Consult the doucmentation about OOP
Regards,
"Oleg" <info@cluster.samara.ru> wrote in message
news:[email=452637d4@news.xailer.com...]452637d4@news.xailer.com...[/email]
> Hello!
>
> I want to make Value property in TCombobox class which have the same value
> as nIndex property.
> I did it like this:
>
> --------
> #include "Xailer.ch"
>
> CLASS TCOMBOBOX FROM XCOMBOBOX
> PROTECTED:
> METHOD SetValue(nVal)
> PUBLISHED:
> DATA bBlock
> DATA xEmpty
> PROPERTY Value INIT 0 READ ::nIndex WRITE ::SetValue( nVal )
> ENDCLASS
>
> METHOD SetValue( nVal ) CLASS TCombobox
> ::nIndex:=nVal
> RETURN Nil
> --------
>
> but when I try to access Value property it is not found (error).
> Can I achieve this?
>
> If I use PROPERTY clause without READ/WRITE (PROPERTY Value INIT 0) it
> works.
>
> Thank you.
> Oleg.
>
>
TCombobox redifinition
Ignacio,
thank you. It works.
Best regards,
Oleg.
thank you. It works.
Best regards,
Oleg.
TCombobox redifinition
Ignacio,
thank you. It works.
Best regards,
Oleg.
thank you. It works.
Best regards,
Oleg.