• 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: Sorting Relationed Records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting Relationed Records


  • Subject: Re: Sorting Relationed Records
  • From: "A. Uchida" <email@hidden>
  • Date: Fri, 23 Jul 2004 00:32:37 +0100

Dear Art,

Thank you very much for your message.

public class DetailPage extends WOComponent {
    protected expence aExpence;
    protected bizAction aBizAction;

public DetailPage(WOContext context) {
super(context);
//sortExpences();
//System.out.println(aBizAction.actionTitle()); <- this also gets the error.

aBizAction is null in the above constructor, so sortExpences() and System.out.println(aBizAction.actionTitle()) will both throw a null pointer exception.

I produced instance of aBizAction (aBizAction = new bizAction()) and it stopped the nullPointerException
error. But now I've got the error "no instance or method for ep_Data"


    public void setABizAction(bizAction newABizAction) {
        aBizAction = newABizAction;

sortExpences() should work here if newABizAction isn't null.

newABizAction in this method referes aBizAction in the previous page and I didn't make
the instance in the previous page.
I simply did the same (aBizAction = new bizAction();) but it gets same
"no instance or method for ep_Data".
(ep_Data is used for a key for sortOrding and a property of expence entity)
I think I missed something very basic.


        NSArray ep = new NSArray();
        ep = aBizAction.expences();
You're unnecessarily creating an NSArray object that is immediately being dereferenced. You're referencing "ec" only once, so you might consider eliminating "ec" altogether.

Thank you for the comment. Initially I didn't use ep (I think you meant ep not "ec").
The nullPointerException error brought me that code to avoid compile error.


Thanks again for your help.

regards,

Atsushi Uchida
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Sorting Relationed Records (From: "A. Uchida" <email@hidden>)
 >Re: Sorting Relationed Records (From: Nathan Dumar <email@hidden>)
 >Re: Sorting Relationed Records (From: "A. Uchida" <email@hidden>)
 >Re: Sorting Relationed Records (From: Nathan Dumar <email@hidden>)
 >Re: Sorting Relationed Records (From: "A. Uchida" <email@hidden>)
 >Re: Sorting Relationed Records (From: Art Isbell <email@hidden>)

  • Prev by Date: Re: Duplicate record
  • Next by Date: Re: Design Question
  • Previous by thread: Re: Sorting Relationed Records
  • Next by thread: Separate EO Models
  • Index(es):
    • Date
    • Thread