My official policy is that toString() should never be used for real code 
dependencies -- it should only be for debugging. It's much better to be 
explicit, IMO.

ms

On Feb 17, 2010, at 5:28 AM, Frédéric JECKER wrote:

> ... or add a toString() method to your object :)
> 
> Le 16 févr. 2010 à 17:53, James Cicenia a écrit :
> 
>> I swear.. I mean it, really, I do, I had  .name tagged on that.
>> 
>> Too much D2W can totally mess with one's mind.
>> 
>> I will slay this beast! I swear.
>> 
>> 
>> 
>> On Feb 16, 2010, at 10:35 AM, Ramsey Gurley wrote:
>> 
>>> Because you're binding to the object, not a string.  Use something like
>>> 
>>> displayString = aFestivalArtist.userPresentableDescription
>>> 
>>> instead.
>>> 
>>> Ramsey
>>> 
>>> On Feb 16, 2010, at 11:28 AM, James Cicenia wrote:
>>> 
>>>> Why won't displayString not display the string but the ugly object info?
>>>> 
>>>> Here is the scenario.
>>>> 
>>>> My own D2W custom popup component to set a relationship. Seemingly trivial.
>>>> 
>>>> wod:
>>>> 
>>>> PopUpButton1: WOPopUpButton {
>>>>    list = thePerformance.festival.festivalArtists;
>>>>    selection = theFestivalArtist;
>>>>    noSelectionString = "-- Select Artist --";
>>>>    item = aFestivalArtist;
>>>>    displayString = aFestivalArtist;        
>>>> }
>>>> 
>>>> java:
>>>> 
>>>> public class PickFestivalArtist extends ERDCustomComponent {
>>>>    public FestivalArtist theFestivalArtist;
>>>>    public FestivalArtist aFestivalArtist;
>>>>  
>>>>     public PickFestivalArtist(WOContext context) {
>>>>         super(context);
>>>>     }
>>>>     
>>>>     public boolean isStateless() { return false; }
>>>> 
>>>>     public Performance thePerformance() { return 
>>>> (Performance)valueForBinding("object"); }
>>>>    
>>>>   
>>>>    public void setTheFestivalArtist(FestivalArtist newValue) throws 
>>>> Exception {
>>>>            thePerformance().takeStoredValueForKey(newValue, 
>>>> "festivalArtist");
>>>>    }
>>>> 
>>>>    public FestivalArtist theFestivalArtist(){
>>>>            return (FestivalArtist)thePerformance().festivalArtist();
>>>>    }
>>>> }
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com
>>>> 
>>>> This email sent to [email protected]
>>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/f.jecker%40symaris.com
>> 
>> This email sent to [email protected]
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to