Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Read from undoHistory (Read 935 times)
Kuzya
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 45
Joined: Dec 19th, 2011
Read from undoHistory
Jul 9th, 2018 at 1:33pm
Print Post  
Hi,

how is 'undoHistory' structured?
I want to read the information from 'undoHistory' and write other information.
Is that possible?


Regards,
Kuzya
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3171
Joined: Oct 19th, 2005
Re: Read from undoHistory
Reply #1 - Jul 10th, 2018 at 9:25am
Print Post  
Hi,

If you are referring to the diagram.undoManager.undoHistory array, it's not considered public API but you can find recorded actions as instances of AddItemCommand, RemoveItemCommand, ChangeItemCommand classes there. You could probably remove commands from it but take care that other commands do not rely on removed commands' results.

With public API you can add custom undoable actions by implementing a Command class and calling Diagram.executeCommand. You can group several actions into a single undoable action by enclosing them within Diagram.startCompositeOperation and commitCompositeOperation calls.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint