-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.js
More file actions
40 lines (37 loc) · 966 Bytes
/
examples.js
File metadata and controls
40 lines (37 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Pkg.write(
'com.example.mypkg.examples',
{
pkg:'interfaces::@IAbstractExample',
methodToImplement:function methodToImplement(msg){}
},
{
pkg:'interfaces::@IExample',
inherits:'interfaces::IAbstractExample'
},
{
pkg:'abstracts',
constructor:function AbstractExample(id){
this.id = id ;
},
destroy:function destroy(){
trace('example destroyed...') ;
return undefined ;
}
},
{
pkg:'::Example',
inherits:'abstracts::AbstractExample',
interfaces:['interfaces::IExample'],
constructor:Example = function Example(id){
Example.base.apply(this, arguments) ;
},
methodToImplement:function methodToImplement(msg){},
destroy:function destroy(){
trace('example destroyed...') ;
return undefined ;
}
}
)
var Example = Type.definition('com.example.mypkg.examples::Example') ;
var s = trace(new Example('test_example')) ;
trace(s instanceof Type.definition('com.example.mypkg.examples.abstracts::AbstractExample')) ;