<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<font class="Apple-style-span" face="Tahoma" size="2">Am I correct in calling the JSObject this way through a render method?</font><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div><font class="Apple-style-span" face="Tahoma" size="2">html document addLoadScript: (AJSObjectSubclass context: html).</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Then the code gets called in #javascriptContentOn:?</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">RS<br></font><br><div style="font-family: Tahoma; font-size: 10pt; ">&gt; Subject: Re: [Seaside] Subclassing JSObject<br>&gt; From: johan@inceptive.be<br>&gt; Date: Thu, 23 Jun 2011 14:46:55 +0200<br>&gt; To: seaside@lists.squeakfoundation.org<br>&gt; <br>&gt; Hi Robert,<br>&gt; <br>&gt; The obligatory first question: Do you really need to write it using Seaside's JSObjects?<br>&gt; In other words: is there a reason not to use a plain javascript string or even an external javascript file?<br>&gt; <br>&gt; But here are the samples you requested. <br>&gt; I would never write them like that unless you want to integrate such statements in seaside-generated javascript.<br>&gt; <br>&gt; (JSStream on: 'x') assign: ((JSStream on: 'MyClass') apply: #())<br>&gt; <br>&gt; (JSStream on: 'x') call: 'setVar' withArguments: (Array with:'blah')<br>&gt; <br>&gt; ((JSStream on: 'x') call: 'update') timeout: 100<br>&gt; <br>&gt; Hope it helps!<br>&gt; Johan<br>&gt; <br>&gt; On 23 Jun 2011, at 05:18, Robert Sirois wrote:<br>&gt; <br>&gt; &gt; 'ello. I'd like to use the Seaside javascript facilities to instantiate a javascript class of mine.<br>&gt; &gt; <br>&gt; &gt; What I'd like is an example or something, because looking at the Seaside code and the jQuery classes and stuff is rather confusing.<br>&gt; &gt; <br>&gt; &gt; My class is simple, however. Basically, all I need is to instantiate a variable:<br>&gt; &gt; <br>&gt; &gt;         x = MyClass();<br>&gt; &gt; <br>&gt; &gt; and evaluate some setters:<br>&gt; &gt; <br>&gt; &gt;         x.setVar('blah');<br>&gt; &gt; <br>&gt; &gt; and then evaluate x.update(); on an interval... which JSObject provides.<br>&gt; &gt; <br>&gt; &gt; Thanks,<br>&gt; &gt; RS<br>&gt; &gt; _______________________________________________<br>&gt; &gt; seaside mailing list<br>&gt; &gt; seaside@lists.squeakfoundation.org<br>&gt; &gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>&gt; <br>&gt; _______________________________________________<br>&gt; seaside mailing list<br>&gt; seaside@lists.squeakfoundation.org<br>&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></div>                                               </div></body>
</html>