DMDScript - DMDScript and D interaction
- Carlos Santander B. (14/14) Jan 20 2005 How many of you were/are trying to do the same that I am? That is, try
- Walter (5/17) Jan 20 2005 The way to do that is create your own object (by deriving from DObject).
- Carlos Santander B. (6/11) Jan 21 2005 Thanks. I managed to get it working:
- Walter (3/12) Jan 22 2005 Great!
How many of you were/are trying to do the same that I am? That is, try to integrate DMDScript with D. What I have done is modified slightly Walter's testscript so it becomes a sort of interactive shell (it really isn't, but it takes its input from console instead from a file). Anyway, I could create a DMDScript variable from a D one. What I did was prepend to the user input code of my own, just like this: buffer = "var myValue = " ~ format(myValue) ~ ";" ~ userInput; So the user can use "myValue", and she can even modify it. The problem is that past that point, I want to recover in D the value of "myValue" and see if it changed. Can it be done? How? (extra points if there's a way to notify from DMDScript to D the moment "myValue" changes ;) ). _______________________ Carlos Santander Bernal
Jan 20 2005
"Carlos Santander B." <csantander619 gmail.com> wrote in message news:csp8s9$tcc$1 digitaldaemon.com...How many of you were/are trying to do the same that I am? That is, try to integrate DMDScript with D. What I have done is modified slightly Walter's testscript so it becomes a sort of interactive shell (it really isn't, but it takes its input from console instead from a file). Anyway, I could create a DMDScript variable from a D one. What I did was prepend to the user input code of my own, just like this: buffer = "var myValue = " ~ format(myValue) ~ ";" ~ userInput; So the user can use "myValue", and she can even modify it. The problem is that past that point, I want to recover in D the value of "myValue" and see if it changed. Can it be done? How? (extra points if there's a way to notify from DMDScript to D the moment "myValue" changes ;) ).The way to do that is create your own object (by deriving from DObject). Then, override the Put() functions to notify when a property gets a new value.
Jan 20 2005
Walter wrote:The way to do that is create your own object (by deriving from DObject). Then, override the Put() functions to notify when a property gets a new value.Thanks. I managed to get it working: http://dblinux.sis.epn.edu.ec/~csantand/dmdscript.html Maybe I'll upload the executables tomorrow (if someone requests them). _______________________ Carlos Santander Bernal
Jan 21 2005
"Carlos Santander B." <csantander619 gmail.com> wrote in message news:cssgst$1mn4$1 digitaldaemon.com...Walter wrote:Great!The way to do that is create your own object (by deriving from DObject). Then, override the Put() functions to notify when a property gets a new value.Thanks. I managed to get it working: http://dblinux.sis.epn.edu.ec/~csantand/dmdscript.html Maybe I'll upload the executables tomorrow (if someone requests them).
Jan 22 2005