• 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
Re: binding trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding trouble


  • Subject: Re: binding trouble
  • From: Mark Morris <email@hidden>
  • Date: Mon, 27 Jun 2005 21:14:07 -0500

To follow up my own post, one advantage of the valueForKeyPath option, if you want to use this way to get your images in more than one place in your app, you can subclass WOComponent, override valueForKeyPath to handle your images (and anything else you want to standardize this way), and then you can just use it in any page you wish.

Regards,
Mark

On Jun 27, 2005, at 9:06 PM, Mark Morris wrote:

The purpose of the java file in a WOComponent is to support the interface, so having a method for each image is not per se a bad thing. If it's cleaner in your case, have each cover method call one main method, passing the appropriate parameter.

That said, I've used the suggested idea of overriding valueForKeyPath before, and that's a good suggestion for this case.

Regards,
Mark

On Jun 27, 2005, at 3:36 PM, David LeBer wrote:



On 27-Jun-05, at 4:27 PM, Amedeo Mantica wrote:



because I have more than one image for each repetition
Amedeo

On 27/giu/05, at 21:55, Arturo Perez wrote:




Amedeo Mantica wrote:




Yes Arturo, but doing this I need a Java method for each image...
I'm trying to do it in an unique Java method, but I need to pass it the variable.
Amedeo







You are in a repetition so why do you need a unique variable for every image?






I still feel that the cleanest way to handle this would be to create a reusable component that wraps a WOImage with it's src bound to a method that creates the full path from a "fileName" binding.

Add as many of these as you need inside the WORepetition. Binding the fileName to each to the appropriate image string in your iterator object.

No muss, no fuss, no duplicate methods.

;david

--
David LeBer
Codebase Software Systems
site:   http://www.codebase.ca
blog: http://david.codebase.ca


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


This email sent to email@hidden


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


This email sent to email@hidden


_______________________________________________ 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
References: 
 >binding trouble (From: Amedeo Mantica <email@hidden>)
 >Re: binding trouble (From: David LeBer <email@hidden>)
 >Re: binding trouble (From: Amedeo Mantica <email@hidden>)
 >Re: binding trouble (From: Arturo PĂ©rez <email@hidden>)
 >Re: binding trouble (From: Amedeo Mantica <email@hidden>)
 >Re: binding trouble (From: Arturo Perez <email@hidden>)
 >Re: binding trouble (From: Amedeo Mantica <email@hidden>)
 >Re: binding trouble (From: David LeBer <email@hidden>)
 >Re: binding trouble (From: Mark Morris <email@hidden>)

  • Prev by Date: Re: binding trouble
  • Next by Date: Re: _obtainOpenChannel exception, yet connected
  • Previous by thread: Re: binding trouble
  • Next by thread: Re: binding trouble
  • Index(es):
    • Date
    • Thread