It can be very useful, we need to do it manually :( in our ERP need to spread some values on changing variables, and the tree some times is very long and easy to break, we now are using codeblocks that are evaluated overloading assign operator.
Is an important feature to ERP developers. Trigger can be better solution, because only one variable is overloaded. Best regards, Miguel Angel Marchuet Przemyslaw Czerpak escribió:
On Wed, 24 Sep 2008, Chen Kedem wrote:is it possible for you to implement a "data trigger" (for vars, fields, object and so on) defining a code block called when the object changes his value... example of code function main() local nvar as numeric nvar := 1 // // set trigger (for example) // _set_trigger("nvar",{|cName,Value| qout(cName+" new value:"+str(Value)} // trigger is called immediately after nvar value change nvar++ return NIL result: NVAR new value: 2For simple vars there is no such functionality at .prg level though it's be quite easy to implement it in C using existing functionality. We even already use such mechanism in few places, f.e. for thread local static variables or SETGET object method references. I do not find it enough usable to create public .prg interface for it but it's possible and if more people will request for it and group agree I can implement it. For DBFs it's possible to set triggers executed on each fields access/ assign using SIX3 interface. best regards, Przemek _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour __________ Informaci�n de ESET NOD32 Antivirus, versi�n de la base de firmas de virus 3469 (20080924) __________ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com
_______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
