concentra wrote:Where can I find a tutorial and/or documentation about how to create and inherit FWH classes ?
Is there one around ?
I am triing to inherit a class from another because I need to add a method.
I am getting an error that I don´t have if I use the original class.
The object seems not ot be created at all...
The code is something like this:
Class CL2 from CL1
METHOD PrintCl()
ENDCLASS
METHOD PrintCl() class CL2
alert("CL2")
return NIL
Questions:
Al the CL1 methods are avaiable in CL2 ?
Do I need a constructor/destructor method or the CL1 one is used ?
[[]] Maurício Faria
concentra wrote:Where can I find a tutorial and/or documentation about how to create and inherit FWH classes ?
concentra wrote:I am triing to inherit a class from another because I need to add a method.
I am getting an error that I don´t have if I use the original class.
The object seems not ot be created at all...
The code is something like this:
Class CL2 from CL1
METHOD PrintCl()
ENDCLASS
METHOD PrintCl() class CL2
alert("CL2")
return NIL
concentra wrote:Questions:
Al the CL1 methods are avaiable in CL2 ?
concentra wrote:Do I need a constructor/destructor method or the CL1 one is used ?
Gale FORd wrote:concentra wrote:Where can I find a tutorial and/or documentation about how to create and inherit FWH classes ?
Is there one around ?
I am triing to inherit a class from another because I need to add a method.
I am getting an error that I don´t have if I use the original class.
The object seems not ot be created at all...
The code is something like this:
Class CL2 from CL1
METHOD PrintCl()
ENDCLASS
METHOD PrintCl() class CL2
alert("CL2")
return NIL
Questions:
Al the CL1 methods are avaiable in CL2 ?
Do I need a constructor/destructor method or the CL1 one is used ?
[[]] Maurício Faria
Don't forget to add:
CLASSDATA lRegistered AS LOGICAL
James Bott wrote:Maurício,
There are a couple of articles that I wrote on this available on my website here:
http://ourworld.compuserve.com/homepage ... rogram.htm
The article, "Introduction to Object-Oriented Programming Using FiveWin" is in two parts.
>I am getting an error that I don´t have if I use the original class.
I see nothing wrong with the code you show so the problem must be in the code you didn't show us. Can you provide us with a small REAL example. Which FW class are trying to inherit from? What is the error you are getting? What version of FW are you using?
James
EnricoMaria wrote:concentra wrote:Where can I find a tutorial and/or documentation about how to create and inherit FWH classes ?
Best documentation is FWH source code.
EnricoMaria wrote:concentra wrote:I am triing to inherit a class from another because I need to add a method.
I am getting an error that I don´t have if I use the original class.
The object seems not ot be created at all...
The code is something like this:
Class CL2 from CL1
METHOD PrintCl()
ENDCLASS
METHOD PrintCl() class CL2
alert("CL2")
return NIL
Can you build a little real (compilable) sample of the problem?
EnricoMaria wrote:concentra wrote:Questions:
Al the CL1 methods are avaiable in CL2 ?
Yes.concentra wrote:Do I need a constructor/destructor method or the CL1 one is used ?
Yes, you need of a constructor.
EMG
Gale FORd wrote:Don't forget to add:
CLASSDATA lRegistered AS LOGICAL
EnricoMaria wrote:It is a flag that allows a one-time registration of a control class. It is needed to get Windows aware of the new control.
EMG
concentra wrote:EnricoMaria wrote:It is a flag that allows a one-time registration of a control class. It is needed to get Windows aware of the new control.
EMG
Ok, but could you tell me when I need it and when I do not ?
[[]] Maurício Faria
Gale FORd wrote:If you are creating a temporary stand alone class from scratch and you will not inherit from it then it is not required
If you plan on inheriting from your class or your class is inheriting from another, then you will need to add it.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 82 guests