Re: Hashtable to WOString?
Re: Hashtable to WOString?
- Subject: Re: Hashtable to WOString?
- From: David Teran <email@hidden>
- Date: Sat, 23 Oct 2004 11:36:51 +0200
Well, did you try this:
aString: WOString {
value = myHashtable.keyName;
}
afaik this should work.
regards David
Am 23.10.2004 um 00:20 schrieb Nathan Dumar:
Aha! Number 2 is what I was hoping to hear. Thanks Colin!
Nathan
On Oct 22, 2004, at 6:00 PM, Colin Clark wrote:
Hi Nathan,
You're right, you can't pass arguments in WOComponent bindings, so
your first approach won't work. For any object that implements
Key-Value Coding, you could simply bind up the key name, such as with
an NSDictionary (eg. myDictionary.keyName). However, Hashtable
doesn't speak KVC, so there are a couple of other options:
1. Write an accessor in your WOComponent for that key of the
Hashtable:
public String getValueFromHashtable {
return myHashtable.get("keyName");
}
2. Convert your Hashtable into an NSDictionary. There's a constructor
available for that.
NSDictionary myDictionary = new NSDictionary(myHashtable);
I hope that helps,
Colin
On Friday, October 22, 2004, at 05:30 PM, Nathan Dumar wrote:
Is there an easy way of getting some text out of a Hashtable and
into a WOString? I thought that I could set the binding in
WOBuilder to aHashtable.get("key"), but that does not work.
If there's no simple way, then I'll just right a method to return
the String value.
Thank you,
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
---
Colin Clark
Dynamic Web and Database Development Lead,
Resource Centre for Academic Technology,
University of Toronto
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
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