meh` changed the topic of #opal to: http://opalrb.org - Ruby runtime and library on top of Javascript | 1.0.0 is near | This channel is logged at https://botbot.me/freenode/opal/
dimaursu16 has quit [Ping timeout: 264 seconds]
gravityblast has quit [Quit: gravityblast]
gravityblast has joined #opal
meh`_ has quit [Ping timeout: 240 seconds]
meh` has joined #opal
lacrosse_ has quit [Ping timeout: 240 seconds]
lectrick_ has quit [Ping timeout: 240 seconds]
lectrick_ has joined #opal
lacrosse_ has joined #opal
antonishen_ has joined #opal
antonishen has quit [Ping timeout: 240 seconds]
antonishen_ is now known as antonishen
antonishen has quit [Client Quit]
antonishen has joined #opal
mneorr_ has joined #opal
ryanstewart2 has joined #opal
gravityblast has quit [Quit: gravityblast]
mneorr has quit [Ping timeout: 642 seconds]
ryanstewart has quit [Ping timeout: 642 seconds]
lectrick_ has joined #opal
lectrick_ has quit [Changing host]
lacrosse_ has quit [Changing host]
lacrosse_ has joined #opal
antonishen has quit [Changing host]
antonishen has joined #opal
Liothen has quit [Ping timeout: 240 seconds]
skofo has joined #opal
Liothen has joined #opal
meh` has quit [Ping timeout: 240 seconds]
mneorr_ has quit [Remote host closed the connection]
mneorr_ has joined #opal
mneorr_ has quit [Remote host closed the connection]
e_dub has joined #opal
skofo has quit [Ping timeout: 252 seconds]
lewix has joined #opal
<lewix> so
<lewix> why nobody adopted it yet
Steve445 has joined #opal
Steve445 has quit [Quit: Steve445]
lewix has quit [Ping timeout: 240 seconds]
dimaursu16 has joined #opal
ryanstout has quit [Quit: ryanstout]
Steve445 has joined #opal
Steve445 has quit [Client Quit]
Steve445 has joined #opal
Steve445 has quit [Quit: Steve445]
dimaursu16 has quit [Ping timeout: 252 seconds]
dimaursu16 has joined #opal
elia has joined #opal
gravityblast has joined #opal
<dimaursu16> guys, sometimes I have a buch of errors when running opal on top of rails
<dimaursu16> Uncaught TypeError: Object [object Object] has no method '$const_missing'
<dimaursu16> I got 21 of those ^
<dimaursu16> It doesn't seem to affect the application anyhow, and I don't mind them much, but I would like to keep the console clear...
gravityblast has quit [Quit: gravityblast]
gravityblast has joined #opal
<elia> dimaursu16, which version?
<elia> of opal / opal-rails I mean
<dimaursu16> 0.6.2 opal-rail
<dimaursu16> and opal is 0.5.5
<dimaursu16> elia: ^
<elia> try this in the console
gravityblast has quit [Quit: gravityblast]
<elia> dimaursu16,
<elia> Opal.Object.$new().$const_missing
<dimaursu16> it returns a function definition
<dimaursu16> method_missing_stub
gravityblast has joined #opal
gravityblast has quit [Quit: gravityblast]
<elia> dimaursu16, seems that you have disabled constant missing support on the opal processor
<dimaursu16> hmmm.. let me check..
<dimaursu16> config.opal.method_missing = true
<dimaursu16> config.opal.const_missing = true
<elia> ok, check this: the deleted part
<elia> try removing tmp/cache/assets
<dimaursu16> ok
<elia> and restart the app
<dimaursu16> btw, it doesn't always occur..
<elia> seems a caching problem, it's either on the server or on the client
<elia> be sure to clear the browser cache too
<elia> dimaursu16, let me know what fixes the problem so that I can fix opal-rails if needed…
<dimaursu16> it doesn't occur anymore
<dimaursu16> also, I remove all opal configs form application.rb
<dimaursu16> I didn't knew what they do anyway...
<elia> dimaursu16, lol, defaults should be good
<dimaursu16> I will let you know if it happens again...
<dimaursu16> yeah, I think so :)
<dimaursu16> I just saw that on github, and I was like: why not, let's configure the damn thing :)
<elia> eh, good point, we should probably mark them as "advanced config" or something
<dimaursu16> I will get my hands dirty with opal next week, probably :) then I will have more questions and suggestions
<elia> dimaursu16, any time! :)
kludge` is now known as kludge`_
kludge`_ is now known as kludge`
meh` has joined #opal
joshka has joined #opal
joshka has left #opal ["Saliendo"]
joshka has joined #opal
gravityblast has joined #opal
<joshka> hi! I want to use a jquery.plugin, can I use with opal?
<joshka> in jquery I use: $('<selector>').<jquery_plugin_function>
<joshka> but how can I use it in opal?
<joshka> in opal I use Element.find('<selector>') but I can't use: Element.find('<selector>').<jquery_plugin_function> because the functions doesn't exist
<joshka> *the function
<meh`> joshka, you have to expose the plugin method
<joshka> meh` opening Element class and add expose?
<meh`> yes
<meh`> gimme a sec
<joshka> ok ;)
<meh`> derp
<joshka> meh`, with this works well, thank you very much! ;)
<meh`> np
<joshka> meh`, one thing, the method works well but I'm passing a hash options and the method doesn't respond to the options
<joshka> <method>({<key1>: <value1>, <key2>: <value2>})
<meh`> elia, adambeynon_, ^
<meh`> joshka, I don't use nor work with opal-jquery, so I don't know if it does any implicit conversion
<meh`> for the time being you can do {}.to_n
<joshka> with to_n works well
<joshka> meh`, thanks again ;)
<meh`> :)
gravityblast has quit [Quit: gravityblast]
<adambeynon_> hi meh`
<elia> joshka, if you want to avoid using #to_n you need to implement the method manually
<meh`> that's lame
<joshka> elia, thanks ;)
<adambeynon_> meh`: Im finding it tough to get time to fix bugs atm, any complaints to releasing 0.6.0, and the bugs become patch releases in a couple of weeks?
<joshka> elia, thanks ;)
<joshka> I'm seeing the source code
<elia> meh`, lame indeed, but I don't think method_missing is a viable option there
<elia> adambeynon_, amirite?
<adambeynon_> elia: yeah. the alternatives cause more problems (wrapping jquery, etc)
<adambeynon_> we could always add the stubs to jquery as well
<adambeynon_> but the stubs tend to get upto about 500 method names
<adambeynon_> seems a lot to be adding to jquery prototypes
<elia> or keep a list of bridged classes and keep all those in the loop
<joshka> Are there jquery ui opal or I have to extend the methods I want too?
<adambeynon_> yeah, that could be done
<adambeynon_> joshka: you need to extend those as well
<meh`> adambeynon_, fine by me
<joshka> adambeynon_, thanks ;)
gravityblast has joined #opal
e_dub has quit [Ping timeout: 244 seconds]
<joshka> I'm trying to use jquery-ui-dialog with opal, I extended dialog method in Element class but dialog method accepts attribute 'buttons' with js functions, ¿how can I implement this with opal?
<joshka> i.e. $('').dialog({button: {Destroy: function(){...}})
<adambeynon_> my_element.dialog({ button: { Destroy: proc; end } })
<adambeynon_> sorry
<adambeynon_> my_element.dialog({ button: { Destroy: proc; end } }.to_n)
<adambeynon_> er
<adambeynon_> my_element.dialog({ button: { Destroy: proc do; end } }.to_n)
<joshka> I'm goint to try it ;) thanks
<joshka> adambeynon_, works perfectly thanks :)
<adambeynon_> joshka: I have found a lot of the jquery plugins to have very awkward syntax when written in ruby. they try to force very ugly configs into object literals
<adambeynon_> I have found it more useful to write a wrapper class
<adambeynon_> dialog = JQueryDialog.new(element)
<adambeynon_> dialog.on(:Destroy) do ... end
<adambeynon_> but it does depend on how frequently you use them I guess
<joshka> I understand adambeynon_ sorry but I'm new in opal and I want to learn it, if I write a wrapper class, do I have with opal core classes or maybe with opal-jquery too?
<joshka> adambeynon_, can you give me an example of one wrapper built with opal for a jquery plugin? link or something like that
kartouch has quit [Quit: ZNC - http://znc.in]
fkchang has joined #opal
joshka has quit [Quit: Saliendo]
ryanstout has joined #opal
dimaursu16 has quit [Ping timeout: 240 seconds]
dimaursu16 has joined #opal
dimaursu16 has quit [*.net *.split]
meh` has quit [*.net *.split]
[o__o] has quit [*.net *.split]
ryanstout has quit [*.net *.split]
fkchang has quit [*.net *.split]
gravityblast has quit [*.net *.split]
meh` has joined #opal
fkchang has joined #opal
ryanstout has joined #opal
dimaursu16 has joined #opal
lectrick_ has quit [Ping timeout: 245 seconds]
fkchang has quit [Read error: Connection reset by peer]
dimaursu16 has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
dimaursu16 has joined #opal
lectrick_ has joined #opal
fkchang has joined #opal
mneorr has joined #opal
[o__o] has joined #opal
elia has joined #opal
skofo has joined #opal
skofo has quit [Ping timeout: 240 seconds]
mneorr_ has joined #opal
mneorr_ has quit [Remote host closed the connection]
mneorr_ has joined #opal
mneorr__ has joined #opal
mneorr has quit [Ping timeout: 265 seconds]
mneorr_ has quit [Ping timeout: 240 seconds]
mneorr__ has quit [Remote host closed the connection]
mneorr has joined #opal
mneorr_ has joined #opal
mneorr has quit [Ping timeout: 245 seconds]
fntzr has joined #opal
fntzr has quit [Client Quit]
[o__o] has quit [Remote host closed the connection]
[o__o] has joined #opal
ryanstout has quit [Ping timeout: 240 seconds]
dimaursu16 has quit [Ping timeout: 240 seconds]
dimaursu16 has joined #opal
dimaursu16 has quit [Ping timeout: 264 seconds]
fkchang has quit [*.net *.split]
ryanstout has joined #opal
ryanstout has quit [Ping timeout: 240 seconds]
dimaursu16 has joined #opal
ryanstout has joined #opal