Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Can autoChild constructor be passed as string or function?

$
0
0
I'm using autoChildren for the first time and it's very cool! The way my source code is organized (and will be minified), is that various JavaScript files are loaded in alphabetical order. I need to specify an constructor for an auto child before that code is actually loaded. Is there a way to use a string instead of the class itself? Or a function returning the class? Else, I need to include the source code in "load" order.

Code:

  isc.defineClass('ClassA', isc.VLayout).addProperties({
    headerDefaults: {
      _constructor: isc.ClassB // oops, ClassB not yet defined
    },
    ...
  });

  isc.defineClass('ClassB', isc.VLayout).addProperties({
    ...
  });


Viewing all articles
Browse latest Browse all 4756

Trending Articles