Sean P. DeNigris
Create JS Object in Smalltalk –
How do I rewrite the {...} part of the following in Amber?
$("#MySplitter").splitter({
splitVertical: true,
sizeLeft: true
}...
Loading...
Herby Vojčík
"Sean P. DeNigris" <sean@...>napísal/a:
I added an explanation to the wiki
(https://github.com/amber-smalltalk/amber/wiki/...
Loading...
Sean P. DeNigris
In my current project, I tried to port:
$('#jstree').jstree({
"plugins" : [ "contextmenu" ]
});
as:
'#navig...
Loading...
sebastianconcept
or with # instead?
'plugins' -> #{ 'contextmenu' }
sebastian
o/
> On 30/07/2014, at 19:32, "Sean P. DeNigris" <sean...
Loading...
Sean P. DeNigris
No it actually expects an array. I tried unsuccessfully with # first.
Loading...
Herby Vojčík
Interesting, as there is nothing special with this case on the first look. It's probably something with JSTree treating plugins array somehow stra...
Loading...
Sean P. DeNigris
There is something very odd going on.
Here's a snippet from my method:
install
| action menuItem |
action := self jsObject
at: 'acti...
Loading...
Herby Vojčík
Sean P. DeNigris wrote:
> There is something very odd going on.
>
> Here's a snippet from my method:
> install
>
> ...
Loading...
Sean P. DeNigris
Okay, I could've sworn is was $2, but I recompiled subsequently and can't go back and check, so let's just chock it up to a misread.
But...
...
Loading...
Herby Vojčík
Sean P. DeNigris wrote:
> Herby Vojčík wrote
>> I don't understand, what throwaway? In both cases, result of call to
>> ....
Loading...
Sean P. DeNigris
It's just a symptom of the underlying problem. The pattern of requiring:
tmp := self jsObject.
jsObject doSomething.
vs.
tmp := self jsObj...
Loading...
Herby Vojčík
Sean P. DeNigris wrote:
> Herby Vojčík wrote
>> But that code is, as you surely see,
>> wrong from design reasons, as it's a...
Loading...
Herby Vojčík
Herby Vojčík wrote:
>
>
> Sean P. DeNigris wrote:
>> Herby Vojčík wrote
>>> But that code is, as you surely see,
...
Loading...
Sean P. DeNigris
Oh, I see now. This is a trap for new users. I think it should be clearly explained somewhere prominent.
If the purpose of the proxy is...
Loading...
Sean P. DeNigris
Ha ha, I left it out again. Thanks for fixing the wiki.
Loading...
Herby Vojčík
Sean P. DeNigris wrote:
> How do I rewrite the {...} part of the following in Amber?
>
> $("#MySplitter").splitter({
&g...
Loading...
Sean P. DeNigris
Thanks! That worked. I added an explanation to the wiki (https://github.com/amber-smalltalk/amber/wiki/From-smalltalk-to-javascript-and-back#c...