|
第一步:$ `% t( y$ i4 F8 ~) f2 w2 h0 b
treenode item = parnode(1);5 C; H6 z G6 c
treenode current = ownerobject(c);: r+ c& W; ^* B7 V" v' {6 x P
treenode source=node("/source",model());
2 R+ h+ p0 F+ a. Hint port = parval(2);1 b1 X! T1 t* T* L( |% d1 l
if(
; q( s$ M3 u+ L% u content(current)>=20 Y* |) e6 }( c7 \9 M0 _
)
# W {9 g4 O( F2 a# U& xsendmessage(source,current,1,0,0);# l7 S+ E* T: m) R) k
return 1;
) P! u/ N& o7 M/ K+ ^, v+ F1 M9 t9 n第二步:
( J' s' `6 @0 e- F5 o/**Custom Code*/6 {: j, W; n/ o* @5 ?( u* R4 ?
treenode item = parnode(1);
, v; G* U, a s/ ktreenode current = ownerobject(c);
3 _+ a; q" Z- F% A. f% [treenode source=node("/source",model());0 `6 @. D# w0 {/ [% _/ H
int port = parval(2);' Q W# `' j: r/ X
if() z0 p* |4 b7 w2 m1 W) ~. Z
content(current)<5
" m( N+ `; Q+ q6 c)
7 ^( I% V' B @2 l' Q. j; g: ?' Rsendmessage(source,current,2,0,0);
" v9 a* J) {) T6 v6 j: [return 5;
$ |0 q) f- T* u7 X9 d0 \1 `第三步:; d, @- _0 s1 v
, N4 ~; v1 c. z: ^& z
/**Custom Code*/
% s$ y) S5 _& ^( {! [* atreenode current = ownerobject(c);2 ]. [! S& r% g) S3 h7 u
unsingned int uservalue=(unsigned int) msgparam(1);
0 o8 L0 E# Q" n) Jswitch(uservalue){
' T3 x s/ ~3 E) [, M2 h* ]' s% c case 1:closeoutput(current);break;- d1 ?5 K& t$ v# [- U7 v2 v$ ?
case 2 penoutput(current);break;
: Q+ M& ] t" m4 |2 L& A}4 t& U" _* p2 N- j- \& \. ^3 v$ l' h
最后系统报错是第三步,说是没有定义uservalue:
: ^# m( l- Z# j* ^5 U' L$ t
& A0 E; S! g9 I) h7 s7 |3 rline 3 unknown variable "unsingned"% U% S, v& g* _% G+ U8 P( }+ W+ ~
/ y( P# m/ L9 Z9 Oline 3 syntax error, unexpected type identifier, expecting ';'7 Q5 R7 D+ E% P& V: A0 P
Could not finish parsing because of previous errors.( @4 c+ V5 B' M3 Z4 c& E
4 J9 G- M% |' O+ H请问各位大大这是怎么一回事.... |
|