• 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: R-R Loop Oddities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R-R Loop Oddities


  • Subject: Re: R-R Loop Oddities
  • From: Greg <email@hidden>
  • Date: Sun, 26 Jun 2005 11:41:00 +1000

Thanks for the reply Kieran. I moved this component to not synchronize bindings and converted all the getter and setters to lazily push and pull the bindings. The strange thing is, it hasn't made a difference. I have added logging of when bindings are been set and read. This is really bizzare as it is ouccring after the find method has returned, but before the invoke action has.

2005-06-26 11:35:00,413 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:501) - invoking action
2005-06-26 11:35:00,417 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:83) - getting value for binding: imageSet
2005-06-26 11:35:00,542 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:509) - taking value: {tags = (); image = "56e6d5cd-cb64-4f43-be75-96c3adfe1d28/88317503-1bce-47cf-9244- cc52b577eb55.jpg"; } for key: imageTagsDict
2005-06-26 11:35:00,550 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:79) - setting value: {tags = (); image = "56e6d5cd-cb64-4f43-be75-96c3adfe1d28/88317503-1bce-47cf-9244- cc52b577eb55.jpg"; } for binding: imageTagsDict
2005-06-26 11:35:00,552 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:509) - taking value: null for key: imageTagsDict
2005-06-26 11:35:00,553 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:79) - setting value: null for binding: imageTagsDict
2005-06-26 11:35:00,556 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:560) - finding images
2005-06-26 11:35:00,680 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:513) - setting image set to 0 images
2005-06-26 11:35:00,683 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:79) - setting value: () for binding: imageSet
2005-06-26 11:35:00,684 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:519) - setting image set title: Search Results for: greg
2005-06-26 11:35:00,686 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:79) - setting value: Search Results for: greg for binding: setTitle
2005-06-26 11:35:00,688 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:574) - finished finding
2005-06-26 11:35:00,692 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:83) - getting value for binding: selectedAlbum
2005-06-26 11:35:00,694 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:509) - taking value: Holidays for key: setTitle
2005-06-26 11:35:00,696 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:519) - setting image set title: Holidays
2005-06-26 11:35:00,698 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:79) - setting value: Holidays for binding: setTitle
2005-06-26 11:35:00,700 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:503) - invoked action
2005-06-26 11:35:00,701 ERROR ShoeBox[-:50212 3] ConsumerViewAlbums (ConsumerViewAlbums.java:87) - appending to response


On 25/06/2005, at 9:50 PM, Kieran Kelleher wrote:

The behaviour you are seeing may be automatic binding synchronization.

If the value being set is related to a binding on the component, then automatic binding synchronization happens automatically at the beginning and end of each phase of the R-R loop. So bindings are pushed and pulled six times in total during the R-R loop. This can cause undesired behaviour in subcomponents. If this is the case for you, then it is recommended practice in general to always turn off automatic synchronization (see synchronizesVariablesWithBindings() in WOComponent) in subcomponents and use lazy initialization with valueForBinding("bindingName") to pull bindings and setValueForBinding( ..., ... ) to push back up to parent component.

    /** Returns false to turn off automatic binding synchronization */
    public boolean synchronizeVariablesWithBindings() {
        return false;
    }

For example, let's say I have a binding called "trader" bound to an object of type CTTrader:


public CTTrader trader() { if ( _trader == null ) { _trader = (CTTrader)valueForBinding("trader"); }

        return _trader;
    }

HTH,

-Kieran
________________________________________________________________
Blog: http://webobjects.webhop.org/


On Jun 25, 2005, at 6:13 AM, Greg wrote:


In a component I am having some odd problems that I cannot figure out why it is happening. I have logged each part of the RR loop to try and figure out why it is occurring. What I don't understand is why it is taking a value after it has returned from the method (finding images), and before it has entered the appending to response. Does anyone know why this would be occurring and how I would go about fixing it?

Any help is greatly appreciated.

Regards,
Greg

ConsumerViewAlbums (ConsumerViewAlbums.java:88) - taking values from request
ConsumerViewAlbums (ConsumerViewAlbums.java:554) - taking value: {tags = (); image = "56e6d5cd-cb64-4f43- be75-96c3adfe1d28/88317503-1bce-47cf-9244-cc52b577eb55.jpg"; } for key: imageTagsDict
ConsumerViewAlbums (ConsumerViewAlbums.java:554) - taking value: null for key: imageTagsDict
ConsumerViewAlbums (ConsumerViewAlbums.java:554) - taking value: Greg for key: searchString
ConsumerViewAlbums (ConsumerViewAlbums.java:546) - invoking action
ConsumerViewAlbums (ConsumerViewAlbums.java:554) - taking value: {tags = (); image = "56e6d5cd-cb64-4f43- be75-96c3adfe1d28/88317503-1bce-47cf-9244-cc52b577eb55.jpg"; } for key: imageTagsDict
ConsumerViewAlbums (ConsumerViewAlbums.java:554) - taking value: null for key: imageTagsDict
ConsumerViewAlbums (ConsumerViewAlbums.java:596) - finding images
ConsumerViewAlbums (ConsumerViewAlbums.java:558) - setting image set to 0 images
ConsumerViewAlbums (ConsumerViewAlbums.java:563) - setting image set title: Search Results for: Greg
ConsumerViewAlbums (ConsumerViewAlbums.java:615) - finished finding
ConsumerViewAlbums (ConsumerViewAlbums.java:554) - taking value: Holidays for key: setTitle
ConsumerViewAlbums (ConsumerViewAlbums.java:563) - setting image set title: Holidays
ConsumerViewAlbums (ConsumerViewAlbums.java:548) - invoked action
ConsumerViewAlbums (ConsumerViewAlbums.java:75) - appending to response


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


This email sent to email@hidden






_______________________________________________ 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: 
 >R-R Loop Oddities (From: Greg <email@hidden>)
 >Re: R-R Loop Oddities (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: binding trouble
  • Next by Date: Re: [UPDATE] Re: wotaskd on 10.4
  • Previous by thread: Re: R-R Loop Oddities
  • Next by thread: _obtainOpenChannel exception, yet connected
  • Index(es):
    • Date
    • Thread