call: works intermittently on Pharo

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

call: works intermittently on Pharo

larrry
Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 

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

Re: call: works intermittently on Pharo

sebastianconcept@gmail.co
your #addProduct code looks good.

The issue must be somewhere else


o/



On Sep 10, 2011, at 10:27 AM, Larry White wrote:

Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 
_______________________________________________
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: call: works intermittently on Pharo

sebastianconcept@gmail.co
In reply to this post by larrry
be sure you are sending #addProduct from a callback action like:


html anchor
callback:[self addProduct]
with: 'Add this to cart'.


o/

PD: be sure NOT to send #addProduct from a render kind of method



On Sep 10, 2011, at 10:27 AM, Larry White wrote:

Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 
_______________________________________________
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: call: works intermittently on Pharo

larrry
Sebastian, Thanks.

I am sending from within a callback. I got this case to work by eliminating a component that acted like a container between the root component and the component where the non-working render methods were implemented.  Now I just have to understand -why- that would work and the other way not.  

On Sat, Sep 10, 2011 at 10:45 AM, Sebastian Sastre <[hidden email]> wrote:
be sure you are sending #addProduct from a callback action like:


html anchor
callback:[self addProduct]
with: 'Add this to cart'.


o/

PD: be sure NOT to send #addProduct from a render kind of method



On Sep 10, 2011, at 10:27 AM, Larry White wrote:

Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 
_______________________________________________
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



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

RE: call: works intermittently on Pharo

Robert Sirois
Could you provide the code? It sounds like something other than Seaside is at fault. You should always be able to #call: and #answer regardless of state.

RS


Date: Sat, 10 Sep 2011 15:27:36 -0400
Subject: Re: [Seaside] call: works intermittently on Pharo
From: [hidden email]
To: [hidden email]

Sebastian, Thanks.

I am sending from within a callback. I got this case to work by eliminating a component that acted like a container between the root component and the component where the non-working render methods were implemented.  Now I just have to understand -why- that would work and the other way not.  

On Sat, Sep 10, 2011 at 10:45 AM, Sebastian Sastre <[hidden email]> wrote:
be sure you are sending #addProduct from a callback action like:


html anchor
callback:[self addProduct]
with: 'Add this to cart'.


o/

PD: be sure NOT to send #addProduct from a render kind of method



On Sep 10, 2011, at 10:27 AM, Larry White wrote:

Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 
_______________________________________________
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



_______________________________________________ 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: call: works intermittently on Pharo

larrry
I don't think I can; it's gone.

I realized that my problem with the login form was a logic error.  I was doing something like this.

in my rootUI rendering code:

loggedIn? ifTrue: [do something useful]
 ifFalse: [ render login ].

then in login, I had an anchor that tried to render ForgotPasswordComponent, but the render loop looked at the above conditional and re-rendered the login form. sigh.

For the other situation. I literally fixed it by removing the intermediate component and copying the actions and rendering code from that component back to the root component.  No idea why that fixed it. If I run into the problem again, I'll post with more info.

On Sat, Sep 10, 2011 at 4:18 PM, Robert Sirois <[hidden email]> wrote:
Could you provide the code? It sounds like something other than Seaside is at fault. You should always be able to #call: and #answer regardless of state.

RS


Date: Sat, 10 Sep 2011 15:27:36 -0400
Subject: Re: [Seaside] call: works intermittently on Pharo
From: [hidden email]
To: [hidden email]


Sebastian, Thanks.

I am sending from within a callback. I got this case to work by eliminating a component that acted like a container between the root component and the component where the non-working render methods were implemented.  Now I just have to understand -why- that would work and the other way not.  

On Sat, Sep 10, 2011 at 10:45 AM, Sebastian Sastre <[hidden email]> wrote:
be sure you are sending #addProduct from a callback action like:


html anchor
callback:[self addProduct]
with: 'Add this to cart'.


o/

PD: be sure NOT to send #addProduct from a render kind of method



On Sep 10, 2011, at 10:27 AM, Larry White wrote:

Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 
_______________________________________________
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



_______________________________________________ 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



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

RE: call: works intermittently on Pharo

Robert Sirois
Sounds good. Unless you deleted the method in Pharo, you should be able to look at versions.

RS


Date: Sat, 10 Sep 2011 16:32:14 -0400
Subject: Re: [Seaside] call: works intermittently on Pharo
From: [hidden email]
To: [hidden email]

I don't think I can; it's gone.

I realized that my problem with the login form was a logic error.  I was doing something like this.

in my rootUI rendering code:

loggedIn? ifTrue: [do something useful]
 ifFalse: [ render login ].

then in login, I had an anchor that tried to render ForgotPasswordComponent, but the render loop looked at the above conditional and re-rendered the login form. sigh.

For the other situation. I literally fixed it by removing the intermediate component and copying the actions and rendering code from that component back to the root component.  No idea why that fixed it. If I run into the problem again, I'll post with more info.

On Sat, Sep 10, 2011 at 4:18 PM, Robert Sirois <[hidden email]> wrote:
Could you provide the code? It sounds like something other than Seaside is at fault. You should always be able to #call: and #answer regardless of state.

RS


Date: Sat, 10 Sep 2011 15:27:36 -0400
Subject: Re: [Seaside] call: works intermittently on Pharo
From: [hidden email]
To: [hidden email]


Sebastian, Thanks.

I am sending from within a callback. I got this case to work by eliminating a component that acted like a container between the root component and the component where the non-working render methods were implemented.  Now I just have to understand -why- that would work and the other way not.  

On Sat, Sep 10, 2011 at 10:45 AM, Sebastian Sastre <[hidden email]> wrote:
be sure you are sending #addProduct from a callback action like:


html anchor
callback:[self addProduct]
with: 'Add this to cart'.


o/

PD: be sure NOT to send #addProduct from a render kind of method



On Sep 10, 2011, at 10:27 AM, Larry White wrote:

Hi, I'm a newbie so apologies if I'm doing something dumb.

I'm working with Seaside in Pharo using the standard Seaside environment.

In my application, call: seems to work intermittently.  For example, I have this method in one component:

addProduct
| editor |

editor := ProductEditorComponent new.
(self call: editor)
ifTrue: [ Dao new addProduct: product ]

When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised.  I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception. 

I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state.  What causes a component to fail to render when called without raising an error?

Thanks much for any assistance.

Larry 
_______________________________________________
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



_______________________________________________ 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



_______________________________________________ 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