Mercurial > MadButterfly
annotate nodejs/component.js @ 1507:bebf73ee38c8
Fix issue of stopping hint when pointer leaving a target state
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 09 May 2011 17:26:31 +0800 |
parents | d19f47691d5e |
children |
rev | line source |
---|---|
1408
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
1 var mbfly = require("mbfly"); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
2 var svg = require("./svg"); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
3 var sys=require("sys"); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
4 /* |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
5 The Component and ComponentManager is used to keep track of the symbol |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
6 table in different frame. |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
7 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
8 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
9 */ |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
10 function mul(a,b) |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
11 { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
12 var m = [a[0]*b[0]+a[1]*b[3], a[0]*b[1]+a[1]*b[4], a[0]*b[2]+a[1]*b[5]+a[2], |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
13 a[3]*b[0]+a[4]*b[3], a[3]*b[1]+a[4]*b[4], a[3]*b[2]+a[4]*b[5]+a[5]]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
14 a[0] = m[0]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
15 a[1] = m[1]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
16 a[2] = m[2]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
17 a[3] = m[3]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
18 a[4] = m[4]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
19 a[5] = m[5]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
20 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
21 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
22 function Component(app, name) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
23 this.app = app; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
24 this.name = name; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
25 this.coord = null; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
26 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
27 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
28 Component.prototype.translate=function(tx,ty) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
29 if (this.coord) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
30 mul(this.coord, [1,0,tx,0,1,ty]); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
31 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
32 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
33 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
34 Component.prototype.resize=function(sx,sy) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
35 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
36 if (this.coord) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
37 mul(this.coord, [sx,0,0,0,sy,0]); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
38 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
39 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
40 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
41 Component.prototype.set=function(m) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
42 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
43 if (this.coord) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
44 this.coord[0] = m[0]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
45 this.coord[1] = m[1]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
46 this.coord[2] = m[2]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
47 this.coord[3] = m[3]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
48 this.coord[4] = m[4]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
49 this.coord[5] = m[5]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
50 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
51 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
52 Component.prototype.hide=function(m) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
53 if (this.coord) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
54 this.coord.hide(); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
55 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
56 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
57 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
58 Component.prototype.show=function(m) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
59 if (this.coord) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
60 this.coord.show(); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
61 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
62 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
63 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
64 Component.prototype.search=function() { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
65 this.coord = this.app._componentmanager.search(this.name); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
66 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
67 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
68 Component.prototype.realize=function() { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
69 if (this.coord == null) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
70 this.search(); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
71 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
72 return this.coord; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
73 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
74 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
75 Component.prototype.toCoord=function() { |
1438
d19f47691d5e
Use cooord.set_text to update the text inside a component.
wycc
parents:
1408
diff
changeset
|
76 return this.realize(); |
1408
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
77 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
78 |
1438
d19f47691d5e
Use cooord.set_text to update the text inside a component.
wycc
parents:
1408
diff
changeset
|
79 Component.prototype.set_text=function(text) { |
d19f47691d5e
Use cooord.set_text to update the text inside a component.
wycc
parents:
1408
diff
changeset
|
80 this.realize(); |
d19f47691d5e
Use cooord.set_text to update the text inside a component.
wycc
parents:
1408
diff
changeset
|
81 this.coord.set_text("asdsad"); |
d19f47691d5e
Use cooord.set_text to update the text inside a component.
wycc
parents:
1408
diff
changeset
|
82 } |
1408
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
83 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
84 function ComponentManager(app) |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
85 { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
86 this.app = app; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
87 this.object_table = {}; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
88 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
89 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
90 /* \brief add an object into the current current component table. |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
91 * This first argument is the source node of the screen object. |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
92 * The second argument is the coord object which is displayed at |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
93 * the screen now. |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
94 * |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
95 * We need to use the soucer node to get the name of the object. |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
96 */ |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
97 ComponentManager.prototype.add=function(source,obj) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
98 if (source.refid==undefined) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
99 sys.puts("Internal Error: no refid is defined\n"); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
100 return; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
101 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
102 this.object_table[source.refid] = obj; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
103 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
104 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
105 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
106 ComponentManager.prototype.del=function(name) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
107 delete this.object_table[name]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
108 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
109 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
110 ComponentManager.prototype.dump=function(name) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
111 for(i in this.object_table) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
112 sys.puts(i); |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
113 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
114 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
115 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
116 ComponentManager.prototype.search=function(name) { |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
117 return this.object_table[name]; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
118 } |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
119 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
120 |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
121 exports.Component = Component; |
c918b79892ab
Add component class which is sued to access the objects in different frame for the same screen object. We will treat the object as the same if the duplicated-src are the same or it is the grpup defined by duplicated-src.
wycc
parents:
diff
changeset
|
122 exports.ComponentManager = ComponentManager; |