<div>Ohhhhh of course, a Array with a Dictionary!!! This was so obvious (but not for me jeje).<br></div><div>When I complete my first JQWidget,  I share it with you.</div><div>Thanks.<br></div><div><br></div><div class="gmail_quote">
2011/9/1 Paul DeBruicker <span dir="ltr">&lt;<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You need to create a Dictionary and then put that in your array<br>
<br>
You can test it in a workplace like this:<br>
<br>
|dict array  value1 value2|<br>
value1 := &#39;abcd&#39;.<br>
value2 := 12345.<br>
dict:=Dictionary new.<br>
dict at: &#39;subop1&#39; put: value1.<br>
dict at: &#39;subop2&#39; put: value2.<br>
array:=Array with: dict.<br>
array asJson<br>
<br>
<br>
<br>
<br>
<br>
so your code should become<br>
<br>
self optionAt: &#39;op1&#39; put (Array with: aDictionary).<div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 09/01/2011 10:40 AM, Gastón Dall&#39; Oglio wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hello.<br>
<br>
I&#39;m writing a new JQWidget component and I need generate js code like<br>
this for correctly load of the wrapped plugin:<br>
$(&quot;#id&quot;).funcname({&quot;op1&quot;:[{&quot;subop1&quot;:&quot;value1&quot;,&quot;subop2&quot;:&quot;value2&quot;,...}],...});<br>
<br>
<br>
I don&#39;t know how do it. I have a method JQMyWidget&gt;&gt;subop1:value, where<br>
I write some [stupid] implementation:<br>
<br>
1) self optionAt: &#39;op1&#39; put: (Array with: &#39;subop1&#39; with: value)     =&gt;<br>
    $(&quot;#id&quot;).funcname({&quot;op1&quot;:[&quot;subop1&quot;,&quot;value&quot;]})<br>
<br>
2) self optionAt: &#39;op1&#39; put: (&#39;subop1&#39; -&gt; value)     =&gt;<br>
$(&quot;#id&quot;).funcname({&quot;op1&quot;:&#39;subop1&#39;-&gt;&#39;value&#39;})<br>
<br>
3) self optionAt: &#39;op1&#39; put: (self optionAt: &#39;subop1&#39; put: value)     =&gt;<br>
    $(&quot;#id&quot;).funcname({&quot;op1&quot;:&quot;value&quot;,&quot;subop1&quot;:&quot;value&quot;})<br>
<br>
Any idea? Thanks in advance.<br>
<br>
<br></div></div>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br>