Where is some definitive document on callback priorities, response priority

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where is some definitive document on callback priorities, response priority

Intrader Intrader
After spending a couple of months solving the puzzle at the end of Chapter 12.2,
I finally solved it in two ways.
1. Suggested by Joachin Small World - use #cancelButton and, rely on priority
-5, and use `self handleAnswer: false`
2. Suggestion by Lukas Renggli to simply use a copy in the editor and replace
the collection entry corresponding to the contact.

The problem I face is that there is little documentation on how priority is used
and assigned in both #cancelButton and in #response.

Thanks

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Where is some definitive document on callback priorities, response priority

Julian Fitzell-2
Hi Fritz,

For callback priority, just look at subclasses of WACallback (#priority method).

I'm not sure what you mean by priority of responses...

Julian

On Wed, Jun 22, 2011 at 5:38 AM, Fritz Schenk <[hidden email]> wrote:
After spending a couple of months solving the puzzle at the end of Chapter 12.2,
I finally solved it in two ways.
1. Suggested by Joachin Small World - use #cancelButton and, rely on priority
-5, and use `self handleAnswer: false`
2. Suggestion by Lukas Renggli to simply use a copy in the editor and replace
the collection entry corresponding to the contact.

The problem I face is that there is little documentation on how priority is used
and assigned in both #cancelButton and in #response.

Thanks

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Where is some definitive document on callback priorities, response priority

Intrader Intrader
Julian Fitzell <jfitzell <at> gmail.com> writes:

>
>
> Hi Fritz,For callback priority, just look at subclasses of WACallback
(#priority
method).I'm not sure what you mean by priority of responses...Julian

Thanks Julian - I always enjoy your postings.
I had looked at priority in the WACallback - I was looking fro some design or
architectural  document. There was nothing to indicate that #cancelButton would
set priority -5 (or what -5 means). And how does it affect AJAX which is also
at -5. etc.

As to #response, once you message #response, the rest of the processing is
not done - callbacks,etc.




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Where is some definitive document on callback priorities, response priority

Julian Fitzell-2
On Sat, Jun 25, 2011 at 4:41 AM, Fritz Schenk <[hidden email]> wrote:
Julian Fitzell <jfitzell <at> gmail.com> writes:

>
>
> Hi Fritz,For callback priority, just look at subclasses of WACallback
(#priority
method).I'm not sure what you mean by priority of responses...Julian

Thanks Julian - I always enjoy your postings.

Thanks. :)
 
I had looked at priority in the WACallback - I was looking fro some design or
architectural  document. There was nothing to indicate that #cancelButton would
set priority -5 (or what -5 means). And how does it affect AJAX which is also
at -5. etc.

You're right - it's not well documented. I see there aren't even any class comments in the Seaside-Core-Callbacks category...

The logic is in WACallback>>#<=

Basically, callbacks with a lower priority are executed first. If two callbacks have the same priority, they will be evaluated by the order of their keys (in other words, in the order they were created).

As to #response, once you message #response, the rest of the processing is
not done - callbacks,etc.

A request runs only until it generates a response, so once you call #respond, that's definitely that. WAActionCallback and its subclasses all signal a WARenderNotification when they are done, which normally aborts the action phase and immediately begins rendering. So normally any callback with a later priority than a triggered action callback will not get executed (that's what prevents the WADefaultActionCallback from being executed unless there's no other action callback).

Hope that helps,

Julian

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside