请教

liujiaqiang 2003-07-10 08:55:12
如何从DATAWINDOW某一BAND找出所有的OBJ_TYPE类型的所有对象,将结果存放到 OBJ_LIST[]中
...全文
30 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
klbt 2003-07-10
  • 打赏
  • 举报
回复
赞成楼上意见。

dw_arg.Describe("datawindow.objects")是dw_arg的所有对象名大全,用~t分隔。

要根据对象的类型、对象所在的band循环判断,逐个加入到数组中。
runsoft 2003-07-10
  • 打赏
  • 举报
回复
string obj_string, obj_holder
int obj_count, start_pos=1, tab_pos, count = 0

obj_string = dw_arg.Describe("datawindow.objects")

tab_pos = Pos(obj_string,"~t",start_pos)
DO WHILE tab_pos > 0
obj_holder = Mid(obj_string,start_pos,(tab_pos - start_pos))
IF (dw_arg.Describe(obj_holder+".type") = obj_type or obj_type = "*") AND &
(dw_arg.Describe(obj_holder+".band") = band or band = "*") THEN
count = count + 1
obj_list[count] = obj_holder
// messagebox("object",obj_list[count])
END IF
start_pos = tab_pos + 1
tab_pos = Pos(obj_string,"~t",start_pos)
LOOP
obj_holder = Mid(obj_string,start_pos,Len(obj_string))
IF (dw_arg.Describe(obj_holder+".type") = obj_type or obj_type = "*") AND &
(dw_arg.Describe(obj_holder+".band") = band or band = "*") THEN
count = count + 1
obj_list[count] = obj_holder
// messagebox("object",obj_list[count])
END IF

Return count

1,075

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧