Hi there,

On 16/11/2005, at 10:48 AM, Randy Becker wrote:

On Nov 15, 2005, at 6:21 PM, Sacha Michel Mallais wrote:

On Nov 15, 2005, at 2:46 PM, Randy Becker wrote:

but I'd like to do something like
String format = "(title caseInsensitiveLike %s) OR (title caseInsensitiveLike %s)";

That exact format string will work. The only difference is you'll need to include a second argument for the second %s.

by the way, there must be a better way of doing this than the following:
NSMutableArray arguments = new NSMutableArray();
arguments.addObject(searchQueryWithWildcard);
arguments.addObject(searchQueryWithWildcard);
NSArray args = new NSArray(arguments);

Yep, get rid of the last line; it's redundant as NSMutableArray is an NSArray.

The options:
1) NSArray args = new NSArray(new Object[] {
        o1, o2, ..., oN
});

2) NSMutableArray args = new NSMutableArray();
args.addObject(o1);
args.addObject(o2);
...
args.addObject(oN);

Secondly, how can I display data from an object related to one that is displayed in a WORepetition. Right now, I'm only able to access the attributes of a particular object I'm outputting, and the information I'd like to display is located in a related object.

Through the magic of Key Value Coding. If you have two objects a and b, where a relates to b, and where both have a "name" attribute, then all the following will work:

key path      gives
----------------------------------------
a             the object a
a.name        a's name
a.name.length a's name's length
a.b           the b that is related to a
a.b.name      the name of the b that is related to a

Actually, the two objects I'm dealing with in particular do not have the same attributes - I want to find the address of a person who owns an item, but an item can be owned and posessed by different people, thusly, I'm trying to do something like item.owner.address - but item also is related to a person by the item.possessor attribute...

then you want item.possessor.address
Where are you trying to do this? e.g., WebObjects Builder makes it easy to navigate the key-paths and connect the attribute in question to the display...

with regards,
--

Lachlan Deck


_______________________________________________
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