Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 01 JUN 1999 11:39:56PM Giles Wycherley wrote:

I have a relatively simple question, is it possible to execute a popup from a stored procedure, and not from an event?

I have a stored procedure that is called via an automation server in Windows and it needs to call a popup. I have been using the Repository function, but the problem is that I get the message

'The stored procedure can be executed in event-context only.'

Does anybody know how to get around this?


At 02 JUN 1999 07:23AM Cameron Revelation wrote:

Giles,

The problem is that you are running it from the command line in the System Editor. If your stored procedure were called from an OpenInsight form, it would work.

Cameron Purdy

Revelation Software


At 02 JUN 1999 11:21AM [email protected] - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:

You could run it from the system monitor, which is in event context.

As for your real question, well, this is all theoretical, but if you feel like spending enough time working on it, you should be able to accomplish something.

If I create a small program that does nothing but execute a start_window and run it from the exec line, I'll get a message saying the program must be entered in event context. However, when the program completes and returns, the window will run.

Now, one could have a program that calls a generic window with a create param containing a program name and parameter list. When the create event of this generic window finally is run, it will call the program and params passed to it in it's create event, which should now all be running in PS context.

To run a program based on a variable name, you use the @var notation

ProgramName=MY_PROGRAM'

Call @ProgramName(p1, p2, ….)

For a function, you would

ReturnValue=Function (@ProgramName (p1, p2, …))

Only problem remaining is removing the event context message. We can solve this by placing setting status to 0 right after the start_window line.

Of course you realize this is completely unsupported and you're using at your own risk.

[email protected]

Sprezzatura Group

www.sprezzatura.com_zz.jpg


At 02 JUN 1999 11:20PM Giles Wycherley wrote:

Cameron,

I understand that the message is due to the popup not being executed from a form, but I was wondering was whether there was anyway of executing a popup without doing it from a form.

I tried the method in the post above, but it seems a bit haphazard.

Giles


At 03 JUN 1999 05:38AM Oystein Reigem wrote:

Giles,

Aaron says if he from the Exec line runs a program that executes a Start_Window he gets a "must be entered in event context" message. Well, I don't. With Dialog_Box, yes. And with a popup. But I had no problem with getting the popup up via a window started with Start_Window.

But I guess what is not 100% trivial is how to return the value the user selects from the popup. The procedure that starts the window doesn't wait like it would after calling a dialog box or popup.

- Oystein -


At 03 JUN 1999 08:09AM Cameron Revelation wrote:

Giles,

To display a dialog box, you have to have an OpenInsight window for a parent. The POPUP is a dialog box.

Furthermore, many of the necessary communications between OpenEngine (BASIC+) and OpenInsight (windows) can only occur when OpenInsight has first called OpenEngine; this is called "event context" because the engine is processing an event.

What type of program are you creating that must be run from the System Editor and needs to call a Popup? If we knew what you were working on, we could offer more relevant suggestions than "you cannot do that" ;-)

Cameron Purdy

Revelation Software

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/96ead1fbbfb4f0e385256784001422db.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1