Hi Guys
Not sure if I'm doing something wrong or the example is wrong
From the help
For example:
PROPERTY cText INIT "" READ ::GetText() WRITE ::SetText( Value )
I can get this work, it actually seems to need to be
PROPERTY cText INIT "" READ GetText WRITE SetText
I started with this
CLASS Test
PUBLISHED:
PROPERTY cText INIT "" READ ::GetText() WRITE ::SetText( Value )
PRIVATE:
DATE FTest
END CLASS
METHOD GetText()
RETURN FTest
METHOD SetText(s)
FTest := s
RETURN FTest
But I kept getting a run error saying Test wasn't a property
By removing the :: and the () from the READ/WRITE is started working
I also could get it to compile this
PROPERTY cText INIT "" READ METHOD GetText WRITE METHOD SetText
At the bottom of the help is says this is the best way to use it.
Thanks
Nick
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.
The Properties Help Page
-
- Mensajes: 328
- Registrado: Mar Nov 21, 2006 2:10 am
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
The Properties Help Page
Nick,
Take a look at OOP chapter in the help file. It should be this way:
PROPERTY cText INIT "" READ GetText WRITE SetText
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Nick Hilder" <nick_Nospam#$%@capsol.com%NOSPAM%.au> escribió en el mensaje
news:[email=456f4974@news.xailer.com...]456f4974@news.xailer.com...[/email]
> Hi Guys
>
> Not sure if I'm doing something wrong or the example is wrong
>
>
> From the help
>
> For example:
>
>
> PROPERTY cText INIT "" READ ::GetText() WRITE ::SetText( Value )
>
>
>
> I can get this work, it actually seems to need to be
>
>
>
>
>
> PROPERTY cText INIT "" READ GetText WRITE SetText
>
>
> I started with this
>
> CLASS Test
> PUBLISHED:
> PROPERTY cText INIT "" READ ::GetText() WRITE ::SetText( Value )
>
>
> PRIVATE:
> DATE FTest
>
> END CLASS
>
> METHOD GetText()
>
> RETURN FTest
>
> METHOD SetText(s)
> FTest := s
> RETURN FTest
>
> But I kept getting a run error saying Test wasn't a property
>
> By removing the :: and the () from the READ/WRITE is started working
>
> I also could get it to compile this
>
> PROPERTY cText INIT "" READ METHOD GetText WRITE METHOD SetText
>
>
> At the bottom of the help is says this is the best way to use it.
>
> Thanks
>
> Nick
>
Take a look at OOP chapter in the help file. It should be this way:
PROPERTY cText INIT "" READ GetText WRITE SetText
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Nick Hilder" <nick_Nospam#$%@capsol.com%NOSPAM%.au> escribió en el mensaje
news:[email=456f4974@news.xailer.com...]456f4974@news.xailer.com...[/email]
> Hi Guys
>
> Not sure if I'm doing something wrong or the example is wrong
>
>
> From the help
>
> For example:
>
>
> PROPERTY cText INIT "" READ ::GetText() WRITE ::SetText( Value )
>
>
>
> I can get this work, it actually seems to need to be
>
>
>
>
>
> PROPERTY cText INIT "" READ GetText WRITE SetText
>
>
> I started with this
>
> CLASS Test
> PUBLISHED:
> PROPERTY cText INIT "" READ ::GetText() WRITE ::SetText( Value )
>
>
> PRIVATE:
> DATE FTest
>
> END CLASS
>
> METHOD GetText()
>
> RETURN FTest
>
> METHOD SetText(s)
> FTest := s
> RETURN FTest
>
> But I kept getting a run error saying Test wasn't a property
>
> By removing the :: and the () from the READ/WRITE is started working
>
> I also could get it to compile this
>
> PROPERTY cText INIT "" READ METHOD GetText WRITE METHOD SetText
>
>
> At the bottom of the help is says this is the best way to use it.
>
> Thanks
>
> Nick
>
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