( replace "X" (eval button-cmd-string) xname )
This is what worked, but i guess there is a better way to eg. create a non-destructive replace .
; <><><><><><><><><><><><><><><><><><><>
PS: long time no see - while having only little time for hacking , i'm trying to simplify the gui-programming for me . This works already :
( mgs:gui-intro )
( mgs:make-frame "my-app" 5 5 90 45 ) ; the size in % of screen can be left
( mgs:tool-bar )
( mgs:add-button "Run" "Stop" )
( mgs:gui-start )
... probably the rest will take some weeks more ;-) .. but i'll stay tuned to newLISP fanclub
Redefine it in a function. A function will copy the value and return the destroyed (copied) value.
I use (string):
(set 's "didi")
(replace "i" s "a")
(println s)
;-> "dada"
(set 's "didi")
(replace "i" (string s) "a")
(println s)
;-> ;-> "didi"
Thanks ! I use the string-function now .