It is possible an html more readable?

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

It is possible an html more readable?

Sebastian Sastre-2
Hi there,

        I wonder if it is possible to make Seaside to serve the html code a
little more readable for development pruposes. I don’t mean to ident it because
Firebugs already do that, but I think returns at end of lines could help.

        I'm asking because I need to debug some javascript which is not in plain
js files. It cames dynamically loaded from the xhtml in the #script: tag of some
elements. When an application page is complex and firebug gets an error in your
js, it shows the script as your entire html code in 1 (one) undebuggeable line
so you can't set breakpoints and see its walkback.

        If not available, what is needed to make Seaside to be able to do this
"development html"?

        thanks in advance,

Sebastian Sastre

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

Re: It is possible an html more readable?

Lukas Renggli
>         If not available, what is needed to make Seaside to be able to do this
>  "development html"?

You can have a look how the pretty printer in the halos displays the XHTML.

Generally adding spaces or newlines to the XHTML changes the layout,
therefor Seaside does not offer this possibility. You can have a look
at the documentation of tidy, a famous open-source HTML pretty
printer: this is a pretty complex piece of software and in the
documentation there are several warnings that it might screw up your
layout. I prefer to use FireBug or the Safari Inspector to explore the
generated XHTML.

Lukas

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

RE: It is possible an html more readable?

Sebastian Sastre-2
Understood. Anyway I've found that:

        SUScript>>printContentOn: aStream
        statements
                do: [ :each | aStream javascript: each ]
                separatedBy: [ aStream nextPut: $; ; cr]

        do the trick. Is not needed to mess the html, just facilitate a cr at
the endo of line of js sentences in scripts. I'll set it in a loose method to
add the cr or not depending on the deployment mode setting. I suggest it for
official release.

        Thank you for the more general reference,

        cheers!

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Lukas Renggli
> Enviado el: Domingo, 09 de Marzo de 2008 13:00
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] It is possible an html more readable?
>
> >         If not available, what is needed to make Seaside to
> be able to do this
> >  "development html"?
>
> You can have a look how the pretty printer in the halos
> displays the XHTML.
>
> Generally adding spaces or newlines to the XHTML changes the layout,
> therefor Seaside does not offer this possibility. You can have a look
> at the documentation of tidy, a famous open-source HTML pretty
> printer: this is a pretty complex piece of software and in the
> documentation there are several warnings that it might screw up your
> layout. I prefer to use FireBug or the Safari Inspector to explore the
> generated XHTML.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> 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: It is possible an html more readable?

Sebastian Sastre-2
SUScript>>printContentOn: aStream
        "Renders the receiver in aStream.
        The cr message at end of statements aims to
        be nice to javascript tools in UA's for develpment mode"
        statements
                do: [ :each | aStream javascript: each ]
                separatedBy: [
                        WACurrentSession value application deploymentMode
                                ifTrue: [aStream nextPut: $; ]
                                ifFalse: [aStream nextPut: $; ; cr]]

        is my current version,

        cheers,

Sebastian Sastre

 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Sebastian Sastre
> Enviado el: Domingo, 09 de Marzo de 2008 13:54
> Para: 'Seaside - general discussion'
> Asunto: RE: [Seaside] It is possible an html more readable?
>
> Understood. Anyway I've found that:
>
> SUScript>>printContentOn: aStream
> statements
> do: [ :each | aStream javascript: each ]
> separatedBy: [ aStream nextPut: $; ; cr]
>
> do the trick. Is not needed to mess the html, just
> facilitate a cr at
> the endo of line of js sentences in scripts. I'll set it in a
> loose method to
> add the cr or not depending on the deployment mode setting. I
> suggest it for
> official release.
>
> Thank you for the more general reference,
>
> cheers!
>
> Sebastian Sastre
>
>
> > -----Mensaje original-----
> > De: [hidden email]
> > [mailto:[hidden email]] En nombre
> > de Lukas Renggli
> > Enviado el: Domingo, 09 de Marzo de 2008 13:00
> > Para: Seaside - general discussion
> > Asunto: Re: [Seaside] It is possible an html more readable?
> >
> > >         If not available, what is needed to make Seaside to
> > be able to do this
> > >  "development html"?
> >
> > You can have a look how the pretty printer in the halos
> > displays the XHTML.
> >
> > Generally adding spaces or newlines to the XHTML changes the layout,
> > therefor Seaside does not offer this possibility. You can
> have a look
> > at the documentation of tidy, a famous open-source HTML pretty
> > printer: this is a pretty complex piece of software and in the
> > documentation there are several warnings that it might screw up your
> > layout. I prefer to use FireBug or the Safari Inspector to
> explore the
> > generated XHTML.
> >
> > Lukas
> >
> > --
> > Lukas Renggli
> > http://www.lukas-renggli.ch
> > _______________________________________________
> > 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