• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Creating an NSArray Key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating an NSArray Key


  • Subject: Re: Creating an NSArray Key
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 19 Oct 2005 11:34:46 -0700

IIRC, this is a known bug in the version of WOBuilder that ships with WO 5.3. I don't recall if there was a work around or not.

Chuck


On Oct 19, 2005, at 11:31 AM, WODev wrote:

Sacha Mallais <email@hidden> on Wednesday, October 19, 2005 at 1:43 PM -0500 wrote:

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...


Version is 5.3 as mentioned in the bottom of the original email.





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.


It wasn't left blank. The type was set to "Accounts"




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...


Have restarted a few times.

In WOBuilder under "Main" I see:
application             >
session             >
accountEnumerator    >
newFirstName        >
newLastName        >

--------
what I don't see is:
accountEntries         >>

accountEntries was create by:
addKey -> give a Name -> set the "Type as: "Array of: Accounts" -> uncheck all except for "a method of the value"



"Accounts" is the eomodel that was added at the creation of the project.



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




----- Dominique Démoré Technical Services Coordinator Rainbow District School Board 69 Young Street Sudbury, Ontario P3E 3G5 Tel: (705) 674-3171 x. 258 Fax: (705) 671-2442


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ 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
References: 
 >Re: Creating an NSArray Key (From: "WODev" <email@hidden>)

  • Prev by Date: Re: Creating an NSArray Key
  • Next by Date: Re: NSDictionary and FetchSpecificationNamed usage
  • Previous by thread: Re: Creating an NSArray Key
  • Next by thread: IP & User Agent
  • Index(es):
    • Date
    • Thread