为什么程序会出现这种错误?

ukyohy 2002-07-07 03:39:36
偶在mdi窗体中用opensheet(iswindow,ls_windows,....)
打开一个窗体w_secmain
打开之后,在w_secmain,引用w-secmain.控件名称,竟然说无效的对象引用,把前面的窗口名称去掉,就ok了,可是在别的窗体之内也出现同样的错误,该怎么办呢?
...全文
35 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ukyohy 2002-07-08
  • 打赏
  • 举报
回复
这位大哥英语好好啊,我试了一下,is windows是在mdi窗体中声明的实例变量,在打开的别的窗体中引用的话是不可以的啊,为什么呢?我已经通过别的方法解决了上面的那个问题,但是我一直不明白为什么会出现这个情况啊,还请高手多多指点。
xjbs 2002-07-07
  • 打赏
  • 举报
回复
A sheet is a document window that is contained within an MDI frame window. MDI applications allow several sheets to be open at the same time. The newly opened sheet becomes the active sheet. If the opened sheet has an associated menu, that menu becomes the menu at the top of the frame.

When you specify windowtype, the window object specified in windowtype must be the same data type as sheetrefvar (a data type includes data types inherited from it). The data type of sheetrefvar is usually window, from which all windows are inherited, but it can be any ancestor of windowtype. If it is not the same type, an execution error will occur.

PowerBuilder doesn't automatically copy objects that are dynamically referenced (through string variables) into your executable. To include the window object specified in windowtype in your application, list it in the resource (PBR) file that you use when you build the executable.

For more information about PBR files for an executable, see the PowerBuilder User's Guide.

OpenSheet opens a sheet and appends its name to the item on the menu bar specified in position. If position is 0 or greater than the number of items on the menu bar, PowerBuilder appends the name of the sheet to the next-to-last menu item in the menu bar. In most MDI applications, the next-to-last menu item on the menu bar is the Window menu, which contains options for arranging sheets, as well as the list of open sheets.

If the sheets don't appear on the menu PowerBuilder can't append the sheets to a menu that doesn't have any other menu selections. Make sure that the menu you specify or, if you leave out position, the next-to-last menu has at least one other item.

If more than nine sheets are open in the frame, the first nine are listed on the menu specified by position and a final item More Windows is added.

Sheets in a frame cannot be made invisible. When you open a sheet, the value of the Visible property is ignored. Changing the Visible property when the window is already open has no effect.

Opening response windows Do not use the OpenSheet function to open a response window.
hjd_cw 2002-07-07
  • 打赏
  • 举报
回复
你其实打开的是w_secmain的一个实例:iswindow,对吗?
如果是这样,你在脚本里应该引用 iswindow.控件.属性!

1,075

社区成员

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

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