SKILL Q: Lispish version of "obj1~>points = obj2~>points"

E

Edward

Guest
After failing to get SKILL mode working in Emacs, I decided to write
all my SKILL code using standard Lisp sexp-notation. I did this
because Emacs has plenty of lisp modes for my mark-up and indentation
needs. But recently I ran into code that refused to work with "set"
or "setq." I finally had to revert to this in order to get this
simple swap to work:

temp = obj1~>points
obj1~>points = obj2~>points
obj2~>points = temp

The (non-working) Lispish version looked like this:

(setq temp obj1~>points)
(set obj1~>points obj2~points)
(set obj2~>points temp)

Anyone know the magic here? Is there some specialized set command
that works only with db objects?
 
Edward <edward.dodge@gmail.com> writes:

After failing to get SKILL mode working in Emacs, I decided to write
all my SKILL code using standard Lisp sexp-notation. I did this
because Emacs has plenty of lisp modes for my mark-up and indentation
needs. But recently I ran into code that refused to work with "set"
or "setq." I finally had to revert to this in order to get this
simple swap to work:

temp = obj1~>points
obj1~>points = obj2~>points
obj2~>points = temp

The (non-working) Lispish version looked like this:

(setq temp obj1~>points)
(set obj1~>points obj2~points)
(set obj2~>points temp)
From memory, something like this should work (not tested, first thing I'd
test if it doesn't would be not to quote points)

(let ((temp (dbGetq obj1 'points)))
(dbSetq obj1 (dbGetq obj2 'points) 'points)
(dbSetq obj2 temp 'points))

Yours,

--
Jean-Marc
 
Yes, Jean-Marc, this was just what I needed! However, the property
name is expressed as a string ("points") instead of a symbol
('points). Thanks for the information.

Kindly,

Edward
 

Welcome to EDABoard.com

Sponsor

Back
Top