These are chat archives for opal/opal

Jul 2016
Bernhard Weichel
Jul 06 2016 10:34 UTC
@elia imho zepzo support can be droppef if it makes maintenace easier
This message was deleted
I am looking for an api which allows to list, create, read files on cloud services such as dropboc owncloud etc. Is there any hint, even for one which already has an opal wrapper
Mitch VanDuyn
Jul 06 2016 14:56 UTC
:-( opal 0.10 not working with reactrb prerendering... very odd error
Mitch VanDuyn
Jul 06 2016 15:04 UTC
looks like this line no longer works as it did:
Opal::Processor.load_asset_code(::Rails.application.assets, 'components')
Mitch VanDuyn
Jul 06 2016 15:14 UTC
I see its deprecated! Thanks for the good documentation!!
Mitch VanDuyn
Jul 06 2016 15:25 UTC
however there seems to be a change in semantics?
Mitch VanDuyn
Jul 06 2016 15:36 UTC
well not there, but someplace else... load_asset returns the same thing, but...
Mitch VanDuyn
Jul 06 2016 15:57 UTC
okay so when I do load_asset, i get this string back:
"if (typeof(Opal) !== 'undefined') { Opal.loaded([\"opal\",\"corelib/runtime.self\",\"development/react.self\"]); Opal.load(\"components\"); }"

regardless of whether i am in opal 9, or opal 10

this is then sent to the ruby racer for evaluation.
everything works fine
in opal 10, on the top level module "React" seems to be defined... like wise only the the top level Component module is defined.

Mitch VanDuyn
Jul 06 2016 16:11 UTC
So the problem was I have some "hardcoded javascript" like this:

which now wants to look like this:


Is there a better way of dynamically decided which to use other than doing this:

if @ctx.eval("Opal.React.IsomorphicMethods") 
... old way
... new way

How far back was $$scope.get defined (I want to stay compatible with Opal 0.8 +)

Elia Schito
Jul 06 2016 19:47 UTC
@catmando I'm quite sure $$scope.get works back to 0.8, but trying is the right way to find out :P
@catmando also would probably be better to use Module#const_get if it's implemented on older versions… that way you use a ruby API instead of an internal Opal behavior
Doug Orleans
Jul 06 2016 20:21 UTC
This page seems a few versions out of date:
v0.9.2 stable
Elia Schito
Jul 06 2016 21:18 UTC
@dougo yeah, I'm in the process of updating all the things, when all it's done I'll publish the blog post on the site and start sharing that around