Monday, July 16, 2018

#1 2005-09-09 10:42:59 pm

ideasculptor
Member
Registered: 2005-09-10
Posts: 3

automator action interface question

I'm new to both applescript and Cocoa (but have a decade of software engineering under my belt) and I managed to leave my applescript book at work, so I have limited resources.  I figure it never hurts to ask.

I'm building an automator action, and I've been basing it on the tutorial from apple, but they don't give much of a hint about bindings on controls, since they only use radio buttons and a single text field.  I have three pop up menus.  Where I'm stuck is figuring out how to populate the varous bindings that are necessary to populate the pop up menu with the options I want, assigned to the index that I want.  I think I can interpolate everything else about my action from the tutorial, but this one has stumped me. I couldn't find anything obvious in the javascript studio documentation, either.

I've got the values of my interface controls mapped to the parameters of the action, but the content of the pop up menus is eluding me.  I suppose it may be possible to put lists in the parameters, and then put the correct content for the lists in the default parameters, but something tells me there's a better way.  I don't really know how I would bind the content to the parameters, anyway.

Help, please.

Thanks

--sam

Offline

 

#2 2005-09-09 10:55:04 pm

ideasculptor
Member
Registered: 2005-09-10
Posts: 3

Re: automator action interface question

OK, I figured it out.  Could apple make that any less clear?  Just for reference, double click on the NSPopUpButton, which will reveal 3 generic items.  Click on those to edit them.  To add more items, you must first double click on the NSPopUpButton to display the current items.  Then grab the 'item' (NSMenuItem) object from the menus tab, and drag it onto the list of items.

--sam

Offline

 

#3 2005-09-09 11:05:35 pm

ideasculptor
Member
Registered: 2005-09-10
Posts: 3

Re: automator action interface question

I spoke too soon.  I added the items, but when I 'Test Interface,' all three popup menus just say 'no selection' and are disabled.  Any suggestions?

--sam

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)