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
