• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reusable translated button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reusable translated button


  • Subject: Reusable translated button
  • From: Fabrice Pipart <email@hidden>
  • Date: Mon, 21 Aug 2006 17:19:37 +0200

Hi list !

I am trying to make a reusable component to have buttons translated.
The idea is to just provide a key to the button that will take care to find the translation in the .strings
This looks like Chuck's "LocaleString" but for buttons.

Here is what I did :

TranslatedButton HTML :

<webobject name="link"><webobject name="button"></webobject></webobject>

TranslatedButton .wod :

button : WOGenericElement {
elementName = "input";
type = "button";
value = translatedKey;
}

link : WOHyperlink {
action = action;
}

And I call it using bindings like :

loginButton : TranslatedButton {
action = logIn;
key = "a_key";
}

And here is my problem :

How can I manage to have
- the key bound in TranslatedButton (to be able to translate the key with a ApplicationUtilities.translate(key, session().languages()) )
- have the logIn method called in the parent component
I know I could use performParentAction() but it takes a String and it would not allow me to use code completion in WOLips.
Is there something I can do?

Thanks !

Fabrice

www.easyshadow.com


International Corporate Consulting

Palais de la Scala

1 avenue Henri Dunant

Suite 1155

MC - 98000 Monaco


Skype: fabrice.pipart

Tel.  +377 97 98 21 04 (direct)

Fax. +377 97 70 88 07



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Reusable translated button
      • From: Timo Hoepfner <email@hidden>
    • Re: Reusable translated button
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Proper place for functions in KVC paths?
  • Next by Date: Re: WWDC Videos?
  • Previous by thread: Re: Proper place for functions in KVC paths?
  • Next by thread: Re: Reusable translated button
  • Index(es):
    • Date
    • Thread