如何逃避更新消息? [英] How to escape from an update message?

查看:52
本文介绍了如何逃避更新消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Progress-4GL 中有以下消息:

DEF VAR L-temp 作为字符.MESSAGE给我信息"更新 L-temp.

这显示了一条更新消息,这很好,但是当我试图逃避该消息时(例如,我意识到我点击了错误的按钮,启动了此消息),我无法隐藏该消息:

我该如何解决这个问题(我只是想从屏幕上删除消息)?我无法添加 VIEW-AS ALERT-BOX,因为警报框只能更新逻辑变量和字段.或者对于这种情况是否有一个简单的 Show-Dialogbox() ?

编辑
我尝试用 SET 替换 UPDATE 并将整个内容视为警报框,但这似乎是不允许的(似乎只允许逻辑变量和字段).

编辑 2
尝试使用 PROMPT-FOR 不是一个好主意,因为这似乎隐藏了窗口的其余部分,而我希望消息显示为某种弹出窗口窗口/框架.

编辑 3
另外 System-Dialog 似乎不是一个好主意,因为我想要的只是获得一个简单的字符串.

解决方案

有点遗憾的是关闭窗口"按钮默认情况下不会关闭窗口.即使将框架定义为模态 dialog-boxwindow-close 事件也需要重新路由到 close.

定义帧frupdatecinfo 作为字符标签给我信息";带侧标和标题消息更新"视同对话框.在关闭窗口"上帧 frupdate应用关闭"框架frupdate.使用框架 frupdate 启用所有功能.等待帧 frupdate 的关闭.

I have following message in Progress-4GL:

DEF VAR L-temp AS CHARACTER.
MESSAGE "Give me information" UPDATE L-temp.

This shows an update message, which is fine, but when I try to escape from that message (e.g. I realise that I have clicked on the wrong button, launching this message), I can't hide that message:

How can I solve this (I simply want to remove the message from screen)?I can't add VIEW-AS ALERT-BOX as alert-boxes only can update logical variables and fields. Or is there a simple Show-Dialogbox() for such a case?

Edit
I tried replacing UPDATE by SET and viewing the whole thing as an alert-box, but this seems not to be allowed up (only logical variables and fields seem to be allowed).

Edit 2
Trying with PROMPT-FOR was not a good idea, because this seems to hide the rest of the window, while I want the message to be shown as some kind of a popup in top of the rest of my window/frame.

Edit 3
Also System-Dialog seems not to be a good idea, because all I want is to get a simple string.

解决方案

It's a bit unfortunate that the 'close window' button does not by default, close the window. Even when a frame is defined as a modal dialog-box, the window-close event needs to be rerouted to close.

define frame frupdate
   cinfo as char label "Give me information" with side-labels
   with
      title "Message Update"
      view-as dialog-box      
   .

on "window-close" of frame frupdate 
   apply "close" to frame frupdate.
   
enable all with frame frupdate.
wait-for close of frame frupdate.

这篇关于如何逃避更新消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆