<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: [Seaside] [Firebug] Programmatic halt</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=250542422-20122006><?xml:namespace prefix =
st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>Ok Boris,</SPAN></SPAN></st1:PersonName></DIV>
<DIV align=left>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> 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.</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> 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.</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> By the way do you know if in a
prorotype of js adding functions in two stages could be made like
this?:</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> // The classic way (Stage
1)</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> MyWebObject.prototype =
{</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> initialize:
function(){</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
// Initializes the receiver</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
this.foo = null;</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
},</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> </SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> doSomethig:
function(){</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
// Makes something</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
...</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
},</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
};</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> // The "creative :P " way (Stage
2)</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> MyWebObject.prototype =
MyWebObject.prototype + {</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
doWhatSeasideTeachedYou:
function(anArgument){</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> ...};
<FONT color=#0000ff></FONT></SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
};</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> I mean, do you know how to
concatenate (just add more to what exists) behavior definition in a
instance of a js object?</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> 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?).</SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007>
cheers,</SPAN></SPAN></st1:PersonName><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007> </SPAN></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><SPAN
class=109220219-10072007></SPAN></SPAN></st1:PersonName> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
ProductID="Sebastian Sastre " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">Sebastian
Sastre<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/><o:p></o:p></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><o:p></o:p></SPAN></SPAN></P></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=es dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De:</B> seaside-bounces@lists.squeakfoundation.org
[mailto:seaside-bounces@lists.squeakfoundation.org] <B>En nombre de </B>Boris
Popov<BR><B>Enviado el:</B> Martes, 10 de Julio de 2007 10:58<BR><B>Para:</B>
seaside@lists.squeakfoundation.org<BR><B>Asunto:</B> Re: [Seaside] [Firebug]
Programmatic halt<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>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.<BR><BR>Cheers!<BR><BR>-Boris<BR>(Sent from an iPhone...
Not!)<BR><BR>----- Original Message -----<BR>From:
seaside-bounces@lists.squeakfoundation.org
<seaside-bounces@lists.squeakfoundation.org><BR>To: 'Seaside - general
discussion' <seaside@lists.squeakfoundation.org><BR>Sent: Tue Jul 10
05:42:07 2007<BR>Subject: RE: [Seaside] [Firebug] Programmatic halt<BR><BR>Hi
Boris!<BR><BR> well Firegub is
managing it like if they where inside an eval so<BR>does not show the code as
one expect to be shown. Thanks for the
reference<BR>anyway.<BR><BR> The
thing is that it works well when you make a classic js script in<BR>a separate
file with all the js code there. But the fact is that I'm using<BR>js a lot
more *smalltalkishly* than that. I install functions in js objects<BR>defined
at seaside components and that ends loaded up in the js objects fine<BR>but in
the sense of classic source code script "there is no script". I mean<BR>there
is one with minimal functionality (that I debug clasically) and the<BR>rest is
loaded "taylorly" from code found at attributes of the element's<BR>wraper
div. The installation of the functions is made just after the<BR>homologous
(to seaside component) js object is
created.<BR><BR> I works like a
charm, injects simplicity to smalltalk and js at once<BR>(by injecting the
smalltalk way in js) but it seems to be too much for<BR>Firebug at debug time.
I mean a smalltalk debugger in js will can
you<BR>imagine?<BR><BR>
cheers,<BR><BR>Sebastian Sastre<BR><BR><BR>> -----Mensaje
original-----<BR>> De: seaside-bounces@lists.squeakfoundation.org<BR>>
[<A
href="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>]
En nombre<BR>> de Boris Popov<BR>> Enviado el: Lunes, 09 de Julio de
2007 18:03<BR>> Para: Seaside - general discussion<BR>> Asunto: RE:
[Seaside] [Firebug] Programmatic halt<BR>><BR>> Try,<BR>><BR>>
console.error("kind of like a breakpoint")<BR>><BR>> It won't
immediately bring up a breakpoint window, but you'll<BR>> be able to click
on a link and go straight to the bit of JS<BR>> code where this was
called.<BR>><BR>> Hope this helps, see more over at,<BR>><BR>> <A
href="http://www.getfirebug.com/console.html">http://www.getfirebug.com/console.html</A><BR>><BR>>
Cheers!<BR>><BR>> -Boris<BR>><BR>> --<BR>>
+1.604.689.0322<BR>> DeepCove Labs Ltd.<BR>> 4th floor 595 Howe
Street<BR>> Vancouver, Canada V6C 2T5<BR>> <A
href="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A><BR>><BR>>
boris@deepcovelabs.com<BR>><BR>> CONFIDENTIALITY NOTICE<BR>><BR>>
This email is intended only for the persons named in the<BR>> message
header. Unless otherwise indicated, it contains<BR>> information that is
private and confidential. If you have<BR>> received it in error, please
notify the sender and delete the<BR>> entire message including any
attachments.<BR>><BR>> Thank you.<BR>><BR>> > -----Original
Message-----<BR>> > From: seaside-bounces@lists.squeakfoundation.org [<A
href="mailto:seaside-">mailto:seaside-</A><BR>> >
bounces@lists.squeakfoundation.org] On Behalf Of Sebastian Sastre<BR>> >
Sent: Monday, July 09, 2007 12:31 PM<BR>> > To: 'Seaside - general
discussion'<BR>> > Subject: [Seaside] [Firebug] Programmatic
halt<BR>> ><BR>> > Hi there,<BR>> ><BR>>
> anybody knows how to do a programmatic halt for
js code<BR>> so firebug<BR>> > stops there?<BR>> ><BR>>
> I need that because I'm not defining all the js
code in<BR>> one script<BR>> > "file" (which is actually a method in
a FileLibrary) but kind of<BR>> > fragmented. I'm making that because
the definition of the<BR>> behavior of<BR>> js<BR>> > objecs is
dynamic and "expectorated" from the seaside<BR>> components. So I<BR>>
> will be unable to pre click (to set the red dot) a typical JS
file<BR>> line of<BR>> > code as usually in firebug.<BR>>
><BR>> > I saw that using "debugger" works
for halting js code<BR>> in IE. I'll<BR>> love<BR>> > to use
exacly something like that but in firebug. Is the js<BR>> version
of<BR>> our<BR>> > beloved "self halt".<BR>> ><BR>>
> Anybody has a clue?<BR>> ><BR>>
> Thanks,<BR>> ><BR>> > Sebastian
Sastre<BR>> ><BR>>
><BR>><BR>><BR><BR>_______________________________________________<BR>Seaside
mailing list<BR>Seaside@lists.squeakfoundation.org<BR><A
href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR></FONT></P></BLOCKQUOTE></BODY></HTML>