[Seaside] Strange behaviours?

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

[Seaside] Strange behaviours?

Pharo Smalltalk Users mailing list
Hi all,
I just noticed that changing the message send order to an anchor modifies its’ behaviour :

html anchor with: aString;callback: [doSomething]. -> click on the anchor executes the callback block

html anchor callback:[doSomething];with:aString. -> click on the anchor does not executes the callback block.

Is this a normal behaviour?

I also noticed that instantiating a WAComponent in the same method that calls html render: on it makes the call method in this object fail. See (http://smalltalkhub.com/#!/~Alidra/Seaside_Strange_Call_Behavior) for an concrete example.
BTW. I find the name call: quite confusing : you call a method, you pass control to an object. But maybe this is because I am new to Seaside.

Thank you
Abdelghani
Reply | Threaded
Open this post in threaded view
|

Re: [Seaside] Strange behaviours?

jtuchel
Am 30.05.17 um 10:21 schrieb Alidra Abdelghani via Pharo-users:

Alidra,


it is a well documented "weirdness" of Seaside that #with: always has to
be the last send to an element. I forgot about the details...


Joachim



Reply | Threaded
Open this post in threaded view
|

Re: [Seaside] Strange behaviours?

Johan Brichau-2
In reply to this post by Pharo Smalltalk Users mailing list
Hi Alidra,


Also, posting your questions on Seaside to the seaside mailinglist is a better idea ;)d

cheers
Johan

On 30 May 2017, at 10:21, Alidra Abdelghani via Pharo-users <[hidden email]> wrote:


From: Alidra Abdelghani <[hidden email]>
Subject: [Seaside] Strange behaviours?
Date: 30 May 2017 at 10:21:38 GMT+2


Hi all,
I just noticed that changing the message send order to an anchor modifies its’ behaviour :

html anchor with: aString;callback: [doSomething]. -> click on the anchor executes the callback block

html anchor callback:[doSomething];with:aString. -> click on the anchor does not executes the callback block.

Is this a normal behaviour?

I also noticed that instantiating a WAComponent in the same method that calls html render: on it makes the call method in this object fail. See (http://smalltalkhub.com/#!/~Alidra/Seaside_Strange_Call_Behavior) for an concrete example.
BTW. I find the name call: quite confusing : you call a method, you pass control to an object. But maybe this is because I am new to Seaside.

Thank you
Abdelghani



Reply | Threaded
Open this post in threaded view
|

Re: [Seaside] Strange behaviours?

Pharo Smalltalk Users mailing list

On 30 May 2017, at 10:38, Johan Brichau <[hidden email]> wrote:

Hi Alidra,


Thanks Johan,
Thanks Joachim

I did not knew about that one :)
Still, it is too bad that we have this constraint, because it is very difficult to find the problem if you dont know about this rule already (especially for newbies).
Hopefully, this is going to be fixed in the future.


Also, posting your questions on Seaside to the seaside mailinglist is a better idea ;)d
Ok, Perfect.
Regards

Abdelghani

cheers
Johan

On 30 May 2017, at 10:21, Alidra Abdelghani via Pharo-users <[hidden email]> wrote:


From: Alidra Abdelghani <[hidden email]>
Subject: [Seaside] Strange behaviours?
Date: 30 May 2017 at 10:21:38 GMT+2


Hi all,
I just noticed that changing the message send order to an anchor modifies its’ behaviour :

html anchor with: aString;callback: [doSomething]. -> click on the anchor executes the callback block

html anchor callback:[doSomething];with:aString. -> click on the anchor does not executes the callback block.

Is this a normal behaviour?

I also noticed that instantiating a WAComponent in the same method that calls html render: on it makes the call method in this object fail. See (http://smalltalkhub.com/#!/~Alidra/Seaside_Strange_Call_Behavior) for an concrete example.
BTW. I find the name call: quite confusing : you call a method, you pass control to an object. But maybe this is because I am new to Seaside.

Thank you
Abdelghani




Reply | Threaded
Open this post in threaded view
|

Re: [Seaside] Strange behaviours?

Damien Pollet-2
On 30 May 2017 at 12:46, Alidra Abdelghani via Pharo-users <[hidden email]> wrote:
I did not knew about that one :)
Still, it is too bad that we have this constraint, because it is very difficult to find the problem if you dont know about this rule already (especially for newbies).
Hopefully, this is going to be fixed in the future.

It sure looks like a good candidate for a framework-specific critic rule…