FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to override a DATA's default value?
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
How to override a DATA's default value?
Posted: Tue Sep 08, 2015 01:03 PM
Given the following 2 classes

Code (fw): Select all Collapse
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"
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How to override a DATA's default value?
Posted: Tue Sep 08, 2015 01: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to override a DATA's default value?
Posted: Tue Sep 08, 2015 05:52 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion