How to override a DATA's default value?

How to override a DATA's default value?

Postby Carlos Mora » Tue Sep 08, 2015 1:03 pm

Given the following 2 classes

Code: Select all  Expand view  RUN
CLASS TClassA
   DATA uVar INIT 'X'
   METHOD New() CONSTRUCTOR
ENDCLASS

..

CLASS TClassB FROM TClassA
ENDCLASS


where TClassB inherits everything, including constructor.

How to change uVar's INIT value to 'Y' in class TClassB, without rewriting the CONSTRUCTOR?
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: How to override a DATA's default value?

Postby cnavarro » Tue Sep 08, 2015 1:06 pm

Carlos

The first thing that comes to mind

Lo primero que se me ocurre

http://xthefull.blogspot.com.es/2013/01 ... class.html

Yo no he probado a sobreescribir esos metodos

I have not tried to override these methods
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How to override a DATA's default value?

Postby Antonio Linares » Tue Sep 08, 2015 5:52 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests