Comments (4)
ask on harbour-user list how to use object constructors/destructors in Harbour
from core.
I know about how use !
I think that you not read about my sugestion.
from core.
Hi Lailton,
I think that Przemek read your post and that he answered to your question.
The method you want are already present in Harbour class management. See
in include/hbclass.ch:
/* special method(s) */
#xcommand CONSTRUCTOR => METHOD CONSTRUCTOR
#xcommand DESTRUCTOR => ;
_HB_MEMBER __HB_CLS_ASFUNC();;
__HB_CLS_DECLARE_METHOD __HB_CLS_PARAMS() CLASS_NAME ;;
oClass:SetDestructor( @__HB_CLS_ASID( __HB_CLS_MTHNAME CLASS_NAME
)() )
#xcommand DESTRUCTOR FUNCTION => ;
oClass:SetDestructor( @__HB_CLS_ASID( )() )
So you can easily code your methods using this syntax.
Anyway, please, post your questions on the user group, instead to
suggest already present implementations.
BR
Maurizio
Il 22/02/2014 01:18, Lailton Fernando Mariano ha scritto:
I know about how use !
I think that you not read about my sugestion.—
Reply to this email directly or view it on GitHub
#49 (comment).
from core.
Maurizio,
The my sugestion is:
class hb_test
method __construct() inline qout('contruct')
method __destruct() inline qout('destruct')
endclass
so.
class:=hb_test()
// automatic will call __contruct method.
class:=nil // automatic call __destruct
without need call a method initialize, and send the params too.
class:=hb_test('a',1,.t.) // send params to __contruct method.
It's only a sugestion :)
from core.
Related Issues (20)
- hb_gt_wvt_gfx_Text()
- GFX acquire / release gtwvt
- can't recompile harbour after msys2 clang64 openssl version upgrade HOT 5
- can't compile harbour anymore (msys2 clang64) HOT 1
- harbour instalation forgot contrib/hbhpdf/tests/files folder
- error adding symbols: Malformed archive HOT 5
- Static compilation - BASE/1302 Argument error: HOT 3
- TBROWSEDB() ERROR AFTER LAST HARBOUR UPDATE HOT 1
- HBMK2: unrecoverable error 6005: Exception error HOT 6
- GPF when accesing member of NIL using @ operator HOT 2
- memory and array HOT 9
- GTGLFW
- Official Docker image?
- OpenSSL HOT 3
- no error -w3 when use function
- harbour becomes UNUSABLE to me HOT 1
- Compare issue HOT 2
- Information returned for HB_VERSION_HARBOUR HOT 2
- Compiling Harbour under Debian 12 HOT 2
- RDDADS Problem HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.