|
第一步:: |0 z9 j2 l! ]1 r1 _
treenode item = parnode(1);
8 l- s5 |) A$ w. d4 t# ?$ N! Ptreenode current = ownerobject(c);
1 {: N2 ]4 h. ], x! h! mtreenode source=node("/source",model());
% ~3 c l. ^& P; Q5 Dint port = parval(2);* l3 A$ }5 x1 Q4 S9 S! h9 b
if(
* S! o2 a: ~( u content(current)>=20
Y1 h( j, f$ _; m: O4 U/ g1 W)
' U' T0 ]2 \0 Msendmessage(source,current,1,0,0);
5 _& J5 B3 I2 I# w2 r3 Q4 Mreturn 1;
- u: A3 w, B3 Y$ a* O8 P% t第二步:
}: d6 Z7 ?# v3 L+ A/**Custom Code*/5 r" j& `$ A S/ ]+ k) i2 m
treenode item = parnode(1);
: d' V2 S8 K# z& {+ R% Ptreenode current = ownerobject(c);
! @7 ^7 _7 ]8 \: }! r0 O1 B5 ltreenode source=node("/source",model());& E+ P" U$ f0 d/ L
int port = parval(2);
0 }, J& h2 w4 S1 P0 ~if(
3 z& K* q( L/ [# k8 w _ content(current)<5
B7 Q0 x/ H( I: T, F)
F" f d& K4 ]- q' M+ tsendmessage(source,current,2,0,0);
$ R3 r5 A1 R' n) m' z, Zreturn 5;
5 Q4 U$ b+ \& T# r" i9 q; L第三步:) T/ l5 l* C) T: j/ ]
# U( I+ G- O% ]* Y4 v
/**Custom Code*/" m2 c/ |7 W7 _/ K
treenode current = ownerobject(c);
/ q4 J( g2 W! g0 u1 g, C! G$ Bunsingned int uservalue=(unsigned int) msgparam(1);3 p! n" o+ u, q9 P. R
switch(uservalue){
5 ^: Q8 S/ a5 v5 G! V+ M- k( } case 1:closeoutput(current);break;' ^8 Y( c6 y$ T4 I+ O T0 \& k
case 2 penoutput(current);break;$ P0 H {- t% L1 t
}
5 d$ M6 [, y8 R7 o最后系统报错是第三步,说是没有定义uservalue:7 W+ _% J% `) U5 W4 u
; W, @" `: i3 g* x: u6 M/ z
line 3 unknown variable "unsingned"; t. H* Q$ p* G% M
+ ]0 s% @9 }$ W( y+ P, r, Hline 3 syntax error, unexpected type identifier, expecting ';'# E( c) T4 T7 B
Could not finish parsing because of previous errors.0 Z9 V1 ^7 v( I4 V1 U+ p' Z
S! ]% _% n7 [" R* U: r' F
请问各位大大这是怎么一回事.... |
|