_whitelogger has quit [Remote host closed the connection]
_whitelogger_ has joined #opal
e_dub has quit [Ping timeout: 260 seconds]
zmike123 has quit [Ping timeout: 256 seconds]
_whitelogger_ has joined #opal
zmike123 has joined #opal
_whitelogger_ has joined #opal
e_dub has quit [Ping timeout: 245 seconds]
e_dub has joined #opal
fkchang has joined #opal
<fkchang>
meh`: elia how should I handle undefined in opal? Kernel#alert returns undefined and I want to "print out the value" in opal-irb. I had been using inspect(), but that's not a method on undefined. Is there a way to check on undefined?
<elia>
fkchang: probably #alert needs to be fixed
<elia>
fkchang: I'm fixing it on master to return nil, in the while I suggest to define an #alert method in your local class to return the value: def alert(m) Kernel.alert(m);m; end
<fkchang>
elia: ur alert fix helped out. I'll possibly hit undefined elsewhere, so I'll need to handle it though
<fkchang>
elia: do u know what this means when running specs (confused coz my compiled code works)
<fkchang>
Error: jQuery must be included before opal-jquery
e_dub has quit [Ping timeout: 264 seconds]
<elia>
fkchang: probably my fault, added an "Explicative" some days ago
<fkchang>
is there a workaround?
<elia>
fkchang: it was adam
<elia>
not me
<elia>
fkchang: essentially the problem is that it can't find `Opal.global.jQuery`
<elia>
or `Opal.global.Zepto
<elia>
fkchang: are you including jquery in some unusual way?
<fkchang>
I don't think so, I have Opal::Spec::RakeTask.new(:default)
<fkchang>
and and trying to run specs
e_dub has joined #opal
elia has quit [Ping timeout: 264 seconds]
<meh`>
fkchang, ping
zmike123 has quit [Read error: Operation timed out]
<fkchang>
meh`: pong
<meh`>
fkchang, you can now do Component.css.apply { color 'red' } in runtime
<fkchang>
in opal-browser?
<meh`>
fkchang, no, in lissio
<meh`>
but you can do a similar think with a DOM element
<meh`>
element.style { color 'red' }
<fkchang>
lissio getting closer for me to be able to try out?
zmike123 has joined #opal
<meh`>
fkchang, didn't do much in the past few days
<meh`>
been working on releasing a 0.2 of opal-browser
<meh`>
so writing documentation, fixing bugs and other boring stuff
<meh`>
what the
<meh`>
where is adam
<meh`>
I'm getting double returns
<fkchang>
meh`: ok, so doesn't look quite like defined?() is what I want. If I have an object and it could be an opal object, or not, I want to run inspect on opal objects, and something for what I am guessing are native objects (i.e. non opal) of some sort, like undefined and other JS objects. What predicate? do I use to tell the difference. Probably an adam question
<meh`>
native? tells you if it's a native object
<meh`>
fkchang, I'm the guy to ask about the native stuff, I implemented it all :)
<meh`>
fkchang, the best way to ensure you're using an Opal object is calling Native() on the value
<meh`>
it will return a Native object if it's native
<meh`>
nil if it's null or undefined
<meh`>
and the passed value if it's already an opal object
<fkchang>
ok, so if I do a Native(obj).inspect that ought to handle all the cases
<meh`>
yes
<meh`>
well, not all cases actually
<meh`>
BasicObject doesn't have #inspect
<fkchang>
seems good enough thus far
<meh`>
here we go
<meh`>
now opal-browser has full-blown $console
<meh`>
AND opal-inspector or whatever could just override it
<fkchang>
I just let emacs handle it all, tabs, spaces, mixed, I just need to set it to handle whatever people around me use (spaces), also have it show/clean up stray spaces, u can setup vim to do the same