Comrades:

Hi, its me again.

My interface consists (mostly) of a bunch of popup buttons with various values in them. Out user will set up all these popups and click "go", and the app will emit a string which can be used to run a command line program. So, for example we have a couple of popups like:

Color
-black
-red
-green
-blue

Size
-small
-medium
-large

So, lets say that the command line wants something like:
        "runfoo -color 2 -size 1"

and that the "runfoo" help file says
        -color : red = 1, blue = 2, green = 3, black = 4, default = 4
        -size : small = 1, medium = 2, large = 3, default = 3

So, here is my question. What is the best way to translate between the popup item and the value? I was thinking of building an NSDictionary with item_string_key/command_line_argument_value pairs, but I realized that I have a bunch of different "default" values (color default = 4, size default = 3).

I guess I could have a dictionary for each popup, but that seems clunky. I see there is something called "Bindings" for menu/popup items, is that a way to go? (I am trying not to put the info in the NIB, I would prefer code, where I can see it.)




Paul Archibald


--------------------------------------------------
"The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague."

Edsger W. Dijkstra, (Dutch computing scientist)
---------------------------------------------------



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to