PDA

View Full Version : custom tools and undo


jjbilly
05-12-2005, 10:16 AM
Can anyone tell me what I need to do in a tool to get the undo behaviour to work properly? I've written a tool and my problem is that undo removes everything since the tool was last selected, rather than each individual use of the tool. Is there a command I need to add to mouseUp, say?

hangalot
05-13-2005, 02:35 PM
AFAIK no. i know thats well sucky.

jjbilly
05-13-2005, 03:42 PM
Thanks for the answer. That is pretty sucky.

Funny thing is, I've just checked, and the polygon/polystar tool does have correct undo behaviour. In principle, anything it can do, we should be able to do, you'd have thought - now why did Macromedia obfuscate the source code for that? Is there something embarassing about it?

hangalot
05-13-2005, 04:00 PM
good point about polystar. i heard rumours that MM were going to release a webservice to that obfuscating tool, but thus far i ain't seen any of that.

jjbilly
05-16-2005, 08:24 AM
That would be interesting to see.

I think the issue can be restated slightly - no history entry is being made for the use of the custom tool. Worse than what I said in my original post, it seems that the effect of undo is to return the document to the state it was in after the previous tool had been used (rather than before the tool being undone had been used). This means that if you use a custom tool, then use a standard tool, undoing the use of the standard tool also undoes everything done with the custom tool - worse again, because there's no history, redo won't bring it back.

hangalot
05-16-2005, 08:36 AM
this is a fileable bug. or an ocr request. my advise to you is to post the steps to recreate this exactly on flashguru's extending flash list first. make certain you write in big letter attention MM engineers since they subscribe to that list, and get their feedback wether this is resolvable and if not if this is going to be fixed in the next version.

jjbilly
05-16-2005, 09:25 AM
Thanks, I have.

Things aren't quite as bad as I said in my last post - under most conditions, redo does work.

hangalot
05-16-2005, 09:31 AM
still drop it on the other list. an engineer might reply...

jjbilly
05-16-2005, 09:37 AM
Yes, I have. The rest of the bug is still quite serious enough.

jjbilly
08-25-2005, 05:21 PM
Finally sorted this out.

You have to have a path (even an empty one) and call makeShape to get into the history panel. The whole of the tool's drawing then gets included, whatever part the path is responsible for.

hangalot
08-25-2005, 05:26 PM
cool info.

senocular
08-25-2005, 05:35 PM
good point about polystar. i heard rumours that MM were going to release a webservice to that obfuscating tool, but thus far i ain't seen any of that.

I always thought it was retarded that they did that for Flash. They didn't for Fireworks.