I don't quite understand gthe behaviour that is causing infinite loop in

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

I don't quite understand gthe behaviour that is causing infinite loop in

Intrader Intrader
method renderContentOn while executing the line that renders tabs by message to
renderTabsOn.
The renderTabsOn seems to send message to renderContentOn causing an infinite
loop.

The code is in the

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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

Intrader Intrader
I have placed the code in a pastebin at http://paste.ubuntu.com/555007/

I don't see a way in this session to attach a file.


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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

John McKeon
Maybe the send of renderTabsOn: should be in a block, not parantheses

On Mon, Jan 17, 2011 at 3:44 AM, Fritz Schenk <[hidden email]> wrote:
I have placed the code in a pastebin at http://paste.ubuntu.com/555007/

I don't see a way in this session to attach a file.


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



--
http://john-mckeon.us

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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

Julian Fitzell-2
Yes, good catch. "(self renderTabsOn: html)" returns self, which means
that "html div id: 'tabs'; with: (self renderTabsOn: html)" is causing
the creation of a div containing self (which obviously recurses
infinitely).

Julian

On Mon, Jan 17, 2011 at 12:21 PM, John McKeon <[hidden email]> wrote:

> Maybe the send of renderTabsOn: should be in a block, not parantheses
>
> On Mon, Jan 17, 2011 at 3:44 AM, Fritz Schenk <[hidden email]>
> wrote:
>>
>> I have placed the code in a pastebin at http://paste.ubuntu.com/555007/
>>
>> I don't see a way in this session to attach a file.
>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> --
> http://john-mckeon.us
>
> _______________________________________________
> 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: I don't quite understand gthe behaviour that is causing infinite loop in

Intrader Intrader
That is a great catch - I wish that there was a visual distinction between
parenthesis and braquets.

Thanks for the explanation. As to parens return self, I don't quite understand.

This fixes the problem and I get an ugly set of tabs - which should be fixable
via CSS.

I had to stop the server before it took the change.

Thanks again

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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

Intrader Intrader
The pharo source pane editor on ubuntu linux is simply very difficult to use; it
is difficult to distinguish punctuations like ':', or '.' or to distinguish '('
from '['. It is quite terrible.

I took the source and pasted it into VIM with 'smalltalk' syntax colloring; much
better.


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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

John McKeon
In reply to this post by Intrader Intrader


On Mon, Jan 17, 2011 at 1:18 PM, Fritz Schenk <[hidden email]> wrote:
That is a great catch - I wish that there was a visual distinction between
parenthesis and braquets.

I'm guessing that Slime would catch that... 

Thanks for the explanation. As to parens return self, I don't quite understand.
 
It's because the render method does not return anything. In Smalltalk, if there is nothing explicitly returned by a method, the method implicitly returns self, always. 

This fixes the problem and I get an ugly set of tabs - which should be fixable 
via CSS.

I would interject here that the JQuery tabs are what sold me on using JQuery. Include a theme and all the CSS is included free of charge :)


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



--
http://john-mckeon.us

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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

Bob Arning
In reply to this post by Intrader Intrader
Perhaps selecting a different font for code panes would help.

Cheers,
Bob

On 1/17/11 8:49 PM, Fritz Schenk wrote:
The pharo source pane editor on ubuntu linux is simply very difficult to use; it 
is difficult to distinguish punctuations like ':', or '.' or to distinguish '(' 
from '['. It is quite terrible. 

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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

Intrader Intrader
In reply to this post by John McKeon
jQuery version of tabs is in my queue; thanks

I was just following a blog in http://smalltalk.cat by Bernat Romagosa Carrasquer
from which I took the code. When I entered the code I messed up and used parens
instead of brackets.

I need to understand the use of parens and blocks better.

Changing font size for 'code' to 12 helps, but DejaVu is not a good font.


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

Re: I don't quite understand gthe behaviour that is causing infinite loop in

Bernat Romagosa
Just a little detail, http://smalltalk.cat is not my blog, it's the official website of the Catalan Smalltalk users group, I just wrote an entry in it a while ago.

Be careful because the post you're following may be a bit outdated, seaside has changed quite a bit since I wrote it...

Oh, and my blog is in www.asmalltalkbytheseaside.com ;)

Cheers!

Bernat Romagosa

2011/1/18 Fritz Schenk <[hidden email]>
jQuery version of tabs is in my queue; thanks

I was just following a blog in http://smalltalk.cat by Bernat Romagosa Carrasquer
from which I took the code. When I entered the code I messed up and used parens
instead of brackets.

I need to understand the use of parens and blocks better.

Changing font size for 'code' to 12 helps, but DejaVu is not a good font.


_______________________________________________
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: I don't quite understand gthe behaviour that is causing infinite loop in

Intrader Intrader
Yes indeed there were many changes to make it work for 3.0. That is one the major
 
flaws of the Seaside ecosystem. It changes constantly without update of the

documentation and examples.

Thanks for the blog address and for the code.

P.S. I enjoy reading catalan - it is close enough to French and Spanish and if

you architect software as you architect building, we will be in for a grea ride.



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