Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing arguments through a binding



I'm trying to find a low-maintenance way to bind the titles of my
controls to runtime-generated (internationalized) strings, preferably in
IB. Ideally, what I'd like to do is assign a "tag" to each control and
bind the "title" attribute to a method so that when the control wants to
set it's title, it calls the method passing it it's tag which then
generates the string. I tried looking through the KVC/KVO docs and it
looks like it is not possible to pass an argument to a method used in a
binding, is this correct?

My application is one of several front-ends to a shell-script based
installer. The back-end runs on multiple platforms and provides all of
the resources (strings) to the various front-ends upon request. It is
not feasible to restructure this application so that the Cocoa based
front-end uses resources from a NIB-file, they need to be provided by
the back-end at runtime.

If possible, I'd like to avoid having to manually query for each
internationalized string in code. I'm a Cocoa newbie, so maybe there is
something obvious that I'm missing, but it looks like unless I can pass
an argument to a binding, I'm basically out of luck.

Does anybody have any ideas?

Thanks,
-Nathan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.