[Fxruby-users] Re: Small Bug in FXRuby: Fox::FXUndoList found
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@kn...> - 2004-04-02 15:16:17
|
On Apr 1, 2004, at 1:14 PM, Daniel Sperl wrote: > If I'm right, I just found a small bug in the FXUndoList. <snip> Yes, this looks like a bug. I have just added it to the bug list at SourceForge. > I've got another question regarding the FXUndoList. I did not quite > find out how I could use 'undoName' and 'redoName' properly. Or, to be > more specific, the problem occured only with 'redoName'. > Using 'FXUndoList.current', I can update the text of my undo-command > in the menu -- but how can I get the correct text of the next > redo-Command? I did not manage to access the next redo-Command which > would be called by 'FXUndoList.redo', so I had to insert a new method > into FXUndoList: > > class FXUndoList < FXObject > def currentRedo > @redolist.last > end > end > > Now I could access the next redo-command and therefor alter the text > in my menubar. > > Is there another way to do this, which I overlooked in the > documentation? No, you are correct that there's no way to get a handle on the current redo command. Jeroen has addressed this problem in the FOX 1.2 version of FXUndoList, so in the interest of (future) API compatibility, I think I'll add two new methods: * FXUndoList#undoName returns the text of the current undo command (or nil if there is none) * FXUndoList#redoName returns the same for the current redo command. How does that sound? Lyle |