[OMC] OMC Digest, Vol 49, Issue 2

OnMyCommand discussion omc at abracode.com
Sun Dec 13 07:47:01 PST 2009


Great work Tom and Knut ... Carbon and 64-bit Rules!

Any chance of an autocomplete Combo Menu item being added to OMC's Interface Builder Plugin for the final release ;-)

M.


On Dec 12, 2009, at 2:00 PM, OMC-request at abracode.com wrote:

> Send OMC mailing list submissions to
> 	omc at abracode.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://abracode.com/mailman/listinfo/omc_abracode.com
> or, via email, send a message with subject or body 'help' to
> 	omc-request at abracode.com
> 
> You can reach the person managing the list at
> 	omc-owner at abracode.com
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of OMC digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Issues with output display again.... (OnMyCommand discussion)
>   2. Re: Issues with output display again.... (OnMyCommand discussion)
>   3. OMC 2.2 preview 6 (OnMyCommand discussion)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 11 Dec 2009 20:33:52 -0800
> From: OnMyCommand discussion <omc at abracode.com>
> Subject: Re: [OMC] Issues with output display again....
> To: "omc at abracode.com" <omc at abracode.com>
> Message-ID: <410BC53B-5DC3-42F2-BB9A-9435373D753C at abracode.com>
> Content-Type: text/plain;	charset=us-ascii;	format=flowed;	delsp=yes
> 
> Sorry for delay in response. Crazy
> 
> Sent from my iPhone
> 
> On Dec 6, 2009, at 5:09 AM, OnMyCommand discussion <omc at abracode.com>  
> wrote:
> 
>> Hi,
>> 
>> Sorry to rehash this. I'm having trouble getting the output from  
>> this command to display in an output window.
>> 
>> It seems to output fine in the Terminal but when using a popen with  
>> Output Window execution method I get nothing. Escaping issues again?  
>> Redirecting output (2>&1)??
>> 
>> Any insight would be helpful.
>> 
>> Thanks.
>> 
>> 
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd 
>> ">
>> <plist version="1.0">
>> <dict>
>>   <key>COMMAND_LIST</key>
>>   <array>
>>       <dict>
>>           <key>ACTIVATION_MODE</key>
>>           <string>act_always</string>
>>           <key>CATEGORIES</key>
>>           <array>
>>               <string>Tag</string>
>>               <string>Metadata</string>
>>           </array>
>>           <key>COMMAND</key>
>>           <array>
>>               <string>action=$(/bin/echo -n </string>
>>               <string>__DLG_INPUT_TEXT__</string>
>>               <string> | cut -c 1-4)
>> values=$(/bin/echo -n </string>
>>               <string>__DLG_INPUT_TEXT__</string>
>>               <string> | sed 's/'$action'//')
>> 
>> if [ $action = lst ] ; then
>>   openmeta $values "</string>
>>               <string>__OBJ_PATH__</string>
>>               <string>" | grep "tags" | sed 's/tags: //'
>> elif [ $action = clr ] ; then
>>   openmeta $values "</string>
>>               <string>__OBJ_PATH__</string>
>>               <string>"
>> fi</string>
>>           </array>
>>           <key>ESCAPE_SPECIAL_CHARS</key>
>>           <string>esc_none</string>
>>           <key>EXECUTION_MODE</key>
>>           <string>exe_popen_with_output_window</string>
>>           <key>INPUT_DIALOG</key>
>>           <dict>
>>               <key>DEFAULT</key>
>>               <string>List Tags</string>
>>               <key>INPUT_MENU</key>
>>               <array>
>>                   <dict>
>>                       <key>NAME</key>
>>                       <string>List Items Tags</string>
>>                       <key>VALUE</key>
>>                       <string>lst -p</string>
>>                   </dict>
>>                   <dict>
>>                       <key>NAME</key>
>>                       <string>Clear Items Tags</string>
>>                       <key>VALUE</key>
>>                       <string>clr -s -p</string>
>>                   </dict>
>>               </array>
>>               <key>INPUT_TYPE</key>
>>               <string>input_popup_menu</string>
>>               <key>MESSAGE</key>
>>               <string>Select option:</string>
>>           </dict>
>>           <key>MULTIPLE_OBJECT_SETTINGS</key>
>>           <dict>
>>               <key>PREFIX</key>
>>               <string></string>
>>               <key>PROCESSING_MODE</key>
>>               <string>proc_together</string>
>>               <key>SEPARATOR</key>
>>               <string> </string>
>>               <key>SEPERATOR</key>
>>               <string></string>
>>               <key>SORT_METHOD</key>
>>               <string>sort_none</string>
>>               <key>SUFFIX</key>
>>               <string></string>
>>           </dict>
>>           <key>NAME</key>
>>           <array>
>>               <string>MetaTag Tools (openmeta)</string>
>>           </array>
>>           <key>NOTES</key>
>>           <string>openmeta version 0.1 by Tom Andersen code.google.com/p/openmeta/
>> 
>> Usage: openmeta [options] -p PATH[s]
>> 
>> Note that commas are to be used nowhere - tag lists use quotes for  
>> two word tags in output
>> 
>> example (list tags and ratings):  openmeta -p PATH
>> example (list tags and ratings multiple):  openmeta -p PATH PATH
>> example (list tags): openmeta -t -p PATH[s]
>> example (add tags): openmeta -a foo bar -p PATH[s]
>> example (add tags with spaces): openmeta -a "three word tag" "foo  
>> bar" -p PATH[s]
>> example (set tags):  openmeta -s foo bar -p PATH[s]
>> example (clear all tags):  openmeta -s -p PATH[s]
>> example (set managed):  openmeta -m Y -p PATH[s]
>> example (set rating 0 - 5 stars):  openmeta -r 3.5 -p PATH[s]
>> example (print rating):  openmeta -r -p PATH[s]
>> example (clear rating):  openmeta -r 0.0 -p PATH[s]
>> example (lousy rating):  openmeta -r 0.1 -p PATH[s]
>> 
>> 
>> openmeta __DLG_INPUT_TEXT__ "__OBJ_PATH__" | grep "tags" | sed 's/ 
>> tags: //'</string>
>>           <key>OUTPUT_WINDOW_SETTINGS</key>
>>           <dict>
>>               <key>AUTO_CLOSE_ON_SUCCESS_ONLY</key>
>>               <true/>
>>               <key>AUTO_CLOSE_TIMEOUT</key>
>>               <real>-1</real>
>>               <key>BACKGROUND_COLOR</key>
>>               <string>FFFFFF</string>
>>               <key>TEXT_COLOR</key>
>>               <string>000000</string>
>>               <key>TEXT_FONT</key>
>>               <string>Monaco</string>
>>               <key>TEXT_SIZE</key>
>>               <integer>10</integer>
>>               <key>WINDOW_ALPHA</key>
>>               <real>1</real>
>>               <key>WINDOW_CLOSE_FADE_OUT</key>
>>               <false/>
>>               <key>WINDOW_HEIGHT</key>
>>               <integer>200</integer>
>>               <key>WINDOW_OPEN_FADE_IN</key>
>>               <false/>
>>               <key>WINDOW_POSITION</key>
>>               <string>alert</string>
>>               <key>WINDOW_TITLE</key>
>>               <string>Tags List</string>
>>               <key>WINDOW_TYPE</key>
>>               <string>floating</string>
>>               <key>WINDOW_WIDTH</key>
>>               <integer>400</integer>
>>           </dict>
>>           <key>SUBMENU_NAME</key>
>>           <string>System/Labels</string>
>>           <key>VERSION</key>
>>           <integer>1</integer>
>>       </dict>
>>   </array>
>>   <key>VERSION</key>
>>   <integer>2</integer>
>> </dict>
>> </plist>
>> 
>> 
>> 
>> 
>> _______________________________________________
>> OMC mailing list
>> OMC at abracode.com
>> http://abracode.com/mailman/listinfo/omc_abracode.com
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 11 Dec 2009 20:38:06 -0800
> From: OnMyCommand discussion <omc at abracode.com>
> Subject: Re: [OMC] Issues with output display again....
> To: omc at abracode.com
> Message-ID: <F0C694D7-9377-4E05-968C-F9D10E84D2E3 at abracode.com>
> Content-Type: text/plain;	charset=us-ascii;	format=flowed;	delsp=yes
> 
> ... crazy week..
> Check the console for errors.
> My guess is that openmeta tool could not be found. Use full path to  
> the tool.
> Tom
> Abracode
> 
> Sent from my iPhone
> 
> On Dec 11, 2009, at 8:33 PM, "Tomasz Kukielka (Old)" <tom-old at abracode.com 
>> wrote:
> 
>> Sorry for delay in response. Crazy
>> 
>> Sent from my iPhone
>> 
>> On Dec 6, 2009, at 5:09 AM, OnMyCommand discussion  
>> <omc at abracode.com> wrote:
>> 
>>> Hi,
>>> 
>>> Sorry to rehash this. I'm having trouble getting the output from  
>>> this command to display in an output window.
>>> 
>>> It seems to output fine in the Terminal but when using a popen with  
>>> Output Window execution method I get nothing. Escaping issues  
>>> again? Redirecting output (2>&1)??
>>> 
>>> Any insight would be helpful.
>>> 
>>> Thanks.
>>> 
>>> 
>>> 
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd 
>>> ">
>>> <plist version="1.0">
>>> <dict>
>>>  <key>COMMAND_LIST</key>
>>>  <array>
>>>      <dict>
>>>          <key>ACTIVATION_MODE</key>
>>>          <string>act_always</string>
>>>          <key>CATEGORIES</key>
>>>          <array>
>>>              <string>Tag</string>
>>>              <string>Metadata</string>
>>>          </array>
>>>          <key>COMMAND</key>
>>>          <array>
>>>              <string>action=$(/bin/echo -n </string>
>>>              <string>__DLG_INPUT_TEXT__</string>
>>>              <string> | cut -c 1-4)
>>> values=$(/bin/echo -n </string>
>>>              <string>__DLG_INPUT_TEXT__</string>
>>>              <string> | sed 's/'$action'//')
>>> 
>>> if [ $action = lst ] ; then
>>>  openmeta $values "</string>
>>>              <string>__OBJ_PATH__</string>
>>>              <string>" | grep "tags" | sed 's/tags: //'
>>> elif [ $action = clr ] ; then
>>>  openmeta $values "</string>
>>>              <string>__OBJ_PATH__</string>
>>>              <string>"
>>> fi</string>
>>>          </array>
>>>          <key>ESCAPE_SPECIAL_CHARS</key>
>>>          <string>esc_none</string>
>>>          <key>EXECUTION_MODE</key>
>>>          <string>exe_popen_with_output_window</string>
>>>          <key>INPUT_DIALOG</key>
>>>          <dict>
>>>              <key>DEFAULT</key>
>>>              <string>List Tags</string>
>>>              <key>INPUT_MENU</key>
>>>              <array>
>>>                  <dict>
>>>                      <key>NAME</key>
>>>                      <string>List Items Tags</string>
>>>                      <key>VALUE</key>
>>>                      <string>lst -p</string>
>>>                  </dict>
>>>                  <dict>
>>>                      <key>NAME</key>
>>>                      <string>Clear Items Tags</string>
>>>                      <key>VALUE</key>
>>>                      <string>clr -s -p</string>
>>>                  </dict>
>>>              </array>
>>>              <key>INPUT_TYPE</key>
>>>              <string>input_popup_menu</string>
>>>              <key>MESSAGE</key>
>>>              <string>Select option:</string>
>>>          </dict>
>>>          <key>MULTIPLE_OBJECT_SETTINGS</key>
>>>          <dict>
>>>              <key>PREFIX</key>
>>>              <string></string>
>>>              <key>PROCESSING_MODE</key>
>>>              <string>proc_together</string>
>>>              <key>SEPARATOR</key>
>>>              <string> </string>
>>>              <key>SEPERATOR</key>
>>>              <string></string>
>>>              <key>SORT_METHOD</key>
>>>              <string>sort_none</string>
>>>              <key>SUFFIX</key>
>>>              <string></string>
>>>          </dict>
>>>          <key>NAME</key>
>>>          <array>
>>>              <string>MetaTag Tools (openmeta)</string>
>>>          </array>
>>>          <key>NOTES</key>
>>>          <string>openmeta version 0.1 by Tom Andersen code.google.com/p/openmeta/
>>> 
>>> Usage: openmeta [options] -p PATH[s]
>>> 
>>> Note that commas are to be used nowhere - tag lists use quotes for  
>>> two word tags in output
>>> 
>>> example (list tags and ratings):  openmeta -p PATH
>>> example (list tags and ratings multiple):  openmeta -p PATH PATH
>>> example (list tags): openmeta -t -p PATH[s]
>>> example (add tags): openmeta -a foo bar -p PATH[s]
>>> example (add tags with spaces): openmeta -a "three word tag" "foo  
>>> bar" -p PATH[s]
>>> example (set tags):  openmeta -s foo bar -p PATH[s]
>>> example (clear all tags):  openmeta -s -p PATH[s]
>>> example (set managed):  openmeta -m Y -p PATH[s]
>>> example (set rating 0 - 5 stars):  openmeta -r 3.5 -p PATH[s]
>>> example (print rating):  openmeta -r -p PATH[s]
>>> example (clear rating):  openmeta -r 0.0 -p PATH[s]
>>> example (lousy rating):  openmeta -r 0.1 -p PATH[s]
>>> 
>>> 
>>> openmeta __DLG_INPUT_TEXT__ "__OBJ_PATH__" | grep "tags" | sed 's/ 
>>> tags: //'</string>
>>>          <key>OUTPUT_WINDOW_SETTINGS</key>
>>>          <dict>
>>>              <key>AUTO_CLOSE_ON_SUCCESS_ONLY</key>
>>>              <true/>
>>>              <key>AUTO_CLOSE_TIMEOUT</key>
>>>              <real>-1</real>
>>>              <key>BACKGROUND_COLOR</key>
>>>              <string>FFFFFF</string>
>>>              <key>TEXT_COLOR</key>
>>>              <string>000000</string>
>>>              <key>TEXT_FONT</key>
>>>              <string>Monaco</string>
>>>              <key>TEXT_SIZE</key>
>>>              <integer>10</integer>
>>>              <key>WINDOW_ALPHA</key>
>>>              <real>1</real>
>>>              <key>WINDOW_CLOSE_FADE_OUT</key>
>>>              <false/>
>>>              <key>WINDOW_HEIGHT</key>
>>>              <integer>200</integer>
>>>              <key>WINDOW_OPEN_FADE_IN</key>
>>>              <false/>
>>>              <key>WINDOW_POSITION</key>
>>>              <string>alert</string>
>>>              <key>WINDOW_TITLE</key>
>>>              <string>Tags List</string>
>>>              <key>WINDOW_TYPE</key>
>>>              <string>floating</string>
>>>              <key>WINDOW_WIDTH</key>
>>>              <integer>400</integer>
>>>          </dict>
>>>          <key>SUBMENU_NAME</key>
>>>          <string>System/Labels</string>
>>>          <key>VERSION</key>
>>>          <integer>1</integer>
>>>      </dict>
>>>  </array>
>>>  <key>VERSION</key>
>>>  <integer>2</integer>
>>> </dict>
>>> </plist>
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> OMC mailing list
>>> OMC at abracode.com
>>> http://abracode.com/mailman/listinfo/omc_abracode.com
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 11 Dec 2009 23:58:25 -0800
> From: OnMyCommand discussion <omc at abracode.com>
> Subject: [OMC] OMC 2.2 preview 6
> To: OMC at abracode.com
> Message-ID: <6D4D15D6-B653-4601-B475-4933D31D49C8 at abracode.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 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
> 
> 
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> OMC mailing list
> OMC at abracode.com
> http://abracode.com/mailman/listinfo/omc_abracode.com
> 
> 
> End of OMC Digest, Vol 49, Issue 2
> **********************************




More information about the OMC mailing list