Firebug ans JS generated with seaside

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

Firebug ans JS generated with seaside

Sebastian Sastre-2
Hi seasiders,
   
    I'm developing some javascript functions (in a library in the image) I need to create menues for my apps and I have Firebug showing the js script of a seaside page, in fact all the html code of the page, in one single line of about 4 meters long! I'm unable to debug my own code like that. Has anybody some pointer on how to make it to behave?
 
    thanks,
 

Sebastian Sastre

PD: I know probably is more a Firebug matter than seaside but I'm not entirely sure if seaside is serving html in an "un-pretty printable" way or not


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

Re: Firebug ans JS generated with seaside

Martial Boniou
Hi,

This is the normal way for Seaside to create a javascript from #script.
If you want to dispatch your script in piece and maintain it inside
Seaside, you should use WAFileLibrary and upload (or directly write)
your scripts in it, then add:

MyWAFileLibrary>>#selectorsToInclude
^ #(#myFirstScriptJs #mySecondScriptJs #myThirdScriptJs)

and you must attach this to your application;

myApplication libraries add: MyWAFileLibrary

Now every (3) files are separated and no more monolithic.

Cheers,

--
Martial

Sebastian Sastre a écrit :
| Hi seasiders,
|    
|     I'm developing some javascript functions (in a library in the image) I
| need to create menues for my apps and I have Firebug showing the js script
| of a seaside page, in fact all the html code of the page, in one single line
| of about 4 meters long! I'm unable to debug my own code like that. Has
| anybody some pointer on how to make it to behave?
|  
|     thanks,
|  
| Sebastian Sastre
|
| PD: I know probably is more a Firebug matter than seaside but I'm not
| entirely sure if seaside is serving html in an "un-pretty printable" way or
| not
|

| _______________________________________________
| 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: Firebug ans JS generated with seaside

Rick Flower
In reply to this post by Sebastian Sastre-2
On Fri, May 25, 2007 12:22 pm, Sebastian Sastre wrote:
> Hi seasiders,
>
>     I'm developing some javascript functions (in a library in the image) I
> need to create menues for my apps and I have Firebug showing the js script
> of a seaside page, in fact all the html code of the page, in one single
> line
> of about 4 meters long! I'm unable to debug my own code like that. Has
> anybody some pointer on how to make it to behave?

I *think* that Seaside does that to save space & transmission time (a form
of optimization).. If you're using Firebug, you shouldn't have any
problems viewing the page source easily and nicely formatted at that.
When you open firebug, it should show the HTML source and you can
drill-down into the HTML to see the page structure just fine -- at least
it's worked for me on several Windows & MAC boxes I've got.  On thing I've
personally found is that Firebug occasionally gets confused and claims
that some of the HTML looks one way but it isn't really that way.. I've
seen this with my own test code where I've removed various entire divs of
information and Firebug still shows it when browsing the source code..
I've double-checked by viewing the raw page source and sure enough -- it
doesn't match what firebug is claiming.. I guess it's a bug of some kind.
YMMV.



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

RE: Firebug ans JS generated with seaside

Sebastian Sastre-2
In reply to this post by Martial Boniou
Aaaaaaaaaaahhhhhhh so much better, thanks a lot!

Sebastian  

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Martial Boniou
> Enviado el: Viernes, 25 de Mayo de 2007 16:37
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Firebug ans JS generated with seaside
>
> Hi,
>
> This is the normal way for Seaside to create a javascript
> from #script.
> If you want to dispatch your script in piece and maintain it
> inside Seaside, you should use WAFileLibrary and upload (or
> directly write) your scripts in it, then add:
>
> MyWAFileLibrary>>#selectorsToInclude
> ^ #(#myFirstScriptJs #mySecondScriptJs #myThirdScriptJs)
>
> and you must attach this to your application;
>
> myApplication libraries add: MyWAFileLibrary
>
> Now every (3) files are separated and no more monolithic.
>
> Cheers,
>
> --
> Martial
>
> Sebastian Sastre a écrit :
> | Hi seasiders,
> |    
> |     I'm developing some javascript functions (in a library in the
> | image) I need to create menues for my apps and I have
> Firebug showing
> | the js script of a seaside page, in fact all the html code of the
> | page, in one single line of about 4 meters long! I'm unable
> to debug
> | my own code like that. Has anybody some pointer on how to
> make it to behave?
> |  
> |     thanks,
> |  
> | Sebastian Sastre
> |
> | PD: I know probably is more a Firebug matter than seaside
> but I'm not
> | entirely sure if seaside is serving html in an "un-pretty
> printable"
> | way or not
> |
>
> | _______________________________________________
> | 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: Firebug ans JS generated with seaside

Sebastian Sastre-2
In reply to this post by Rick Flower
>
> I *think* that Seaside does that to save space & transmission
> time (a form of optimization).. If you're using Firebug, you
> shouldn't have any problems viewing the page source easily
> and nicely formatted at that.

Yes Rick, but the point is I'm wanting more than just see code. I want to be
able to debug and the HTML tree is pretty printed but some kind of useless
to debug javascript.

That's where the de-monolithication technique proposed by Martial B. enters
in the scene,

Thanks anyway,

Sebastian

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

RE: Firebug ans JS generated with seaside

Rick Flower
On Fri, May 25, 2007 2:26 pm, Sebastian Sastre wrote:

>>
>> I *think* that Seaside does that to save space & transmission
>> time (a form of optimization).. If you're using Firebug, you
>> shouldn't have any problems viewing the page source easily
>> and nicely formatted at that.
>
> Yes Rick, but the point is I'm wanting more than just see code. I want to
> be
> able to debug and the HTML tree is pretty printed but some kind of useless
> to debug javascript.
>
> That's where the de-monolithication technique proposed by Martial B.
> enters
> in the scene,

Hmm.. I was able to debug my Seaside app's JS code (in this case YUI code)
using firebug OK.. I had to set a breakpoint (don't recall now how I did
that), but it would stop OK and I could inspect variables,etc...  I think
you will need to hit the "script" button near the top of the firebug
window and select the script you're interested in and then put a
breakpoint in the code to be debugged.  If you then re-load the page it
will remember the breakpoint and it will trigger next time the code is
executed.. At least it did for me.

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