Question Question about window app

Hi everyone,

Recently i'm working on a window app that run at starting a procedure name local-initialize.
In this procedure I cut a character value that is an input parameter of my app i call it "runinput".

i do something like this:

DO FOR k = 1 TO NUM-ENTRIES(runinput):
    when 1 then do:
        FILL-IN1:screen-value = entry(k,runinput).
    when 2 then do:
        FILL-IN2:screen-value = entry(k,runinput)
    when 3 then do:
        FILL-IN3:screen-value = entry(k,runinput)
this is all I do.

And somehow after the end of this procedure I have some "phantom" LEAVE trigger on my FILL-IN3 . I don't trigger it manualy.

Do you have an idea of why ?

Best Regards,

- Vivien -


New Member
I suppose that you are only showing part of your code. In my opinion it is unlikely that this code triggers the LEAVE.
What I would do is put a
directly after the code you are showing and a different one in your LEAVE trigger.
That is only a starting point to localize the problem.
I can't show you all the code because there is an encrypted include file in the MAIN-BLOCK section. And so I don't have access to it.

I did try it. The trigger used before the leave on the FILL-IN is a "CHOOSE" and it's a progress type event not a widget...
So I don't know what can I do beside restart my project from scratch


Perhaps you could explain what a "phantom leave trigger" is and why you think you are suffering from it.
For me it's a "phantom" trigger becaus I don't trigger it manually with "APPLY 'LEAVE':U TO FILL-IN3" like I would do if need it to go there when doing the initialize procedure. And so I don't understand why he is being triggered.

But in same time I change some of my code to make it run like this.

I just wanna know if there is code runned besides all the code I can read when openning the *.w file with the text editor and the include inside the program ?

I think I didn't my question in the right way at first.



So "phantom" means that you did not code it.

How is it that you think that you know that a LEAVE trigger that you did not code is running? What is your evidence for that assertion?

Lots of code that you didn't write can potentially be running for various reasons. The contents of an encrypted include file _could_ certainly be the source for something like that but it's awfully hard to know if that is relevant with the current paucity of information available.

What I do not see from you at this point is any reason to think that extra code is running. You have made an assertion that a LEAVE trigger runs but provided no evidence to support your claim.

I believe your claim that something that you do not understand is happening. I have no basis for believing that it has anything to do with a LEAVE trigger or any other code. Especially since I do not even know what "it" is that is happening.
Exactly Tom. I know it is running because the app prompt a message box that is only write in this "LEAVE" trigger . So I know it is runing.
And I only need this message de appear if user get in the FILL-IN write something or not and leave the FILL-IN. Not at the initialization time.


Are you able to active the debug alert? Since you already get the message from the leave trigger you can look at the stack trace and hopefully see where it was triggered from.


Turning on debug alert is an excellent suggestion.

You could also turn on 4gltrace in the log manager handle.

If you are writing stuff to screen-value there is a UI widget that somehow or other got instantiated. In your case there are at least 3 such widgets. I would start by looking into the code that creates those widgets and sets them up to understand where how potential LEAVE trigger got associated with them.

FWIW -- LEAVE triggers are not very useful. Historically the biggest problem I have had with them has been NOT firing as expected rather than firing when I don't want them ;)