[Seaside] Strange error with Comet and Seaside 2.9-a3

John Toohey johnptoohey at gmail.com
Wed Apr 22 17:18:01 UTC 2009


Still debugging this, but now I notice that the Comet Counter example
no longer works, and I think this is since I loaded the latest Comet
code. I don't see any errors, but the only way to get the counter to
update, is to do a page refresh.


On Wed, Apr 22, 2009 at 08:32, Lukas Renggli <renggli at gmail.com> wrote:
>> Do you mean that I should force a full page refresh on all the clients
>>  when the server updates data? I see this error on the same session
>> that caused the data to change.
>
> Not necessarily a full refresh. Just tigger a script that fetches the
> appropriate update.
>
> With the given information I cannot reproduce the exact problem. If
> you could post a ready to run example I am sure somebody could help.
>
> Lukas
>
>>
>> Thanks.
>>
>> On Wed, Apr 22, 2009 at 02:56, Lukas Renggli <renggli at gmail.com> wrote:
>>> I cannot quite follow the real cause of the problem, but there is
>>> definitely an issue here. You push out some JQuery code that contains
>>> callbacks, these callbacks however refer to the session that created
>>> the event.
>>>
>>> This is a general problem of Comet and could probably be solved by
>>> generating different scripts for the different sessions, however there
>>> is no mechanism right now that helps you with that. The way I used it
>>> was to simply send a method call to the client to trigger a refresh.
>>>
>>> Lukas
>>>
>>> On Wed, Apr 22, 2009 at 4:47 AM, John Toohey <jt at parspro.com> wrote:
>>>> I have a render method for a table like so :-
>>>>
>>>> renderUser: aUser asRowOn: html
>>>>        |id|
>>>>
>>>>        id := 'bm-', aUser id asString.
>>>>
>>>>        html tableRow id: id; with:
>>>>                [html
>>>>                        tableData: [html anchor class: #underline;
>>>>                                                        onClick:((html jQuery: #ebmd) load html: [:r | r render: (self
>>>> editUserComponent: atUser id)]);
>>>>                                                        with: aUser userName];
>>>>                        tableData: aUser role;
>>>> .
>>>> .
>>>> .
>>>>
>>>> The onClick script calls a JQuery Dialog that pops up, and when I
>>>> click on Save, I fire an Announcement, that is registered in the same
>>>> component. The Announcement methods is like this :-
>>>>
>>>> addUser: aUser
>>>>        self pusher javascript: [ :script |
>>>>                script << (script jQuery: #usertable)
>>>>                        append: [:html | self renderUser: atUser asRowOn: html]
>>>>                ]
>>>>
>>>>
>>>> When the #renderUser is called from #addUser, and the tableData code
>>>> is invoked, I get an error. This is a partial stacktrace :-
>>>>
>>>> UndefinedObject(Object)>>doesNotUnderstand: #withoutParameters
>>>>        Receiver: nil
>>>>        Arguments and temporary variables:
>>>>                aMessage:       withoutParameters
>>>>                exception:      MessageNotUnderstood: UndefinedObject>>withoutParameters
>>>>                resumeValue:    nil
>>>>        Receiver''s instance variables:
>>>> nil
>>>>
>>>> JQLoad(JQAjax)>>enableCallbacks
>>>>        Receiver: $("#ebmd").load("/","")
>>>>        Arguments and temporary variables:
>>>>
>>>>        Receiver''s instance variables:
>>>>                owner:  $("#ebmd")
>>>>                options:        a WASmallDictionary
>>>>                callback:       nil
>>>>                callbackId:     nil
>>>>                selector:       nil
>>>>
>>>> JQLoad(JQAjax)>>callback:
>>>>        Receiver: $("#ebmd").load("/","")
>>>>        Arguments and temporary variables:
>>>>                aBlock:         [] in JQLoad(JQAjax)>>html: {[context := self
>>>> requestContext.  context ...etc...
>>>>        Receiver''s instance variables:
>>>>                owner:  $("#ebmd")
>>>>                options:        a WASmallDictionary
>>>>                callback:       nil
>>>>                callbackId:     nil
>>>>                selector:       nil
>>>>
>>>> JQLoad(JQAjax)>>html:
>>>>        Receiver: $("#ebmd").load("/","")
>>>>        Arguments and temporary variables:
>>>>                aBlock:         [] in BookmakerRootComponent>>renderUser:asRowOn: {[:r | r
>>>>  rende...etc...
>>>>                context:        nil
>>>>        Receiver''s instance variables:
>>>>                owner:  $("#ebmd")
>>>>                options:        a WASmallDictionary
>>>>                callback:       nil
>>>>                callbackId:     nil
>>>>                selector:       nil
>>>>
>>>>
>>>> If I comment out the tableData line, everything works fine. If I leave
>>>> in the tableData line, and comment out the Comet push script code,
>>>> everything is fine. Both pieces of code enabled, generates the error.
>>>>
>>>> Any help, most appreciated.
>>>> --
>>>> -JT
>>>> _______________________________________________
>>>> seaside mailing list
>>>> seaside at lists.squeakfoundation.org
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> http://www.lukas-renggli.ch
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>
>>
>>
>> --
>> -JT
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
>
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
-JT


More information about the seaside mailing list