OpenDCL Document Events

Started by jb · 2008-05-15 18:15 UTC · 5 replies · SMF topic #327

The VLR reactors are pretty limited when going from document -> lisp interpreter -> OpenDCL.arx.  I guess it's because of the interpreter, objects don't get released during CommandEnded, AttachEnded, and DataBase call-backs.  Or maybe it's because dcl_Functions are commands?

In any event, it would be nice if OpenDCL had some built-in event handlers.  The ones I've had the most trouble with are when Objects are added or removed from the Drawing Database.  Most of the others work fine: CommandEnded works for most Object Table update functions.  Obviously, this would be for Modeless, Dockable and Palette forms.  These forms need to react to the Documant environment real-time.  Right now I have refresh buttons when reactors aren't working.

Maybe:
dcl_objectAppended
dcl_objectUnAppended               
dcl_objectReAppended
dcl_objectErased
dcl_objectUnErased

Any thoughts?  Any others?
Events related to switching documents would be on my list.

I haven't yet tried using

:vlr-documentBecameCurrent
:vlr-documentToBeActivated

although I may try it this weekend.

Scenario:

Modeless form which needs to use a document-specific variable (either a LISP global or a dictionary variable) to update the value displayed by a control.

Anyone have any experience to share on this topic?
The modeless forms have an "OnDocActivated" event for that.

author=jb link=topic=327.msg1435#msg1435 date=1210875306 wrote:
The VLR reactors are pretty limited...


It would be helpful if you could post some sample code that demonstrates the problem.
I'll put an example together.
author=BazzaCAD link=topic=327.msg1963#msg1963 date=1222493433 wrote:
The modeless forms have an "OnDocActivated" event for that.


Ah! cool.:)

Thanks, Barry