suggestion handling custom 'save as' in actions framework
Posted: Mon Feb 18, 2008 8:52 pm
In the actions demo where you add the code to handle saving custom file formats, there's a flag called "success". If it's false, it displays a warning box.
This needs to be a three-valued flag, not a simple true/false flag, because if you hit the Cancel button on the Save dialog, it's neither a success nor a failure. There needs to be a way to return a value like "canceled" or "ignore" or something like that because internally I think that a return of "success=true" does certain things (like resets the flag that says the file has been saved?) while a return of "success=false" doesn't -- but the false value also displays that warning box, which is just not appropriate if you hit the Cancel button. Neither is it appropriate to say "success=true".
-David
This needs to be a three-valued flag, not a simple true/false flag, because if you hit the Cancel button on the Save dialog, it's neither a success nor a failure. There needs to be a way to return a value like "canceled" or "ignore" or something like that because internally I think that a return of "success=true" does certain things (like resets the flag that says the file has been saved?) while a return of "success=false" doesn't -- but the false value also displays that warning box, which is just not appropriate if you hit the Cancel button. Neither is it appropriate to say "success=true".
-David