database reactors

database reactors

Anonymous
Not applicable
366 Views
2 Replies
Message 1 of 3

database reactors

Anonymous
Not applicable
During the objectModified event I want to add some data to an xRecord, but
when I do the objectModified event seems to get re-fired and I end up with
an access violation.

Anyone have any suggestions on what I can do?

Thanks,
Jon
0 Likes
367 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
objectModified() is an AcDbDatabaseReactor method, so if the xrecord is in a
database that that reactor is attached to, modifying the xrecord will
certainly trigger a new objectModified notification. Is your objectModified
method re-entrant (i.e. recursive) safe? If not, then that might be the
cause of the access violation.

"Jon Prisbe" wrote in message
news:[email protected]...
> During the objectModified event I want to add some data to an xRecord, but
> when I do the objectModified event seems to get re-fired and I end up with
> an access violation.
>
> Anyone have any suggestions on what I can do?
>
> Thanks,
> Jon
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
I don't know exactly your notion but if object on event fired has xrecord
attach and you want to modify this xrecord?.
You are using wrong reactor type, you can not do it during the
objectModified event fired, Object pass-in this
func has open mode read-only and declared as const. On that way it musts be
keep the ID or
pointer of this pass-in object and wait until end all events. Using
persistent object reactor is better, and it can be modify itself on time
event fires.
0 Likes