Book a Demo

Author Topic: EA_OnNotifyContextItemModified  - undo  (Read 4110 times)

Danny F

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
EA_OnNotifyContextItemModified  - undo
« on: February 13, 2013, 07:44:26 pm »
When I get a EA_OnNotifyContextItemModified, I get the new values

Is there a way to
 - access/retrieve the previous values
to implement an undo

OR is there maybe an 'undo' provided ?  somehow, somewhere

thanks again

gr
« Last Edit: February 13, 2013, 07:44:41 pm by dannyf »
Reg.

Danny

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA_OnNotifyContextItemModified  - undo
« Reply #1 on: February 14, 2013, 12:08:00 am »
Somehow the Sparxians did not like undo in the design of EA and omitted it completely except for diagrams. IOW: you're stuck here.

The only way out would probably be to read the values from the according table using Repository.SQLQuery. Probably the values are not written to the table in that very moment.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA_OnNotifyContextItemModified  - undo
« Reply #2 on: February 19, 2013, 11:45:28 pm »

Danny F

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: EA_OnNotifyContextItemModified  - undo
« Reply #3 on: February 20, 2013, 05:37:15 pm »
Thanks Geert.

I've got the undo working :)
I just asked to know if maybe there was something provided by EA, such that I didn't need to roll my own.

I store the 'previous state' in a taggedvalue.note field.
Seems to be the most reliable way.

Reg.

Danny

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA_OnNotifyContextItemModified  - undo
« Reply #4 on: February 20, 2013, 05:53:37 pm »
Quote
I store the 'previous state' in a taggedvalue.note field.
Seems to be the most reliable way.
Yes, I thought of that myself too when thinking about your issue. Seems like a good idea.

Geert