Avanços no harbour
Enviado: 19 Set 2007 17:40
Do jeito que as coisas andam, daqui há algum tempo vamos todos mudar para o harbour novamente.
Przmek e o Viktor estão trabalhando muito mesmo!
Muitos bugs e compatibilidade com clipper 5.3 corrigidos e adicionados.
Falta atualizar a pagina do harbour em português, porque está abandonada.
Saudações
Itamar M. Lins Jr.
2007-09-18 14:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
+ added new commands for scalar classes:
ASSOCIATE CLASS <ClassName> WITH TYPE
ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
ENABLE CLASS TYPE ALL
ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
Please remeber that:
ENABLE CLASS TYPE ALL
and:
ENABLE TYPE CLASS ...
can be used in any place of code - this commands are translated to
REQUEST HB<TYPENAME>
so are not executed
* harbour/source/vm/classes.c
+ added __clsAssocType( <hClass>, <cType> ) => <lOK>
* harbour/common.mak
* harbour/source/rtl/tscalar.prg
* harbour/source/rtl/Makefile
+ harbour/source/rtl/tscalars.c
+ harbour/source/rtl/tscalard.c
+ harbour/source/rtl/tscalarh.c
+ harbour/source/rtl/tscalarl.c
+ harbour/source/rtl/tscalarp.c
+ harbour/source/rtl/tscalara.c
+ harbour/source/rtl/tscalaru.c
+ harbour/source/rtl/tscalarb.c
+ harbour/source/rtl/tscalarn.c
+ harbour/source/rtl/tscalarc.c
+ added scalar classes for basic types,
Now it's possible to define messages also for basic item types.
It's even possible to overload some not defined in HVM operators,
f.e. in this example we overload operator "+" so it makes
AADD( <aValue>, <xValue> )
for code like <aValue> + <xValue>:
#include "hbclass.ch"
PROC MAIN()
LOCAL a:={}
ASSOCIATE CLASS MyArray WITH TYPE ARRAY
a := a + "elem1"
a += "elem2"
a := a + "elem3"
a += "elem4"
? a:asString, a:isScalar
AEVAL(a,{|x,i|QOUT(i,x)})
RETURN
CREATE CLASS MyArray INHERIT __HBArray
OPERATOR "+" ARG xValue INLINE AADD( Self, xValue ), Self
ENDCLASS
Operators which have default actions for given types defined in HVM
cannot be overloaded.
==========----==============
2007-09-13 16:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
+ harbour/include/hbsxdef.ch
* harbour/include/dbinfo.ch
* harbour/include/hbrdddbf.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrddntx.h
* harbour/contrib/bmdbfcdx/hbrddbmcdx.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/workarea.c
+ added SIx3 compatible triggers support
They should work like in SIx3 with some intentional excpetions:
1) if 4-th parameter exists (PREUSE/GET/PUT) then it's passed
by
reference otherwise is not passed at all and PCOUNT() in
trigger
functions returns 3
SIx3 do not pass 4-th parameter by reference and if it not
exist then passes 0
2) EVENT_POSTCLOSE is executed after SUPER_CLOSE()
SIx3 executes EVENT_POSTCLOSE just before SUPER_CLOSE()
3) EVENT_UPDATE is executed _ALWAYS_ when DBF is updated also
when WA does not have open indexes
SIx3 executes EVENT_UPDATE only when at least one index is
open without checking if it's updated or not
4) EVENT_POSTUSE is executed from OPEN() method in "DBF" RDD
not
from index RDDs so before the indexes are open
SIx3 executes EVENT_POSTUSE after opening indexes
It's possible that I'll change this condition in the future
Przmek e o Viktor estão trabalhando muito mesmo!
Muitos bugs e compatibilidade com clipper 5.3 corrigidos e adicionados.
Falta atualizar a pagina do harbour em português, porque está abandonada.
Saudações
Itamar M. Lins Jr.
2007-09-18 14:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
+ added new commands for scalar classes:
ASSOCIATE CLASS <ClassName> WITH TYPE
ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
ENABLE CLASS TYPE ALL
ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
Please remeber that:
ENABLE CLASS TYPE ALL
and:
ENABLE TYPE CLASS ...
can be used in any place of code - this commands are translated to
REQUEST HB<TYPENAME>
so are not executed
* harbour/source/vm/classes.c
+ added __clsAssocType( <hClass>, <cType> ) => <lOK>
* harbour/common.mak
* harbour/source/rtl/tscalar.prg
* harbour/source/rtl/Makefile
+ harbour/source/rtl/tscalars.c
+ harbour/source/rtl/tscalard.c
+ harbour/source/rtl/tscalarh.c
+ harbour/source/rtl/tscalarl.c
+ harbour/source/rtl/tscalarp.c
+ harbour/source/rtl/tscalara.c
+ harbour/source/rtl/tscalaru.c
+ harbour/source/rtl/tscalarb.c
+ harbour/source/rtl/tscalarn.c
+ harbour/source/rtl/tscalarc.c
+ added scalar classes for basic types,
Now it's possible to define messages also for basic item types.
It's even possible to overload some not defined in HVM operators,
f.e. in this example we overload operator "+" so it makes
AADD( <aValue>, <xValue> )
for code like <aValue> + <xValue>:
#include "hbclass.ch"
PROC MAIN()
LOCAL a:={}
ASSOCIATE CLASS MyArray WITH TYPE ARRAY
a := a + "elem1"
a += "elem2"
a := a + "elem3"
a += "elem4"
? a:asString, a:isScalar
AEVAL(a,{|x,i|QOUT(i,x)})
RETURN
CREATE CLASS MyArray INHERIT __HBArray
OPERATOR "+" ARG xValue INLINE AADD( Self, xValue ), Self
ENDCLASS
Operators which have default actions for given types defined in HVM
cannot be overloaded.
==========----==============
2007-09-13 16:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
+ harbour/include/hbsxdef.ch
* harbour/include/dbinfo.ch
* harbour/include/hbrdddbf.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrddntx.h
* harbour/contrib/bmdbfcdx/hbrddbmcdx.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/workarea.c
+ added SIx3 compatible triggers support
They should work like in SIx3 with some intentional excpetions:
1) if 4-th parameter exists (PREUSE/GET/PUT) then it's passed
by
reference otherwise is not passed at all and PCOUNT() in
trigger
functions returns 3
SIx3 do not pass 4-th parameter by reference and if it not
exist then passes 0
2) EVENT_POSTCLOSE is executed after SUPER_CLOSE()
SIx3 executes EVENT_POSTCLOSE just before SUPER_CLOSE()
3) EVENT_UPDATE is executed _ALWAYS_ when DBF is updated also
when WA does not have open indexes
SIx3 executes EVENT_UPDATE only when at least one index is
open without checking if it's updated or not
4) EVENT_POSTUSE is executed from OPEN() method in "DBF" RDD
not
from index RDDs so before the indexes are open
SIx3 executes EVENT_POSTUSE after opening indexes
It's possible that I'll change this condition in the future