Firebolt93q / zootoolbox

Automatically exported from code.google.com/p/zootoolbox
1 stars 1 forks source link

Clicking "close" in the "edit command" window while previewing command saves the populated command #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
line 145 of zooObjMenu, in proc zooObjMenuSaveCmd, should be changed from

        string $cmdStr = `scrollField -q -tx zooOMCmdText`;

to

    string $cmdStr = zooGetObjMenuCmdStr($obj, $cmdNum);

Otherwise, when the user clicks "close" while the "preview" box is checked,
it will save the populated command (with all the %1's, etc, replaced and
hard coded...)

A changed version of zooObjMenu is attached...

Original issue reported on code.google.com by elron...@gmail.com on 24 Mar 2007 at 12:48

Attachments:

GoogleCodeExporter commented 8 years ago
Ooops... heh, not sure what I was thinking when I made that change.  That would
obviously mean nothing would ever be saved...

Instead, look at this newer revision of zooObjMenu I made... basically, I 
changed
zooObjMenuSaveCmd so it checks the enabled state of the command field before 
changing
the command field... this way it won't save a populated command if you click 
close or
change the name while the preview button is checked (but WILL still save the 
name
change).  Also, I added a save command when a new command is selected to be 
edited -
either by the right click menu, or when the integer value for the current 
command is
changed.

Original comment by elron...@gmail.com on 24 Mar 2007 at 2:22

Attachments:

GoogleCodeExporter commented 8 years ago
cool thanks for that elrond.  I was aware of that bug.  admittedly I had 
forgotten
it, but it has bitten me once.  I think what should happen is it just saves 
whenever
the UI state changes.  although, I almost always do my editing of commands in
triggered, not the objmenu editor.

thanks!

Original comment by macaroni...@gmail.com on 24 Mar 2007 at 6:03