Problem with Callbacks in Seaside

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

Problem with Callbacks in Seaside

Totally Objects
Hi there.

I am using VAST 8.0.3.

I am trying to implement a back end server for an iPad app we are
writing. i would normally do this using WebConnection  with which we
have years of experience.

However, I felt that I should do it this time using Seaside.

I am working my way through the ToDoList example from the book
'Dynamic Web development with Seaside' but I have run into a problem.

I am getting the following error:

Internal Error: a ContextEmulator
WAActionCallback>>#evaluateWithArgument:
  arg1 = nil
 not found while capturing continuation.

whilst processing the following code:

renderItem: anItem on: html

html listItem
        class: 'done' if: anItem isDone;
        class: 'overdue' if: anItem isOverdue;
        with: [
                html text:anItem title.
                html space.
                html anchor
                        callback: [ self edit: anItem ];
                        with: 'edit'.
                html space.
                html anchor
                        callback: [ self remove: anItem ];
                        with: 'remove' ]

Now I have been onto the old Instantiations Forum and have seen some
comments from John O'Keefe (Hi John) but to be honest, I couldn't
follow what he was saying.

Can anyone advise in pidgin English?

Thanks

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.

Reply | Threaded
Open this post in threaded view
|

Aw: Problem with Callbacks in Seaside

jtuchel
Hi

Can anyone advise in pidgin English? 

at least I feel I am competent enough for that level, but I'll also try to help with the rest ;-)

Do you know if your callback method was called? It's best to prove by using a Breakpoint and configuring your root component to immediately pop up a debugger: 

(WAAdmin register: self asApplicationAt: 'MyApp')
exceptionHandler: WADebugExceptionHandler


I guess not. My first guess would be that you hit the edit link, see the editor and when this editor component tries to answer:, you get this error. If so, you're struck by the fact that VA ST doesn't yet support Continuations.
Unfortunately, this means that a good portion of the examples in the seaside bible do not work quite as they do in other dialects. You may want to take a look at an older blog post called Seaside: call: vs. show:onAnswer: that tries to help a little in understanding the differences. Not that I am an expert in Continuations, but I've become good in working without them and don't miss them.

HTH 

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/4buykXkEkRoJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Callbacks in Seaside

SebastianHC
In reply to this post by Totally Objects
Hi David,

Joachim already mentioned that the issue in your case is the missing continuations support in VAST.

I just exported myself the tutorial and provided some hacks just to enable you to get a little easier insight into Seaside under VAST.

Please keep in mind:
- WATask go-Methods are intended to be used with continiuations or better say the usage of #call:
- The lightboxes can only be implemented using jQuery. The Scriptaculous implementation also uses continuations for this functionality.

I tweaked both things for you. This might give you an insight, why WATask>>#go should use continuations. Just image a much more complex workflow,... you wouldn't be able to understand all those ifTrue:/ifFalse: stuff after a while.

One thing you might think about is using Announcements,... there's a package available under vastgoodies.com. They help a little when you want to implement more complex workflows within VAST.

I didn't introduce the jquery lightboxes in the sample. This would change the codeing too much and it might be too hard for you to goon with your approach.
I also didn't really take care of any thing else like the database connections and so on. This exported app is just a way top help you getting rid of the continuations related errors.
I would also not stay with this hackish implementation,... but for a start,...

Maybe I'll wind the time next weekend to publish a real port on VASTGoodies.com,... but only if it doesn't get to different to the HPI-version.

If you might have trouble importing the app,... just let me know,.. I didn't test it with a clean image.

Cheers!
SebastianSTTutTodoAppApp
Reply | Threaded
Open this post in threaded view
|

Aw: Problem with Callbacks in Seaside

jtuchel
In reply to this post by jtuchel
Sorry, the class name should be WADebugErrorHandler...

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/4Rw1yVVe19sJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Callbacks in Seaside

Totally Objects
Thanks for all of your help. Not sure that it was quite pidgen English
though - grin.

I found that I was just using the 'inform' method, which I didn't need
so i threw that away. I also changed call: to show; and am now running
fiine.

Thanks for all the help.

David

On Jul 27, 8:33 am, "[hidden email]"
<[hidden email]> wrote:
> Sorry, the class name should be WADebugErrorHandler...

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.