Re: Creating an NSArray Key
Re: Creating an NSArray Key
- Subject: Re: Creating an NSArray Key
- From: Sacha Mallais <email@hidden>
- Date: Wed, 19 Oct 2005 10:43:52 -0700
On Oct 19, 2005, at 9:16 AM, WODev wrote:
Hi everyone,
I starting to learn WebObjects, but I've come into a little issue
trying to create an NSArray from an Entity.
It often helps to know what version you're using...
In the WOBuilder, when I try to create a key for a list in a
WORepetition, code is created in the .java file, but it's
not showing up in the list where my other keys are.
Obviously, a method that returns null will not show up.
To create the key, I've:
a) Clicked Edit -> Edit Source -> Add Key
b) Name: accountEntries -> Type Array of: Accounts -> Generate
source code for: method returning a value
The code that is entered in the .java files is:
/** @TypeInfo Accounts */
public (null) accountEntries()
{
return accountEntries;
}
Shouldn't the code have been:
/** @TypeInfo Accounts */
public NSArray accountEntries()
{
return accountEntries;
}
When you create a new key in WOBuilder, there is (at least there use
to be...) a drop down box to choose what type it is going to be. If
you leave it blank, you'll get null.
If I modify the code to be "public NSArray ...", I now see a key in
the WOBuilder, but it gives me a list of my
variables that are in the entity, not the functions of ( @avg,
@count, @max, ....)
Now that is strange. I would double check that you're actually
looking at the right key, but other than that, I can only suggest
restarting Xcode and WOBuilder...
sacha
--
Sacha Michel Mallais 800 lb. gorilla
Global Village Consulting Inc. http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
1. Never tell everything at once.
-- Ken Venturi, Ken Venturi's Two Great Rules of Life
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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