Auto-Selection of an object in a PopUp Button
Auto-Selection of an object in a PopUp Button
- Subject: Auto-Selection of an object in a PopUp Button
- From: David Griffith <email@hidden>
- Date: Tue, 09 Nov 2004 14:24:20 +0100
HI all,
I am using a WOPopUpButton which displays a list of countries.
NSMutableArray countryList;
Country country;
The list above is the 'list' attribute and the country object is the 'item'
attribute.
The list is populated by retrieving all Country objects from a table using a
fetch spec. The list populates fine.
I have a selectedCountry object of type Country also, this is bound to the
selection attribute.
As I understand it, and as has been true in other cases in the past, if I
assign to selectedCountry, it should select that object in the list.
Normally, it does. I mean, in other siuations.
However, the selectedCountry object is actually a fault (since I am using a
different editingContext in this situation and the country objects would
previously have been loaded into the default editing context).
So, selectedCountry is a fault for a Country object and the Country objects
in the list are not.
My question is, would the fact that selectedCountry is a fault cause the
item not to be selected in the WOPopUpButton? Or should it still consider
them to be equal? This is driving me crazy.
I have tried everything I can think of and even the System.out.println()
messages are weird. Even though I have two of them, one after the other in
code, the second one is being output first and the first one is being output
in the MIDDLE of the second one. Very strange indeed.
Any help would be greatly appreciated!
Kind regards,
Dave Griffith.
_______________________________________________
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