<div dir="ltr"><div>Hi Bert,</div><div><br></div><div>I saw your fix, thanks very much! </div><div><br></div><div>Jerry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 30, 2015 at 5:37 AM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div style>On 29.01.2015, at 20:10, Jerry Bell <<a href="mailto:jdbellomm@gmail.com" target="_blank">jdbellomm@gmail.com</a>> wrote:<br><div><blockquote type="cite"><br><div><div dir="ltr"><div>Hello,</div><div><br></div><div>I'm trying to run the JSBridge callback example from a 4.5 image. JSBridge.st is loaded and I'm running under Chrome on Windows. I get an error: "Error:primReturnFromCallback: failed. " Digging a little in the debugger, I find in JSObjectProxy>>handleCallback, result is : "Error: Error: This block accepts 2 arguments, but was called with 0 arguments". </div><div><br></div><div>Modifying the example with a callback block with 0 arguments works.</div></div></div></blockquote><div><br></div>Hi Jerry,</div><div><br></div><div>you found a bug :)<br><br></div><div>Apparently I’ve never tested this with block closures, only with block contexts. </div><div><br></div><div><div>I created an issue: <a href="https://github.com/bertfreudenberg/SqueakJS/issues/29" target="_blank">https://github.com/bertfreudenberg/SqueakJS/issues/29</a></div><div><br></div><div>But I think it’s going to be trivial to fix. We just have to handle both blocks and closures in <span style="color:rgb(121,93,163);line-height:16.79px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(248,238,199)">js_primitiveGetActiveCallbackArgs()</span>:</div></div><div> <a href="https://github.com/bertfreudenberg/SqueakJS/blob/3c137c6f930259d0bcf02d5f80a86ee1457f17fe/vm.js#L6010" target="_blank">https://github.com/bertfreudenberg/SqueakJS/blob/3c137c6f930259d0bcf02d5f80a86ee1457f17fe/vm.js#L6010</a></div><div><br></div><div>
<span style="font-family:"Lucida Grande";font-size:12px;border-collapse:separate;border-spacing:0px"><div style><div style="font-family:Helvetica"><span style="font-family:Helvetica">- Bert -</span></div></div></span></div><br></div><br></blockquote></div><br></div>