Oracle Forms 6 或更高版本中是否有反映?
Oracle Forms 6 或更高版本中是否有反映?
是否可以枚举标签或其他元素?
IS there reflection in Oracle Forms 6 or later?
Is it possible to enumarate labels or other elements?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Forms 是一种古老而古老的编程语言,它不支持完整的反射、Java 风格。然而,它确实有 GET 和 SET 函数的补充,使我们能够查询和操作表单的元数据。
因此,我们可以单步执行块中的项目,并使用 GET_ITEM_PROPERTY 获取它们的标签,如下所示(示例改编自文档):
您可以使用 SET_ITEM_PROPERTY 更改当前项目的标签。
注意:LABEL 是一个仅适用于某些项目(按钮、复选框等)的属性,因此您可能需要包含项目类型的测试,并且可能会获取 PROMPT_TEXT(如果合适)。
我们可以通过多种方法动态更改表单的外观和行为。表单生成器参考涵盖了所有内置功能,因此没有必要在这里重述。 了解更多信息。
Forms is an old and venerable programming language, and it doesn't support full-on reflection, Java style. However, it does have a complement of GET and SET functions which enable us to interrogate and manipulate a Form's metadata.
So we can step through the items of a block and get their labels using GET_ITEM_PROPERTY like this (example adapted from the documentation):
You could change the LABEL of the current item using SET_ITEM_PROPERTY.
Note: LABEL is a property which only applies to certain items (buttons, checkboxes, etc) so you might what to include a test for the item type and perhaps grab the PROMPT_TEXT instead, if that's appropriate.
There are loads of ways we can change the appearance and behaviour of a Form on the fly. The Form Builder Reference covers all the built-ins, so there's no point in recapitulating it here. Find out more.