• 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: Force sub-component to re-grab its bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Force sub-component to re-grab its bindings


  • Subject: Re: Force sub-component to re-grab its bindings
  • From: Baiss Eric Magnusson <email@hidden>
  • Date: Sat, 1 Mar 2008 09:21:21 -0800

Thanks, that solved the problem, I think that the <value==null> test must have caused some bad results and I removed the <pullValuesFromParent>.

So I added the <value()> method, I still had to call < setDatePopups ( value ); > in Awake, as I distribute the NSTimestamp across many popups.

On Feb 29, 2008, at 5:10 PM, Chuck Hill wrote:


On Feb 29, 2008, at 5:01 PM, Baiss Eric Magnusson wrote:

I have a sub-component <MonthDayYear>.

In Awake of that sub-component I call <pullValuesFromParent> if I can.
if ( value == null && canGetValueForBinding( "value" )) {
pullValuesFromParent();
value = (NSTimestamp)valueForBinding( "value" );


When I Submit in the Main Component, the Action method of the submit button is called after <Awake> in the sub-component, therefore the sub-component does not get the right bindings.

As I see below, after cloning and adding a week, the sub-component has the old binding:

Awakening MonthDayYear 2007-02-12 03:00:00 Etc/GMT
Dumping editEvent.eventDate in StartEdit- > 2007-02-19 03:00:00 Etc/GMT

I am trying, and failing, to understand why you need or want that code in awake. I can't think of any time that I ever explicitly called pullValuesFromParent(). Try taking all of that out of awake, and add this method:


public NSTimestamp value() {
return canGetValueForBinding( "value" ) ? NSTimestamp) valueForBinding( "value" ) : null;
}


I am not even sure about the canGetValueForBinding for check. That seems more like it should be a design time check driven by the API. Or at least should throw a RuntimeException if it returns false.

Chuck

--

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
  • Next by Date: Many error alert in Eclipse/WOLips
  • Next by thread: Many error alert in Eclipse/WOLips
  • Index(es):
    • Date
    • Thread