|
第一步:5 X7 U" q5 L7 D& O/ O' b
treenode item = parnode(1);
: F' ?; C6 b" N" R V/ dtreenode current = ownerobject(c);
* P" k: t- p$ f! q! f) streenode source=node("/source",model());; Q% B0 A! ?! [. n3 Q
int port = parval(2);, d) D: J9 @# l- ^$ |
if(
H' f |9 I, S- c' \ content(current)>=204 B, j& p+ y4 r, {7 ~* e" G
)
2 l* ]3 A' [( E k& csendmessage(source,current,1,0,0);: R h; k( y- a* }8 i' X4 ~
return 1;& p/ | c- j. ^, K
第二步:( b) b# M5 g0 N/ s5 s* x1 R+ \/ U
/**Custom Code*/
, O; X- Q1 L& Q0 ?" x& d2 atreenode item = parnode(1);- }$ y+ w4 W2 B s0 u5 [9 r8 g
treenode current = ownerobject(c);7 D5 N1 c# D3 i
treenode source=node("/source",model());* l) k/ D3 E4 N$ L1 Z* H' x
int port = parval(2);
, ?# Q$ L, J6 W7 h$ f2 w, Yif(
3 t( d0 x; |, `- N: F5 U4 h content(current)<5* ]2 V% B( q0 C* r5 ^
)
, `! t- x f. i; ?5 esendmessage(source,current,2,0,0);+ |- H d* U+ l
return 5;
5 T7 X6 x9 S" k/ t6 u/ ^, @) N1 k第三步:
2 w* T6 Z$ m) |
Q8 V' S; g# u |' e/**Custom Code*/) L$ J2 m, D! S( p5 k6 E1 P" K
treenode current = ownerobject(c);% X/ [& J5 H5 j0 R: ~+ b' Q
unsingned int uservalue=(unsigned int) msgparam(1);* k1 P% b, V7 B0 V: m% S2 s9 V
switch(uservalue){; g& O& v7 @1 j" ^
case 1:closeoutput(current);break;4 Q1 h c* c0 M+ m2 J3 d" z% E
case 2 penoutput(current);break;, o2 ]4 `1 g* P
}
1 o+ \+ w9 V: z& }最后系统报错是第三步,说是没有定义uservalue:+ s- m& i* I; s
& q+ z0 V& a* G7 W+ {& U) ^3 ?line 3 unknown variable "unsingned"
* S+ J3 e8 O; H7 z! ]* ]5 m
i6 v" @- a" ^) |9 j/ Aline 3 syntax error, unexpected type identifier, expecting ';'$ H0 v$ \8 K" K# D- {) O; h' q
Could not finish parsing because of previous errors." F8 s( Y( U, |8 E, A1 a
% \6 Z- R. P* f+ S/ z
请问各位大大这是怎么一回事.... |
|