Author Topic: Modifying an Object from an Object-Reactor call-back  (Read 5503 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Modifying an Object from an Object-Reactor call-back
« Reply #15 on: March 04, 2010, 12:35:40 PM »
Superb Tim   8-)

Works a treat! I think I had the general idea, just didn't have the vlr-remove/add's in the right order  :oops:

Thanks for your time on this mate,

Lee

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Modifying an Object from an Object-Reactor call-back
« Reply #16 on: March 04, 2010, 12:46:28 PM »
You're welcome Lee.  It felt good to do a little research again, and get the grey matter flowing.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Modifying an Object from an Object-Reactor call-back
« Reply #17 on: March 04, 2010, 01:04:17 PM »
Hi lee,

You can have a look to Rectangle_1.08.lsp.
Maybe the LISP isn't so usefull but I think it's a quite good ObjectReactor sample which handles many events (:VLR-modified, :VLR-copied, :VLR-erased, :VLR-unerased) and works even if the object is modified through a command or a LISP.
i also shows how to keep the reactors from one session to another without using persistents reactors (IMO a safer way).
Speaking English as a French Frog

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Modifying an Object from an Object-Reactor call-back
« Reply #18 on: March 04, 2010, 01:14:23 PM »
Very nice Gile  :-)

I shall study your code - I like your use of a dictionary to store the handles. I experimented with the idea of 'rebuilding' the reactor also, but stored the data in the object xData, instead of a dictionary here.

Thanks

Lee