• 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: Accessing a string from a display group.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing a string from a display group.


  • Subject: Re: Accessing a string from a display group.
  • From: Matt Harmon <email@hidden>
  • Date: Thu, 12 Jan 2006 14:14:50 -0700

Quoting David LeBer <email@hidden>:

On 12-Jan-06, at 1:40 PM, Matt Harmon wrote:

Quoting "Jerry W. Walker" <email@hidden>:

How does the application fail? Does it freeze, raise an exception,
crash the system, freeze the system, lock up?

I set up a debug log and have some good and some bad news.

Good news: the allObjects() call now works (I had another call that was just before it that was actually causing the problem).

Bad News: There's nothing (apparently) in the array. Any attempt to access the array throws a NullPointerException and when I use the count() method on the array it comes back with 0 (zero) objects in the array.

I also get null pointer exceptions when I attempt to access the selectedObject, as well.

The object (displayGroup) is declared and its values appear on the page but, for some reason I'm not aware of, I can't access those values in memory. Which, for me at least, is confusing.

Yeah, I'd be confused too.

Well, I'm glad to know that I don't look *that* stupid.

When are you asking for the values? Is it too early in the request
response loop (before the DG's had a chance to fetch the objects)?

Well, it's a fetchOnLoad DG.

Are you sure you are talking to the same DG that's setup in your .woo
file?

See below for the explanation.

Try this: add a WOString to your page, bind it to
"yourDisplayGroupName.allObjects.count" it should give you the count
of all of your objects.

I actually did this, though via a NSLog object and had it step through a loop
for every object it found in the NSArray. No luck. It actually turns out that
since this is a passed EOEnterpriseObject, all I had to do was
EOEOPassedObject.valueForKey("whatever") and then cast the result to a String
to get what I needed. Of course, I wasn't completely sure of the structure of
the object in question (yes, I know there are easier ways of finding it) so I
did a EOEOPassedObject.eoDescription() to find it.
Handy method, that, especially when combined with the NSLog object and a couple
of printStreams.


But thanks (to everyone) for the confirmation that I wasn't crazy regarding the
DisplayGroups without accessiable values in them.


And thanks for taking the time to those of you who responded,
Matt

Attachment: binWCqMhtm0LZ.bin
Description: PGP Public Key

 _______________________________________________
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: 
 >Accessing a string from a display group. (From: "Matt Harmon" <email@hidden>)
 >Re: Accessing a string from a display group. (From: "Jerry W. Walker" <email@hidden>)
 >Re: Accessing a string from a display group. (From: Matt Harmon <email@hidden>)
 >Re: Accessing a string from a display group. (From: "Jerry W. Walker" <email@hidden>)
 >Re: Accessing a string from a display group. (From: Matt Harmon <email@hidden>)
 >Re: Accessing a string from a display group. (From: David LeBer <email@hidden>)

  • Prev by Date: Re: Repetition and OnClick of TR
  • Next by Date: Tomcat 5.5.12 WAR Deployment Problem
  • Previous by thread: Re: Accessing a string from a display group.
  • Next by thread: Repetition and OnClick of TR
  • Index(es):
    • Date
    • Thread