livecallbacks not working after moving to latest Seaside/SeasideAsync...

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

livecallbacks not working after moving to latest Seaside/SeasideAsync...

Rick Flower
I guess I've got my work cut out for me today.. I moved up from Seaside
2.6b1 v108 to the latest
and greatest (along w/ the latest and greatest SeasideAsync) and found
my Seaside ASync stuff
no longer works (my old code was using a version from last October)..
I've fixed my code per
the comments I read on the list (and in the Cincom public repository)
and changed out the
renderer as needed.. I also changed the base class from WAComponent to
WAAsyncComponent.
I've also got my code importing SAsyncScripts as well.. Anyway, I've got
a breakpoint
in my code for the livecallback and it never hits.. Did I miss some sort
of mod to my code?
Below is a sample of my code setting up my callback.

     (html select) list: aUserList; selected: aUserList first;
        labels: [:item | item familyId = 1
               ifTrue: [item nameLast]
               ifFalse: [item nameLast , ' (#' , item familyId asString
, ')'] ];
       callback: [self error: 'Should not come here'];
        liveCallback: [:item :h | self renderUsersLiveCallback: item on: h ]


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

Re: livecallbacks not working after moving to latest Seaside/SeasideAsync...

Rick Flower
Rick Flower wrote:

> I guess I've got my work cut out for me today.. I moved up from
> Seaside 2.6b1 v108 to the latest
> and greatest (along w/ the latest and greatest SeasideAsync) and found
> my Seaside ASync stuff
> no longer works (my old code was using a version from last October)..
> I've fixed my code per
> the comments I read on the list (and in the Cincom public repository)
> and changed out the
> renderer as needed.. I also changed the base class from WAComponent to
> WAAsyncComponent. I've also got my code importing SAsyncScripts as
> well.. Anyway, I've got a breakpoint
> in my code for the livecallback and it never hits.. Did I miss some
> sort of mod to my code? Below is a sample of my code setting up my
> callback.
>
>     (html select) list: aUserList; selected: aUserList first;
>        labels: [:item | item familyId = 1
>               ifTrue: [item nameLast]
>               ifFalse: [item nameLast , ' (#' , item familyId asString
> , ')'] ];
>       callback: [self error: 'Should not come here'];
>        liveCallback: [:item :h | self renderUsersLiveCallback: item
> on: h ]
Ok.. I think I got past some of this.. I looked at the aSync tests and
found that the code
was a bit different... I'm in the process of  converting my code to use
the Async versions of
the code.. I'm stumped on this one though :

html passwordInput callback:  [:c | self password: ((MD5 hash: c)
asHexString asLowercase) ]

I get an error when it's calling the callback before its supposed to..
If it matters, I've now got my
rendererClass set to WAAsyncHtmlRenderer instead of WAAsyncRenderCanvas
like the notes indicated.. Any ideas why I should use one renderer over
the other?  I only started using the first one since that is what the
test code was doing.. Unfortunately, much of my code is now DOA and
needs lots of fiddling -- anchors, forms, etc.

Any ideas on what renderer or why my callbacks are being called before
they're supposed to would be greatly appreciated!


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

Re: livecallbacks not working after moving to latest Seaside/SeasideAsync...

Michel Bany-3
Rick Flower a écrit :

> Rick Flower wrote:
>> I guess I've got my work cut out for me today.. I moved up from
>> Seaside 2.6b1 v108 to the latest
>> and greatest (along w/ the latest and greatest SeasideAsync) and
>> found my Seaside ASync stuff
>> no longer works (my old code was using a version from last October)..
>> I've fixed my code per
>> the comments I read on the list (and in the Cincom public repository)
>> and changed out the
>> renderer as needed.. I also changed the base class from WAComponent
>> to WAAsyncComponent. I've also got my code importing SAsyncScripts as
>> well.. Anyway, I've got a breakpoint
>> in my code for the livecallback and it never hits.. Did I miss some
>> sort of mod to my code? Below is a sample of my code setting up my
>> callback.
>>
>>     (html select) list: aUserList; selected: aUserList first;
>>        labels: [:item | item familyId = 1
>>               ifTrue: [item nameLast]
>>               ifFalse: [item nameLast , ' (#' , item familyId
>> asString , ')'] ];
>>       callback: [self error: 'Should not come here'];
>>        liveCallback: [:item :h | self renderUsersLiveCallback: item
>> on: h ]
> Ok.. I think I got past some of this.. I looked at the aSync tests and
> found that the code
> was a bit different... I'm in the process of  converting my code to
> use the Async versions of
> the code.. I'm stumped on this one though :
>
> html passwordInput callback:  [:c | self password: ((MD5 hash: c)
> asHexString asLowercase) ]
>
> I get an error when it's calling the callback before its supposed to..
> If it matters, I've now got my
> rendererClass set to WAAsyncHtmlRenderer instead of
> WAAsyncRenderCanvas like the notes indicated.. Any ideas why I should
> use one renderer over the other?  

Since your code appears to be using the canvas api, the correct renderer
is WAAsyncRenderCanvas.
You would have to use the other renderer for your components that use
the classic api.
HTH
Michel.

> I only started using the first one since that is what the test code
> was doing.. Unfortunately, much of my code is now DOA and needs lots
> of fiddling -- anchors, forms, etc.
>
> Any ideas on what renderer or why my callbacks are being called before
> they're supposed to would be greatly appreciated!
>
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> ---------------------------------------------------------------------------------------
>
> Orange vous informe que cet  e-mail a ete controle par l'anti-virus
> mail. Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: livecallbacks not working after moving to latest Seaside/SeasideAsync...

Rick Flower
Michel Bany wrote:
> Since your code appears to be using the canvas api, the correct
> renderer is WAAsyncRenderCanvas.
> You would have to use the other renderer for your components that use
> the classic api.
I should have known that, but I guess I wasn't thinking too clearly at
the time.. Anyway, I
FINALLY figured it out..  It turns out that I needed to go into the
config page for my site
and add the WAAsyncScripts library to the WAStandardScripts.. This
explains why the sample
canvas based test code worked but mine didn't -- I guess I wasn't
generating the javascript.. Oh
well.. It took a few hours to figure out, but worked in the end..

Is this something that was not needed in earlier versions of
Seaside/SeasideAsync?  I don't recall
needing this for my older code, but haven't specifically checked -- I
don't recall adding this in
the older code.

-- Rick

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

Re: livecallbacks not working after moving to latest Seaside/SeasideAsync...

Michel Bany-3
Rick Flower a écrit :

> Michel Bany wrote:
>> Since your code appears to be using the canvas api, the correct
>> renderer is WAAsyncRenderCanvas.
>> You would have to use the other renderer for your components that use
>> the classic api.
> I should have known that, but I guess I wasn't thinking too clearly at
> the time.. Anyway, I
> FINALLY figured it out..  It turns out that I needed to go into the
> config page for my site
> and add the WAAsyncScripts library to the WAStandardScripts.. This
> explains why the sample
> canvas based test code worked but mine didn't -- I guess I wasn't
> generating the javascript.. Oh
> well.. It took a few hours to figure out, but worked in the end..
>
> Is this something that was not needed in earlier versions of
> Seaside/SeasideAsync?  I don't recall
> needing this for my older code, but haven't specifically checked -- I
> don't recall adding this in
> the older code.
>
Hi Rick,
This was not needed in earlier. See the publish comment of version 2.6b1.49
(same as in matching Squeak package version)

                                NEW RULES
-------------------------------------------------------------
- Must use WAAsyncRenderCanvas or WAAsyncHtmlRenderer as the #rendererClass
     >>>>> This breaks compatibility, sorry
- Must include WAAsyncScripts library
     >>>>> This breaks compatibility, sorry
- May subclass WAAsyncComponent

See also
http://lists.squeakfoundation.org/pipermail/seaside/2006-November/009793.html

I should have remembered this when you first asked, sorry for the time
you wasted.

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

Re: livecallbacks not working after moving to latest Seaside/SeasideAsync...

Rick Flower
Michel Bany wrote:

> Hi Rick,
> This was not needed in earlier. See the publish comment of version
> 2.6b1.49
> (same as in matching Squeak package version)
>
>                                NEW RULES
> -------------------------------------------------------------
> - Must use WAAsyncRenderCanvas or WAAsyncHtmlRenderer as the
> #rendererClass
>     >>>>> This breaks compatibility, sorry
> - Must include WAAsyncScripts library
>     >>>>> This breaks compatibility, sorry

Hmm.. I had actually seen that, but didn't realize I guess what it meant
I needed to do--
certainly not from the config page.. I thought it had something to do
with the imports..
I'll know better from now on.. Thanks for the clarification!

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