modifying class initalisation
modifying class initalisation
- Subject: modifying class initalisation
- From: Tommy Nordgren <email@hidden>
- Date: Thu, 21 Apr 2005 03:01:09 +0200
Are there any way to have custom code called when Appkit classes are
inyialized
from a nib file? The idea is to have a single nib file for all
localisations, and use special
code to set any strings displayed (on a button for example) from a
localized.strings file.
I've already tested doing this by subclassing, but i would prefer a
more general solution.
Can I add a category to NSObject, that check if the class provide
certain string getter and setter methods, and call them if appliable.
The basic idea is to do the following.
1. Call the getter method to get a string.
2. Use it as key in localizable.strings.
3. Store the new string with the appropriate setter method.
I wan't to do this to allow translations, without having localized
versions of the nib file,
which if edited separately might by mistake get erroneous settings for
connections or bindings.
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden