<br><br><div class="gmail_quote">2009/11/6 Bryan Berry <span dir="ltr"><<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, 2009-11-05 at 22:43 +0100, Felipe López Toledo wrote:<br>
><br>
> interesting, +1 to use test-driven<br>
> I think it will consume more time, but it will make easier the<br>
> introduction to new developers<br>
<br>
</div>I haven't made that much progress yet but u can see the start here:<br>
<br>
<a href="http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/jkjs-refactor/tests/index.html" target="_blank">http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/jkjs-refactor/tests/index.html</a><br>
<br>
and all the tests here:<br>
<a href="http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/jkjs-refactor/tests/tests.js" target="_blank">http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/jkjs-refactor/tests/tests.js</a><br>
<br>
So far I have only stubbed out the tests and code for the helper<br>
methods.<br>
<div class="im"><br>
><br>
> Reading through jquery.karma.js, I have some questions:<br>
><br>
> --- the init function ---<br>
> You have an init function that receives the assets to be<br>
> loaded as an<br>
> argument but actually loading them happens in the first part<br>
> of the if<br>
> statement of karma.main . To me it would make more sense to<br>
> just pass<br>
> the assets as an argument to karma.main({ /* assets object<br>
> */}) and not<br>
> the function call back as currently.<br>
><br>
> Ideally I would like the use of Karma in lesson.js to be as<br>
> simple as<br>
><br>
> var k = Karma({ images: [ .....], sounds : [...], surfaces :<br>
> [....]})<br>
> then it will be necessary to define the i18n options first<br>
> var k = Karma({ i18n: []...., images: [ .....], sounds : [...],<br>
> surfaces : [....]})<br>
<br>
</div>+1,<br>
<br>
I think the property locale : "en" will be sufficient<br></blockquote><div>I'm supposing that defining nothing will auto locale</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> other way what images/sounds are we suppose to load?<br>
><br>
><br>
><br>
> // the rest of the code for a lesson<br>
><br>
> I don't understand the if statement in karma.main. It seems to<br>
> me that<br>
> the callback to main function would never be called. That the<br>
> first if<br>
> clause will always be true and karma.main() won't be called a<br>
> second<br>
> time.<br>
> I'm checking if there is something to load ( pendingToLoad ), if yes<br>
> then I load all the stuff<br>
> other way the else statement will be executed<br>
> <a href="http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/master/js/jquery.karma.js#line489" target="_blank">http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/master/js/jquery.karma.js#line489</a><br>
><br>
> anyway the callback function will be executed (if it's defined)<br>
<br>
</div>I don't see how that works. It seems to me that if there is anything<br>
pendingToLoad it is loaded, and the callback isn't called.<br></blockquote><div>when all the items are loaded (or have reported any error) then the callback function will be called</div><div><a href="http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/master/js/jquery.karma.js#line463">http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/master/js/jquery.karma.js#line463</a></div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
<br>
><br>
> +1<br>
> we won't have *any* dependencies, anyway we're using specific parts<br>
> (helpers) of jquery (example: $.each )<br>
<br>
</div>and we don't need $.each because the browsers support<br>
Array.prototype.forEach . Also, I implemented $.extend as objectPlus<br>
<br>
<a href="http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/jkjs-refactor/js/karma.js#line57" target="_blank">http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/jkjs-refactor/js/karma.js#line57</a><br>
<div class="im"><br></div></blockquote><div>+1</div><div><span class="Apple-style-span" style="font-family: arial, sans-serif, 'Arial Unicode MS'; font-size: 13px; border-collapse: collapse; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">there are just few jQuery functions that I used, like $.extend...</span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
<br>
><br>
> interesting, let me read (more) about in order to give you good<br>
> arguments to discuss it<br>
><br>
><br>
><br>
> -- KButton ----<br>
><br>
> What is the purpose of KButton?<br>
><br>
> there is no way to create buttons or clickeable elements inside a<br>
> canvas,<br>
> as for example, svg has its clickeable property (or something called<br>
> like that)<br>
> KButton is a "fast way" to create clickeable canvas sub-regions, this<br>
> feature can be replaced by multiple canvas<br>
<br>
</div>But do we still need it? should i leave it in?<br></blockquote><div>no, afaik SVG supports clickeable (draggable and so on) actions</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
> what about this weekend?<br>
<br>
That works for me. How about Sunday before 11 am EST?<br></blockquote><div>11 am EST = 11 am <span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">UTC-5<span class="Apple-style-span" style="font-family: arial; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: small; "> = 10 am México</span></span></div>
<div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="Apple-style-span" style="font-family: arial; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: small; ">ok :)</span></span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
<br>
--<br>
Bryan W. Berry<br>
Senior Engineer<br>
OLE Nepal, <a href="http://www.olenepal.org" target="_blank">http://www.olenepal.org</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Felipe López Toledo<br>