[OMC] OMC 2.2 preview 6

OnMyCommand discussion omc at abracode.com
Fri Dec 11 23:58:25 PST 2009


Hello,

OMC 2.2 Preview 6 is available at:
http://www.abracode.com/free/cmworkshop/OMC_2.2pr6.zip

The last public preview was Preview 1. Previews 2 through 5 were private. The notes from "What's New" document are below.
Except for bug fixes, the new things are: table control support for Cocoa nib windows and localization support. Localization support has 2 pieces: localization of scripts with help of new "loco" tool and localization of OMC command keys with new LOCALIZATION_TABLE_NAME tag. The localization only works for  droplets or external .omc modules, not for plain contextual menu items - generally localization requires a bundle where we can put a .strings file in different .lproj subfolders. We eat our own dog food by localizing OMCEdit "droplet builder" scripts.
Also, the custom output window (with background image) has been rewritten in Cocoa and this completes Carbon removal - now we have complete 64 bit support in Snow Leopard and you can switch to Shortcuts 64 bit.

One note: NIB_CONTROL_MULTIPLE_SELECTION_ITERATION option is not available in OMCEdit GUI. It is a quite advanced option only for people who build custom nib dialogs with table view controls and allow multiple row selection. I created a couple of such dialogs so I need it but I doubt anybody else would use it. Therefore I am OK with not including it in OMCEdit - unless someone will ask for it.

If everything goes well, this will be the last preview and we will release 2.2 final soon.

Last but not least, thanks to Knut for continued work on OMCEdit. BTW, did you know that Knut wrote a book about Mac OS 10.6? Unfortunately it is only in German but if you speak German, I recommend you check it out:
http://www.it-fachportal.de/1716


Enjoy,
Tom
Abracode


----------
OMC 2.2 Preview 6 (December 11, 2009)
1. Knut localized droplet builder scripts in OMCEdit to German using the new LOCALIZATION_TABLE_NAME and loco.
2. Fixed a column header problem for Cocoa table view control (custom nib dialogs)

OMC 2.2 Preview 5 (December 5, 2009 - not public)
1. Fixed missing autocomplete in combo input dialog
2. Fixed several missing localizations when LOCALIZATION_TABLE_NAME tag is present. Added localization for output window:
OUTPUT_WINDOW_SETTINGS
	WINDOW_TITLE
3. Knut added edit field for LOCALIZATION_TABLE_NAME in OMCEdit under "Miscellaneous"

OMC 2.2 Preview 4 (November 16, 2009 - not public )
1. Added new key to command description: LOCALIZATION_TABLE_NAME. It is a string value and should not include ".strings" extension. This can be used in droplets or external ".omc" modules for localization. If LOCALIZATION_TABLE_NAME key is not present in command description, no attempt is made to localize strings. The following strings in command description are localizable:

NAME and NAME_PLURAL

INPUT_DIALOG
	MESSAGE
	OK_BUTTON_NAME
	CANCEL_BUTTON_NAME
	DEFAULT/DEFAULT_VALUE
	INPUT_MENU each string

Warning dialog strings:
	WARNING
	WARNING_EXECUTE
	WARNING_CANCEL

Navigation dialogs strings:
SAVE_AS_DIALOG/CHOOSE_FILE_DIALOG/CHOOSE_FOLDER_DIALOG/CHOOSE_OBJECT_DIALOG
	DEFAULT_FILE_NAME
	MESSAGE

END_NOTIFICATION
	TITLE
	MESSAGE

Progress dialog:
PROGRESS
	DETERMINATE_COUNTER
		STATUS
	DETERMINATE_STEPS
		in STEPS array each STATUS string


OMC 2.2 Preview 3 (November 11, 2009 - not public)
1. Finished Cocoa table view implementation. Redesigned separate command execution for multiple row selection.
OMC has a support for separate subcommand execution for each row. It is analogous to separate or combined command execution for multiple file selection. Normally the value of the control is just text but if you have multiple rows selected you have to combine text values for single execution (how it is combined, it can be specified in OMCTableView custom interface builder inspector) or tell OMC to iterate the selection and execute given subcommand separately for each selected row. Now the problem was how to associate the subcommand (or subcommands) which should be iterated and executed separately. In Carbon DataBrowser control you put a subcommand id or list of ids in custom control parameters of your data browser control. Those were 'ite!' and 'rev!' tags (if you look in the command description manual). When using Cocoa OMCTableView, instead of putting a list of iterated subcommands in the control description, the association is reversed: now the subcommand itself has a new tag to tell that it wants to be executed separately for given table view. It needs to specify which table view it is. The syntax is:

<key>NIB_CONTROL_MULTIPLE_SELECTION_ITERATION</key>
<dict>
	<key>CONTROL_ID</key>
	<integer>1</integer>
	<key>IS_REVERSE</key>
	<false/>
</dict>
 
The subcommand can be iterated (and executed separately) only by one table. This is by design.  It would be a mess if we allowed 2 or more tables in one window with multiple selection and both iterated - there are too many combinations. The reverse option is to iterate the list of selection from the end.

2. Fixed SIGPIPE issue when you try to input text to stdin and there is no open pipe ready to accept it. The SIGPIPE signal used to quit app. Now we ignore SIGPIPE signals
3. Fixed a problem with Cocoa dialog control values in 64 bit - this was a bad code that was not updated for 64 bit.
4. Updated OMCEdit droplet builder to use Cocoa dialog with the new table view control

OMC 2.2 Preview 2 (October 25, 2009 - not public)
1. "loco" tool for shell script localization. It is available in /Library/Frameworks/Abracode.framework/Support.
Loco takes 2 optional params: "-bundle" and "-table" and the string is the always the last (mandatory) param.
If you don't specify the bundle, loco gets the current working directory and tries to find our the closest enclosing bundle.
If you don't specify the table, loco assumes you want to find the text in "Localizable" table. For "-table" param you pass the name without ".strings" suffix.
In simplest form, if your current path is in a bundle and your string is in "Localizable.strings" file you can use loco just like echo:
"$OMC_OMC_SUPPORT_PATH/loco" "Hello World"
2. Cocoa popup button or combo edit field dynamic population support via omc_dialog_control
3. Work in progress on Cocoa table view





More information about the OMC mailing list