[Firebug] Programmatic halt

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

[Firebug] Programmatic halt

Sebastian Sastre-2
Hi there,
 
    anybody knows how to do a programmatic halt for js code so firebug stops there?
 
    I need that because I'm not defining all the js code in one script "file" (which is actually a method in a FileLibrary) but kind of fragmented. I'm making that because the definition of the behavior of js objecs is dynamic and "expectorated" from the seaside components. So I will be unable to pre click (to set the red dot) a typical JS file line of code as usually in firebug.
   
    I saw that using "debugger" works for halting js code in IE. I'll love to use exacly something like that but in firebug. Is the js version of our beloved "self halt".
 
    Anybody has a clue?
 
    Thanks,
 

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: [Firebug] Programmatic halt

rwelch
Re: [Seaside] [Firebug] Programmatic halt I am not sure exactly what you are trying to do, but this may help:

http://code.google.com/p/trimpath/wiki/TrimBreakpoint





On 7/9/07 3:30 PM, "Sebastian Sastre" <[hidden email]> wrote:

Hi there,

   anybody knows how to do a programmatic halt for js code so firebug stops there?

   I need that because I'm not defining all the js code in one script "file" (which is actually a method in a FileLibrary) but kind of fragmented. I'm making that because the definition of the behavior of js objecs is dynamic and "expectorated" from the seaside components. So I will be unable to pre click (to set the red dot) a typical JS file line of code as usually in firebug.
    
    I saw that using "debugger" works for halting js code in IE. I'll love to use exacly something like that but in firebug. Is the js version of our beloved "self halt".

   Anybody has a clue?

   Thanks,

Sebastian Sastre
 


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


----------=-=-=-=-=-=-=-=-========oOo========-=-=-=-=-=-=-=-=----------
[hidden email]                Phone:(607)770-3701
CSC @ BAE SYSTEMS               600 Main St Johnson City, NY 13790-1888
----------=-=-=-=-=-=-=-=-===================-=-=-=-=-=-=-=-=----------

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

RE: [Firebug] Programmatic halt

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Sebastian Sastre-2
Try,

console.error("kind of like a breakpoint")

It won't immediately bring up a breakpoint window, but you'll be able to
click on a link and go straight to the bit of JS code where this was
called.

Hope this helps, see more over at,

http://www.getfirebug.com/console.html

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Sebastian Sastre
> Sent: Monday, July 09, 2007 12:31 PM
> To: 'Seaside - general discussion'
> Subject: [Seaside] [Firebug] Programmatic halt
>
> Hi there,
>
>     anybody knows how to do a programmatic halt for js code so firebug
> stops there?
>
>     I need that because I'm not defining all the js code in one script
> "file" (which is actually a method in a FileLibrary) but kind of
> fragmented. I'm making that because the definition of the behavior of
js
> objecs is dynamic and "expectorated" from the seaside components. So I
> will be unable to pre click (to set the red dot) a typical JS file
line of
> code as usually in firebug.
>
>     I saw that using "debugger" works for halting js code in IE. I'll
love
> to use exacly something like that but in firebug. Is the js version of
our
> beloved "self halt".
>
>     Anybody has a clue?
>
>     Thanks,
>
> Sebastian Sastre
>
>


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

firebug.png (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [Firebug] Programmatic halt

Sebastian Sastre-2
Hi Boris!

        well Firegub is managing it like if they where inside an eval so
does not show the code as one expect to be shown. Thanks for the reference
anyway.

        The thing is that it works well when you make a classic js script in
a separate file with all the js code there. But the fact is that I'm using
js a lot more *smalltalkishly* than that. I install functions in js objects
defined at seaside components and that ends loaded up in the js objects fine
but in the sense of classic source code script "there is no script". I mean
there is one with minimal functionality (that I debug clasically) and the
rest is loaded "taylorly" from code found at attributes of the element's
wraper div. The installation of the functions is made just after the
homologous (to seaside component) js object is created.

        I works like a charm, injects simplicity to smalltalk and js at once
(by injecting the smalltalk way in js) but it seems to be too much for
Firebug at debug time. I mean a smalltalk debugger in js will can you
imagine?

        cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Boris Popov
> Enviado el: Lunes, 09 de Julio de 2007 18:03
> Para: Seaside - general discussion
> Asunto: RE: [Seaside] [Firebug] Programmatic halt
>
> Try,
>
> console.error("kind of like a breakpoint")
>
> It won't immediately bring up a breakpoint window, but you'll
> be able to click on a link and go straight to the bit of JS
> code where this was called.
>
> Hope this helps, see more over at,
>
> http://www.getfirebug.com/console.html
>
> Cheers!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the
> message header. Unless otherwise indicated, it contains
> information that is private and confidential. If you have
> received it in error, please notify the sender and delete the
> entire message including any attachments.
>
> Thank you.
>
> > -----Original Message-----
> > From: [hidden email] [mailto:seaside-
> > [hidden email]] On Behalf Of Sebastian Sastre
> > Sent: Monday, July 09, 2007 12:31 PM
> > To: 'Seaside - general discussion'
> > Subject: [Seaside] [Firebug] Programmatic halt
> >
> > Hi there,
> >
> >     anybody knows how to do a programmatic halt for js code
> so firebug
> > stops there?
> >
> >     I need that because I'm not defining all the js code in
> one script
> > "file" (which is actually a method in a FileLibrary) but kind of
> > fragmented. I'm making that because the definition of the
> behavior of
> js
> > objecs is dynamic and "expectorated" from the seaside
> components. So I
> > will be unable to pre click (to set the red dot) a typical JS file
> line of
> > code as usually in firebug.
> >
> >     I saw that using "debugger" works for halting js code
> in IE. I'll
> love
> > to use exacly something like that but in firebug. Is the js
> version of
> our
> > beloved "self halt".
> >
> >     Anybody has a clue?
> >
> >     Thanks,
> >
> > 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: [Firebug] Programmatic halt

Michel Bany
Not exactly what you are looking for but I mention it...

In SeasideAsync, I'm using this js code that helped a lot in debugging

function debug(aString)
{
        var newDiv = document.createElement("div");
        newDiv.setAttribute("style","position: relative; top: -1.5em; "
                + "font-size: 60%; font-family: Verdana; color: blue; "
                + "width: 100%; background-color: lightyellow");
        var textNode = document.createTextNode(aString);
        newDiv.appendChild(textNode);
        document.body.appendChild(newDiv);
}

And I have statements like this

        debug("Here");

where appropriate while debugging.

Scroll to the end of the page and see your js "transcript"

HTH
Michel.



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

Re: [Firebug] Programmatic halt

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Sebastian Sastre-2
Re: [Seaside] [Firebug] Programmatic halt

Could you collect all your custom generated js from all components into a single 'file' at the time of page generation? I imagine that would solve the problem as well as make it easier on the browser.

Cheers!

-Boris
(Sent from an iPhone... Not!)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: 'Seaside - general discussion' <[hidden email]>
Sent: Tue Jul 10 05:42:07 2007
Subject: RE: [Seaside] [Firebug] Programmatic halt

Hi Boris!

        well Firegub is managing it like if they where inside an eval so
does not show the code as one expect to be shown. Thanks for the reference
anyway.

        The thing is that it works well when you make a classic js script in
a separate file with all the js code there. But the fact is that I'm using
js a lot more *smalltalkishly* than that. I install functions in js objects
defined at seaside components and that ends loaded up in the js objects fine
but in the sense of classic source code script "there is no script". I mean
there is one with minimal functionality (that I debug clasically) and the
rest is loaded "taylorly" from code found at attributes of the element's
wraper div. The installation of the functions is made just after the
homologous (to seaside component) js object is created.

        I works like a charm, injects simplicity to smalltalk and js at once
(by injecting the smalltalk way in js) but it seems to be too much for
Firebug at debug time. I mean a smalltalk debugger in js will can you
imagine?

        cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [[hidden email]] En nombre
> de Boris Popov
> Enviado el: Lunes, 09 de Julio de 2007 18:03
> Para: Seaside - general discussion
> Asunto: RE: [Seaside] [Firebug] Programmatic halt
>
> Try,
>
> console.error("kind of like a breakpoint")
>
> It won't immediately bring up a breakpoint window, but you'll
> be able to click on a link and go straight to the bit of JS
> code where this was called.
>
> Hope this helps, see more over at,
>
> http://www.getfirebug.com/console.html
>
> Cheers!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the
> message header. Unless otherwise indicated, it contains
> information that is private and confidential. If you have
> received it in error, please notify the sender and delete the
> entire message including any attachments.
>
> Thank you.
>
> > -----Original Message-----
> > From: [hidden email] [[hidden email]
> > [hidden email]] On Behalf Of Sebastian Sastre
> > Sent: Monday, July 09, 2007 12:31 PM
> > To: 'Seaside - general discussion'
> > Subject: [Seaside] [Firebug] Programmatic halt
> >
> > Hi there,
> >
> >     anybody knows how to do a programmatic halt for js code
> so firebug
> > stops there?
> >
> >     I need that because I'm not defining all the js code in
> one script
> > "file" (which is actually a method in a FileLibrary) but kind of
> > fragmented. I'm making that because the definition of the
> behavior of
> js
> > objecs is dynamic and "expectorated" from the seaside
> components. So I
> > will be unable to pre click (to set the red dot) a typical JS file
> line of
> > code as usually in firebug.
> >
> >     I saw that using "debugger" works for halting js code
> in IE. I'll
> love
> > to use exacly something like that but in firebug. Is the js
> version of
> our
> > beloved "self halt".
> >
> >     Anybody has a clue?
> >
> >     Thanks,
> >
> > Sebastian Sastre
> >
> >
>
>

_______________________________________________
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] Programmatic halt

Sebastian Sastre-2
Re: [Seaside] [Firebug] Programmatic halt
Ok Boris,

 

    I'm also starting to think that this could work. It will work until you want to change js object functions definitions after loaded which is a very unlikely situation by now. So this seems to have potential.

 

    To try it I should collect that code (I have no idea how to do it, any clue?) and make seaside expectorate it like if it where a FileLibrary content. That way firebug will "think" is messing with a classic piece of js code from a served file.

 

    By the way do you know if in a prorotype of js adding functions in two stages could be made like this?:

 

    // The classic way (Stage 1)

    MyWebObject.prototype = {

        initialize: function(){

            // Initializes the receiver

            this.foo = null;

        },

   

        doSomethig: function(){

            // Makes something

            ...

        },

    };

 

    // The "creative :P " way (Stage 2)

    MyWebObject.prototype = MyWebObject.prototype + {

        doWhatSeasideTeachedYou: function(anArgument){

        ...};       

    };

 

    I mean, do you know how to concatenate (just add more to what exists) behavior definition in a instance of a js object?

 

    Also I think that this could lead me to a browsers cache file problem. The code vary a lot depending on de page so, if two pages generates this dynamic script contents so different and the web browser think is clever by chaching it, miserable results are guaranteed. But I think I can workarround that changing the name of the file all the time (which is not a beauty thing to do so you can think in a better approach?).

 

    cheers,  

 

Sebastian Sastre



De: [hidden email] [mailto:[hidden email]] En nombre de Boris Popov
Enviado el: Martes, 10 de Julio de 2007 10:58
Para: [hidden email]
Asunto: Re: [Seaside] [Firebug] Programmatic halt

Could you collect all your custom generated js from all components into a single 'file' at the time of page generation? I imagine that would solve the problem as well as make it easier on the browser.

Cheers!

-Boris
(Sent from an iPhone... Not!)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: 'Seaside - general discussion' <[hidden email]>
Sent: Tue Jul 10 05:42:07 2007
Subject: RE: [Seaside] [Firebug] Programmatic halt

Hi Boris!

        well Firegub is managing it like if they where inside an eval so
does not show the code as one expect to be shown. Thanks for the reference
anyway.

        The thing is that it works well when you make a classic js script in
a separate file with all the js code there. But the fact is that I'm using
js a lot more *smalltalkishly* than that. I install functions in js objects
defined at seaside components and that ends loaded up in the js objects fine
but in the sense of classic source code script "there is no script". I mean
there is one with minimal functionality (that I debug clasically) and the
rest is loaded "taylorly" from code found at attributes of the element's
wraper div. The installation of the functions is made just after the
homologous (to seaside component) js object is created.

        I works like a charm, injects simplicity to smalltalk and js at once
(by injecting the smalltalk way in js) but it seems to be too much for
Firebug at debug time. I mean a smalltalk debugger in js will can you
imagine?

        cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [[hidden email]] En nombre
> de Boris Popov
> Enviado el: Lunes, 09 de Julio de 2007 18:03
> Para: Seaside - general discussion
> Asunto: RE: [Seaside] [Firebug] Programmatic halt
>
> Try,
>
> console.error("kind of like a breakpoint")
>
> It won't immediately bring up a breakpoint window, but you'll
> be able to click on a link and go straight to the bit of JS
> code where this was called.
>
> Hope this helps, see more over at,
>
> http://www.getfirebug.com/console.html
>
> Cheers!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the
> message header. Unless otherwise indicated, it contains
> information that is private and confidential. If you have
> received it in error, please notify the sender and delete the
> entire message including any attachments.
>
> Thank you.
>
> > -----Original Message-----
> > From: [hidden email] [[hidden email]
> > [hidden email]] On Behalf Of Sebastian Sastre
> > Sent: Monday, July 09, 2007 12:31 PM
> > To: 'Seaside - general discussion'
> > Subject: [Seaside] [Firebug] Programmatic halt
> >
> > Hi there,
> >
> >     anybody knows how to do a programmatic halt for js code
> so firebug
> > stops there?
> >
> >     I need that because I'm not defining all the js code in
> one script
> > "file" (which is actually a method in a FileLibrary) but kind of
> > fragmented. I'm making that because the definition of the
> behavior of
> js
> > objecs is dynamic and "expectorated" from the seaside
> components. So I
> > will be unable to pre click (to set the red dot) a typical JS file
> line of
> > code as usually in firebug.
> >
> >     I saw that using "debugger" works for halting js code
> in IE. I'll
> love
> > to use exacly something like that but in firebug. Is the js
> version of
> our
> > beloved "self halt".
> >
> >     Anybody has a clue?
> >
> >     Thanks,
> >
> > Sebastian Sastre
> >
> >
>
>

_______________________________________________
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] Programmatic halt

Boris Popov, DeepCove Labs (SNN)
If it is truly dynamic then you should just inline it in a page, not
link to it, to avoid any potential caching problems. As far as putting
it all together, I imagine walking the component tree along the lines
of,

| ws |
ws := String new writeStream.
self nextPresentersDo: [:ea | ea renderCustomJavaScriptOn: ws]

should get you what you want.

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Sebastian Sastre
> Sent: Tuesday, July 10, 2007 12:32 PM
> To: 'Seaside - general discussion'
> Subject: RE: [Seaside] [Firebug] Programmatic halt
>
> Ok Boris,
>
>
>
>     I'm also starting to think that this could work. It will work
until
> you want to change js object functions definitions after loaded which
is a
> very unlikely situation by now. So this seems to have potential.
>
>
>
>     To try it I should collect that code (I have no idea how to do it,
any
> clue?) and make seaside expectorate it like if it where a FileLibrary
> content. That way firebug will "think" is messing with a classic piece
of
> js code from a served file.
>
>
>
>     By the way do you know if in a prorotype of js adding functions in
two

> stages could be made like this?:
>
>
>
>     // The classic way (Stage 1)
>
>     MyWebObject.prototype = {
>
>         initialize: function(){
>
>             // Initializes the receiver
>
>             this.foo = null;
>
>         },
>
>
>
>         doSomethig: function(){
>
>             // Makes something
>
>             ...
>
>         },
>
>     };
>
>
>
>     // The "creative :P " way (Stage 2)
>
>     MyWebObject.prototype = MyWebObject.prototype + {
>
>         doWhatSeasideTeachedYou: function(anArgument){
>
>         ...};
>
>     };
>
>
>
>     I mean, do you know how to concatenate (just add more to what
exists)
> behavior definition in a instance of a js object?
>
>
>
>     Also I think that this could lead me to a browsers cache file
problem.
> The code vary a lot depending on de page so, if two pages generates
this
> dynamic script contents so different and the web browser think is
clever
> by chaching it, miserable results are guaranteed. But I think I can
> workarround that changing the name of the file all the time (which is
not

> a beauty thing to do so you can think in a better approach?).
>
>
>
>     cheers,
>
>
>
> Sebastian Sastre
>
>
> ________________________________
>
> De: [hidden email] [mailto:seaside-
> [hidden email]] En nombre de Boris Popov
> Enviado el: Martes, 10 de Julio de 2007 10:58
> Para: [hidden email]
> Asunto: Re: [Seaside] [Firebug] Programmatic halt
>
>
>
> Could you collect all your custom generated js from all
components
> into a single 'file' at the time of page generation? I imagine that
would

> solve the problem as well as make it easier on the browser.
>
> Cheers!
>
> -Boris
> (Sent from an iPhone... Not!)
>
> ----- Original Message -----
> From: [hidden email] <seaside-
> [hidden email]>
> To: 'Seaside - general discussion'
> <[hidden email]>
> Sent: Tue Jul 10 05:42:07 2007
> Subject: RE: [Seaside] [Firebug] Programmatic halt
>
> Hi Boris!
>
>        well Firegub is managing it like if they where inside an
> eval so
> does not show the code as one expect to be shown. Thanks for the
> reference
> anyway.
>
>        The thing is that it works well when you make a classic
js
> script in
> a separate file with all the js code there. But the fact is that
I'm
> using
> js a lot more *smalltalkishly* than that. I install functions in
js
> objects
> defined at seaside components and that ends loaded up in the js
> objects fine
> but in the sense of classic source code script "there is no
script".
> I mean
> there is one with minimal functionality (that I debug
clasically)
> and the
> rest is loaded "taylorly" from code found at attributes of the
> element's
> wraper div. The installation of the functions is made just after
the
> homologous (to seaside component) js object is created.
>
>        I works like a charm, injects simplicity to smalltalk
and js
> at once
> (by injecting the smalltalk way in js) but it seems to be too
much
> for
> Firebug at debug time. I mean a smalltalk debugger in js will
can

> you
> imagine?
>
>        cheers,
>
> Sebastian Sastre
>
>
> > -----Mensaje original-----
> > De: [hidden email]
> > [mailto:[hidden email]] En nombre
> > de Boris Popov
> > Enviado el: Lunes, 09 de Julio de 2007 18:03
> > Para: Seaside - general discussion
> > Asunto: RE: [Seaside] [Firebug] Programmatic halt
> >
> > Try,
> >
> > console.error("kind of like a breakpoint")
> >
> > It won't immediately bring up a breakpoint window, but you'll
> > be able to click on a link and go straight to the bit of JS
> > code where this was called.
> >
> > Hope this helps, see more over at,
> >
> > http://www.getfirebug.com/console.html
> >
> > Cheers!
> >
> > -Boris
> >
> > --
> > +1.604.689.0322
> > DeepCove Labs Ltd.
> > 4th floor 595 Howe Street
> > Vancouver, Canada V6C 2T5
> > http://tinyurl.com/r7uw4
> >
> > [hidden email]
> >
> > CONFIDENTIALITY NOTICE
> >
> > This email is intended only for the persons named in the
> > message header. Unless otherwise indicated, it contains
> > information that is private and confidential. If you have
> > received it in error, please notify the sender and delete the
> > entire message including any attachments.
> >
> > Thank you.
> >
> > > -----Original Message-----
> > > From: [hidden email]
> [mailto:seaside-
> > > [hidden email]] On Behalf Of Sebastian
> Sastre
> > > Sent: Monday, July 09, 2007 12:31 PM
> > > To: 'Seaside - general discussion'
> > > Subject: [Seaside] [Firebug] Programmatic halt
> > >
> > > Hi there,
> > >
> > >     anybody knows how to do a programmatic halt for js code
> > so firebug
> > > stops there?
> > >
> > >     I need that because I'm not defining all the js code in
> > one script
> > > "file" (which is actually a method in a FileLibrary) but
kind of
> > > fragmented. I'm making that because the definition of the
> > behavior of
> > js
> > > objecs is dynamic and "expectorated" from the seaside
> > components. So I
> > > will be unable to pre click (to set the red dot) a typical
JS

> file
> > line of
> > > code as usually in firebug.
> > >
> > >     I saw that using "debugger" works for halting js code
> > in IE. I'll
> > love
> > > to use exacly something like that but in firebug. Is the js
> > version of
> > our
> > > beloved "self halt".
> > >
> > >     Anybody has a clue?
> > >
> > >     Thanks,
> > >
> > > Sebastian Sastre
> > >
> > >
> >
> >
>
> _______________________________________________
> 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] Programmatic halt

Sebastian Sastre-2
Well that's why right now I've made it in divs. So we have the original
problem of being unable to firebugize that code.

But.. I've found this:  http://fireclipse.xucia.com/ and I'm starting to use
it. Seems to be enough and inexpensive. Good by now :)

        thank you !

Sebastian Sastre

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Boris Popov
> Enviado el: Martes, 10 de Julio de 2007 16:37
> Para: Seaside - general discussion
> Asunto: RE: [Seaside] [Firebug] Programmatic halt
>
> If it is truly dynamic then you should just inline it in a
> page, not link to it, to avoid any potential caching
> problems. As far as putting it all together, I imagine
> walking the component tree along the lines of,
>
> | ws |
> ws := String new writeStream.
> self nextPresentersDo: [:ea | ea renderCustomJavaScriptOn: ws]
>
> should get you what you want.
>
> Cheers!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the
> message header. Unless otherwise indicated, it contains
> information that is private and confidential. If you have
> received it in error, please notify the sender and delete the
> entire message including any attachments.
>
> Thank you.
>
> > -----Original Message-----
> > From: [hidden email] [mailto:seaside-
> > [hidden email]] On Behalf Of Sebastian Sastre
> > Sent: Tuesday, July 10, 2007 12:32 PM
> > To: 'Seaside - general discussion'
> > Subject: RE: [Seaside] [Firebug] Programmatic halt
> >
> > Ok Boris,
> >
> >
> >
> >     I'm also starting to think that this could work. It will work
> until
> > you want to change js object functions definitions after
> loaded which
> is a
> > very unlikely situation by now. So this seems to have potential.
> >
> >
> >
> >     To try it I should collect that code (I have no idea
> how to do it,
> any
> > clue?) and make seaside expectorate it like if it where a
> FileLibrary
> > content. That way firebug will "think" is messing with a
> classic piece
> of
> > js code from a served file.
> >
> >
> >
> >     By the way do you know if in a prorotype of js adding
> functions in
> two
> > stages could be made like this?:
> >
> >
> >
> >     // The classic way (Stage 1)
> >
> >     MyWebObject.prototype = {
> >
> >         initialize: function(){
> >
> >             // Initializes the receiver
> >
> >             this.foo = null;
> >
> >         },
> >
> >
> >
> >         doSomethig: function(){
> >
> >             // Makes something
> >
> >             ...
> >
> >         },
> >
> >     };
> >
> >
> >
> >     // The "creative :P " way (Stage 2)
> >
> >     MyWebObject.prototype = MyWebObject.prototype + {
> >
> >         doWhatSeasideTeachedYou: function(anArgument){
> >
> >         ...};
> >
> >     };
> >
> >
> >
> >     I mean, do you know how to concatenate (just add more to what
> exists)
> > behavior definition in a instance of a js object?
> >
> >
> >
> >     Also I think that this could lead me to a browsers cache file
> problem.
> > The code vary a lot depending on de page so, if two pages generates
> this
> > dynamic script contents so different and the web browser think is
> clever
> > by chaching it, miserable results are guaranteed. But I think I can
> > workarround that changing the name of the file all the time
> (which is
> not
> > a beauty thing to do so you can think in a better approach?).
> >
> >
> >
> >     cheers,
> >
> >
> >
> > Sebastian Sastre
> >
> >
> > ________________________________
> >
> > De: [hidden email] [mailto:seaside-
> > [hidden email]] En nombre de Boris Popov
> > Enviado el: Martes, 10 de Julio de 2007 10:58
> > Para: [hidden email]
> > Asunto: Re: [Seaside] [Firebug] Programmatic halt
> >
> >
> >
> > Could you collect all your custom generated js from all
> components
> > into a single 'file' at the time of page generation? I imagine that
> would
> > solve the problem as well as make it easier on the browser.
> >
> > Cheers!
> >
> > -Boris
> > (Sent from an iPhone... Not!)
> >
> > ----- Original Message -----
> > From: [hidden email] <seaside-
> > [hidden email]>
> > To: 'Seaside - general discussion'
> > <[hidden email]>
> > Sent: Tue Jul 10 05:42:07 2007
> > Subject: RE: [Seaside] [Firebug] Programmatic halt
> >
> > Hi Boris!
> >
> >        well Firegub is managing it like if they where
> inside an eval
> > so
> > does not show the code as one expect to be shown.
> Thanks for the
> > reference
> > anyway.
> >
> >        The thing is that it works well when you make a classic
> js
> > script in
> > a separate file with all the js code there. But the fact is that
> I'm
> > using
> > js a lot more *smalltalkishly* than that. I install functions in
> js
> > objects
> > defined at seaside components and that ends loaded up in the js
> > objects fine
> > but in the sense of classic source code script "there is no
> script".
> > I mean
> > there is one with minimal functionality (that I debug
> clasically)
> > and the
> > rest is loaded "taylorly" from code found at attributes of the
> > element's
> > wraper div. The installation of the functions is made just after
> the
> > homologous (to seaside component) js object is created.
> >
> >        I works like a charm, injects simplicity to smalltalk
> and js
> > at once
> > (by injecting the smalltalk way in js) but it seems to be too
> much
> > for
> > Firebug at debug time. I mean a smalltalk debugger in js will
> can
> > you
> > imagine?
> >
> >        cheers,
> >
> > Sebastian Sastre
> >
> >
> > > -----Mensaje original-----
> > > De: [hidden email]
> > > [mailto:[hidden email]] En nombre
> > > de Boris Popov
> > > Enviado el: Lunes, 09 de Julio de 2007 18:03
> > > Para: Seaside - general discussion
> > > Asunto: RE: [Seaside] [Firebug] Programmatic halt
> > >
> > > Try,
> > >
> > > console.error("kind of like a breakpoint")
> > >
> > > It won't immediately bring up a breakpoint window, but you'll
> > > be able to click on a link and go straight to the bit of JS
> > > code where this was called.
> > >
> > > Hope this helps, see more over at,
> > >
> > > http://www.getfirebug.com/console.html
> > >
> > > Cheers!
> > >
> > > -Boris
> > >
> > > --
> > > +1.604.689.0322
> > > DeepCove Labs Ltd.
> > > 4th floor 595 Howe Street
> > > Vancouver, Canada V6C 2T5
> > > http://tinyurl.com/r7uw4
> > >
> > > [hidden email]
> > >
> > > CONFIDENTIALITY NOTICE
> > >
> > > This email is intended only for the persons named in the
> > > message header. Unless otherwise indicated, it contains
> > > information that is private and confidential. If you have
> > > received it in error, please notify the sender and delete the
> > > entire message including any attachments.
> > >
> > > Thank you.
> > >
> > > > -----Original Message-----
> > > > From: [hidden email]
> > [mailto:seaside-
> > > > [hidden email]] On Behalf Of
> Sebastian Sastre
> > > > Sent: Monday, July 09, 2007 12:31 PM
> > > > To: 'Seaside - general discussion'
> > > > Subject: [Seaside] [Firebug] Programmatic halt
> > > >
> > > > Hi there,
> > > >
> > > >     anybody knows how to do a programmatic halt for js code
> > > so firebug
> > > > stops there?
> > > >
> > > >     I need that because I'm not defining all the js code in
> > > one script
> > > > "file" (which is actually a method in a FileLibrary) but
> kind of
> > > > fragmented. I'm making that because the definition of the
> > > behavior of
> > > js
> > > > objecs is dynamic and "expectorated" from the seaside
> > > components. So I
> > > > will be unable to pre click (to set the red dot) a typical
> JS
> > file
> > > line of
> > > > code as usually in firebug.
> > > >
> > > >     I saw that using "debugger" works for halting js code
> > > in IE. I'll
> > > love
> > > > to use exacly something like that but in firebug. Is the js
> > > version of
> > > our
> > > > beloved "self halt".
> > > >
> > > >     Anybody has a clue?
> > > >
> > > >     Thanks,
> > > >
> > > > Sebastian Sastre
> > > >
> > > >
> > >
> > >
> >
> > _______________________________________________
> > 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