This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class('Some.Class', { | |
has : { | |
attr : { | |
meta : Vero.Attribute, | |
is : 'rw' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class('My.Attribute', { | |
meta : Joose.Meta.Class, | |
isa : Joose.Managed.Attribute, | |
methods : { | |
getSetter : function () { | |
}, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class('Some.Class', { | |
trait : 'JooseX.Method.Remote.HTTP', // will include JooseX.CPS | |
has : { | |
attr : null | |
}, | |
methods : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('Task/Joose/NodeJS') | |
var puts = require('sys').puts | |
Joose.Class('Class1', { | |
//use : [ 'Class2' ], | |
has : { | |
myAttr : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// works | |
{ | |
"id":"/lang", | |
"type":"/type/namespace", | |
"unique":null | |
} | |
// fails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 1 | |
doSomething1() | |
if (a) { | |
var b | |
doSomething2() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class('Custom.Property', { | |
isa : Joose.Managed.Property, | |
does : Some.Role | |
// wrong, as Custom.Property will have the same meta-class as Joose.Managed.Property | |
// which is on 1st level and don't know what Role is | |
}) | |
Class('Custom.Property', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('Task/Joose/NodeJS') | |
var puts = require('sys').puts | |
Class('Some.Class', { | |
has : { | |
attrib : { | |
is : 'rw', | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('Task/Joose/NodeJS') | |
var puts = require('sys').puts | |
Class('Some.Class', { | |
has : { | |
attrib : { | |
is : 'rw', | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class("My.Class", { | |
use: ["Some.Module"], // trigger async loading | |
body : function (m) { | |
// m == this == My.Class here | |
// class will be ready here | |
}}) |