vwoo has quit [Client Quit]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Client Quit]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Client Quit]
elia has joined #opal
chap has joined #opal
elia has quit [Ping timeout: 240 seconds]
kludge` has quit [Ping timeout: 264 seconds]
kludge` has joined #opal
chap has quit [Quit: UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. - Dennis Ritchie]
ylluminate has joined #opal
<
ylluminate>
what a fantastic project guys!
chap has joined #opal
adambeynon has joined #opal
chap has quit [Quit: UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. - Dennis Ritchie]
chap has joined #opal
chap has quit [Quit: UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. - Dennis Ritchie]
meh`_ has quit [Ping timeout: 240 seconds]
graeme has joined #opal
<
graeme>
newbie question, what's the right idiom for calling from JS->Ruby from a %x block?
<
graeme>
$.contextMenu({
<
graeme>
selector: '.' + #{@selector},
<
graeme>
callback: function(key, options) {
<
graeme>
// problem here: trying dispatch to an instance method called onClick()
<
graeme>
// the 'self' in this context doesnt' resolve to the ruby instance
<
graeme>
Opal.send(#{self},'onClick', key, options);
<
graeme>
items: itemsHash
<
graeme>
derived from a jquery context menu example fwiw
chap has joined #opal
meh` has joined #opal
chap has quit [Quit: UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. - Dennis Ritchie]
<
adambeynon>
graeme: hi there
<
adambeynon>
sorry, was away
<
adambeynon>
when you use `#{self}` that will just generate `this`, which will be the wrong value inside the callback
<
adambeynon>
so, make a local variable reference to self
<
adambeynon>
context = self
<
adambeynon>
then use `#{context}` inside the `Opal.send(#{context}, 'onClick', key, options)`
meh` has quit [Ping timeout: 260 seconds]
vwoo has joined #opal
<
graeme>
ah, gotcha ... thanks much. nice framework by the way.
<
adambeynon>
thanks :D
<
adambeynon>
If you have any questions that dont get answered here, we do have a mailing list @ googlegroups as well
meh` has joined #opal
<
meh`>
adambeynon, did you see the arity bug?
meh` has quit [Ping timeout: 276 seconds]
meh` has joined #opal
<
adambeynon>
meh`: hey hey
<
adambeynon>
I did see it
GitHub66 has joined #opal
GitHub66 has left #opal [#opal]
<
GitHub66>
vienna/master 689e906 Adam Beynon: Add RecordArray for Model.all to store class models...
<
adambeynon>
#arity will work fine for normal args (once it is fixed)
<
adambeynon>
but supporting rest/opt args will be a pain
<
meh`>
I just need normal args for now
travis-ci has joined #opal
<
travis-ci>
[travis-ci] opal/vienna#104 (master - 689e906 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
<
meh`>
adambeynon, any prevision for when you'll have time to fix the currently standing bugs?
<
meh`>
arity + super + block destructuring inside parameters
<
adambeynon>
arity is a very quick fix
<
adambeynon>
super is a very complicated fix...
<
meh`>
if you can give priority to the block destructuring fix it'll be fine by me
<
adambeynon>
and block destructuring should be straighforward, aslong as it works as I hope it will
<
meh`>
then I can keep trying to make parslet work
<
meh`>
the super stuff has temporary fixes in opal-browser anyway
GitHub102 has joined #opal
<
GitHub102>
vienna/master ab1b628 Adam Beynon: Model subclasses now setup @all and @identity_map via inherited()
GitHub102 has left #opal [#opal]
travis-ci has joined #opal
<
travis-ci>
[travis-ci] opal/vienna#105 (master - ab1b628 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
<
meh`>
adambeynon, found another bug
vwoo has quit [Quit: Computer has gone to sleep.]
<
meh`>
adambeynon, constants don't get inherited
<
meh`>
>> class Foo; class Bar; class Baz; end; end; end
<
meh`>
>> class Azz < Foo::Bar; def lol; Baz; end; end
<
meh`>
>> Azz.new.lol
<
meh`>
=> Foo::Bar::Baz
<
meh`>
this doesn't work in Opal
<
adambeynon>
didnt realise that was even meant to work
<
meh`>
neither did I
<
meh`>
until I wanted to use it
<
meh`>
and verified it does work
<
adambeynon>
that is going to be a fun one to try and work out a solution for
GitHub86 has joined #opal
<
GitHub86>
vienna/master 3b935c2 Adam Beynon: Remove Model#did_load - no longer needed
GitHub86 has left #opal [#opal]
travis-ci has joined #opal
<
travis-ci>
[travis-ci] opal/vienna#106 (master - 3b935c2 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
vwoo has joined #opal
graeme has quit [Ping timeout: 240 seconds]
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
fkchang has joined #opal
vwoo has joined #opal
elia has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]