如何避免AppBuilder删除代码段 [英] How to avoid AppBuilder removing pieces of code

查看:74
本文介绍了如何避免AppBuilder删除代码段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发基于AppBuilder 11.6版的Progress-4GL编程环境.

I'm working on a Progress-4GL programming environment, based on AppBuilder release 11.6.

直到现在,我一直在更改现有的* .w和* .p文件,但现在我想从头开始创建* .w文件.

Until now I've been changing already existing *.w and *.p files, but now I wanted to created my *.w file from scratch.

我创建了一个窗口,并放置了一个浏览器,一个填写字段和一个按钮.现在,我想向该按钮添加一个事件.为此,我在* .w文件中添加了以下几行:

I've created a window and I've put a browse, a fill-in field and a button. Now I would like to add an event to that button. In order to do that, I add following lines to the *.w file:

ON CHOOSE OF btn-Start_Query IN FRAME DEFAULT-FRAME
DO:
    MESSAGE "button is pushed" VIEW-AS ALERT-BOX.
END.

但是,当我保存* .w文件时,请在AppBuilder中将其重新打开并再次保存到该文件中,这些代码行将被删除.

However, when I save the *.w file, re-open it in the AppBuilder and save the file there again, those lines of code get removed.

我已经知道,为了避免这种情况,我需要包装"包裹.这些行由 Scoped-define Analyze:suspend/resume 行组成,如下所示:

I've already understood that, in order to avoid this, I need to "wrap" those lines of code by Scoped-define or Analyze:suspend/resume lines, something like this:

&Scoped-define SELF-NAME btn-Start_Query
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn-Start_Query C-Win
ON CHOOSE OF btn-Start_Query IN FRAME DEFAULT-FRAME
DO:
    MESSAGE "button is pushed" VIEW-AS ALERT-BOX.
END.
&ANALYZE-RESUME

但是,这似乎不起作用.

However, this seems not to be working.

您能解释一下我为避免我的代码行被删除必须做些什么吗?

Can you explain me what exactly I have to do in order avoid my lines of code to be removed?

顺便说一句:我知道我正在使用非常过时的技术,但是我在这里只工作了两个星期,所以我无权强迫我的老板改变我的开发环境.

By the way: I know that I'm working with extremely outdated technology, but I only work here for two weeks, so I don't have the authority to force my boss to change his development environment, just for me.

推荐答案

推荐的方法是使用AppBuilder的向导为您创建具有所需AppBuilder标记的触发块.

The recommended approach is to use the Wizards of the AppBuilder to create the trigger block with the required AppBuilder markup for you.

  • 将按钮添加到窗口
  • 选择设计画布上的按钮
  • 选择编辑代码"AppBuilder主窗口中的按钮(铅笔)

这将创建一个空的默认触发器块(如果有按钮,则为CHOOSE).要创建其他事件,请使用新建..."按钮在部分编辑器窗口中.

This will create an empty default trigger block (in case of a button, that's the CHOOSE). To create a different event, use the "New..." button in the section editor window.

这篇关于如何避免AppBuilder删除代码段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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