遇到一个问题,希望大家帮助!!!
窗口1 w_1 传递一个结构给w_2,执行后,在w_2的代码中提示,无法将w_1的结构传递给w_2中的结构,
w_1 代码
string kx1,kx2,kx3,kx4
kx1=dw_1.getItemString(dw_1.getrow(),"sysID")
kx2=dw_1.getItemString(dw_1.getrow(),"Chund")
kx3=dw_1.getItemString(dw_1.getrow(),"vsz")
kx4=dw_1.getItemString(dw_1.getrow(),"msz")
postinfo ChundInfo
hundinfo.sysID=kx1
hundinfo.Chund=kx2
hundinfo.vsz=kx3
hundinfo.msz=kx4
openWithParm(w_2,ChundInfo)
w_2 代码
postinfo ChundInfo
string Rkx1
string Rkx2
string Rkx3
string Rkx4
ChundInfo=message.PowerObjectParm
俩个窗口中 postinfo 结构中变量
string Rkx1
string Rkx2
string Rkx3
string Rkx4
问题点数:20、回复次数:6Top
1 楼Paladin_china(大仙)回复于 2006-08-01 23:05:15 得分 0
我试过可以的阿,你申明结构后就可以从message.powerobjectParm得到值了
Top
2 楼red_hotdog(天堂之鸟)回复于 2006-08-01 23:19:23 得分 0
执行的时候提示如下:
Application terminated.
Error:cannot assign object of type postinfo to variable of type postinfo at line 6 in open event of object w_2.
急!!!,谢谢大家了!!!Top
3 楼lywei(成人达己,成己达人)回复于 2006-08-02 09:36:11 得分 0
postinfo 应该定义一个全局的结构,绝对没有问题Top
4 楼mow1983(记吃不记打)回复于 2006-08-02 10:05:44 得分 0
对postinfo应该是全局变量,然后在W_1,w_2中都用他的一个实例就可以了Top
5 楼dawugui(潇洒老乌龟)回复于 2006-08-02 10:26:53 得分 0
0002 -- 窗口之间传递参数
http://www.51pb.com/viewthread.php?tid=697&extra=page%3D7
Top
6 楼red_hotdog(天堂之鸟)回复于 2006-08-02 14:11:40 得分 0
问题解决了,谢谢大家!!!Top




