Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Weird Popup issue

Hola all,

A new client is Not using promoted events or even commuter modules. I have expressed my thoughts, but the customer is always right..

I have a popup that runs fine from the UI workspace. I am stuffing the key list (it's a K type), and it runs fine from a standalone program. But calling the code from a pushbutton on a form causes the popup not to display, thus returning nada.

The code in question is something like this:

prec = ''; prec<8> = mvkeys
ans = popup(@window,prec,'POPUPNAME')

and then I do something with the contents of ans. Pretty basic stuff, and I've done this Many times, but it's not displaying in this case.

Any ideas what might cause it not to fire? Hopefully something stupid.

Gratzi!

Comments

  • I think this could be a few things. What is the content of the mvkeys variable or what delimiter are you using? If you pass in a single value, does the popup work?
  • mvkeys contains an @vm list of record keys. I've coded the popup call to only happen if it's MV. The popup displays fine if I call from UI or from a stand-alone program.

    I wasn't sure if it could be something in the event chain of the button that was the issue. But I created another test window with a button and called the popup from the Click event and it displays fine. It seems to work everywhere but This One Button.
  • All things being equal, I am guessing an error condition is occurring prior to the Popup being called. Have you checked Status() or Get_Status() or at least attempted to clear all errors just before calling Popup?
  • Checked Status() in all the scenarios. It's always 0.

    What else should I check? The only time it Doesn't work is when called from one button on one form.
  • Is the form you're calling from a dialog_box?
  • I ask because you can't successfully call dialog boxes from other dialog boxes and a popup is just a dialog box with another name.
  • Hmm the plot thickens.. if I call a msg before the popup, the popup appears with no problem.

    I wonder what's being un/set by the msg.
  • Nope, just a regular databound form.

    I called a msg with a type of 'N' (no display) before calling Popup. It works like a charm now.

    Like I said, weird..
  • Does a regular Msg appear as well?
  • I'm also wondering if this issue is relevant to the problem you are experiencing.
Sign In or Register to comment.