[Seaside] [Firebug] Programmatic halt

Sebastian Sastre ssastre at seaswork.com
Tue Jul 10 19:31:41 UTC 2007


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: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] En nombre de Boris Popov
Enviado el: Martes, 10 de Julio de 2007 10:58
Para: seaside at lists.squeakfoundation.org
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: seaside-bounces at lists.squeakfoundation.org
<seaside-bounces at lists.squeakfoundation.org>
To: 'Seaside - general discussion' <seaside at lists.squeakfoundation.org>
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: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] 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
>
> boris at deepcovelabs.com
>
> 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: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> > bounces at lists.squeakfoundation.org] 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
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070710/ad80c211/attachment-0001.htm


More information about the Seaside mailing list