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 07 JUN 2000 06:03:32PM Ray Chan wrote:

To all,

I'm sure this is simple and I'm missing something. I want to run a

stored procedure from the System Editor (e.g., Run BLIST).

The procedure will call a Form that I can enter data into. I have tried Create_Dialog and and Dialog_Box. When I do, the form does not run. Instead I get the message:

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

Now I know that you can run stored procedure from the System Editor, but at the moment, I don't know how to execute a form.

I have also talked with RTI tech support, but if someone has the answer before then would appreciate it.

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 07 JUN 2000 07:15PM Don Bakke wrote:

Ray,

Run your procedure from the System Monitor instead and your routine will be within an event-context. This is necessary for certain OI routines to function properly. Alternatively you could create a very simple test window with a single button that launches your routines for you. In fact, the test button could launch a default stored procedure which in turn launches the current routine you are working on. That way you only have to change the code in the System Editor to get your window to launch a new routine.

dbakke@srpcs.com

SRP Computer Solutions


At 08 JUN 2000 11:50AM rayc@symmetryinfo.com wrote:

Don,

I posted a response to MikeR also. I did run it from the System Monitor. I should have mentioned this. Nothing happened. Could my syntax for calling Create_Dialog or Dialog_Box be wrong? The reason you see Create_Dialog and Dialog_Box is because I'm just experimenting here.

OwnerWindow=' ; Mode=' ; Initparms='

rtnData = Create_Dialog("BLIST",OwnerWindow,Mode,InitParms)

rtnData = Dialog_Box("BLIST",OwnerWindow,InitParms)

I see the merit of your suggestion. But meanwhile, if I should be able to run it from the System Monitor, then I am most curious as to why I can't.

A curious but tired student,

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 09 JUN 2000 09:08PM Cameron Revelation wrote:

Dialog_Box and Create_Dialog assume that they have a parent OI window creating them. (System Editor does not qualify ;-)

It sounds like you are trying to do some utilities that you can run from the command line, kind of like the command windows in Arev. Just create a command window and put the necessary input fields on it to collect the information you want and then use a program like this to call it:

<code>
function test_util(p1, p2)

declare function   get_Property, isEventContext
declare subroutine set_Property, Start_Window, MessageBeep, Send_Event

$insert Logical

Ret=FALSE$

if isEventContext() and @window=TEST_UTIL" then
 * process form instruction
  on p1 gosub Create, Submit
end else
 * launch window only if sufficient information wasn't passed
  if p1=" or p2=" then
    gosub Launch
  end else
    gosub Process
  end
end

return Ret


* launch window
Launch:
  Param=p1: @fm: p2
  Start_Window("TEST_UTIL", "", Param)
return


* window CREATE event
Create:
  set_Property(@window: ".E_PARAM1", "TEXT", p2)
  set_Property(@window: ".E_PARAM2", "TEXT", p2)
return


* form SUBMIT event
Submit:
  p1=get_Property(@window: ".E_PARAM1", "TEXT")
  p2=get_Property(@window: ".E_PARAM2", "TEXT")
  gosub Process
  Send_Event(@window, "CLOSE")
return


* actually do the utility thing
Process:
  MessageBeep(0)
return

</code>

In other words, if there isn't enough info passed, it will call the window and let you fill it in then do the processing work.

Cameron Purdy

Revelation Software


At 11 JUN 2000 04:21PM rayc@symmetryinfo.com wrote:

Cam,

Thanks for your response. Your sophisticated and insightful presence is missed in this forum. I shall review your code and try to incorporate some of your ideas.

My effort in doing this "project" was to try duplicate in OI the BLIST that many AREV developers love and find lacking in OI. By chance, does the Great "Iron Code Coder", aka Cam Purdy, or someone else at RTI ever plan on making BLIST available under OI as a new feature in an upcoming OI release. This would make debugging and restructuring complex procedures and event handler easier. I'm sure that many would appreciate such a feature……. If you need the basic BLIST code to work from, I (or others, e.g., Don Miller) could e-mail you this code. (This will teach you for not visiting more often.)

Also, in your code, you had a SUBMIT event. Isn't the SUBMIT event used only in the context of the internet, Web…That sort of stuff.

Thanks so much. Enjoy the rest of your weekend.

Ray

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 11 JUN 2000 06:10PM Cameron Revelation wrote:

Hi Ray,

Your sophisticated and insightful presence is missed in this forum.

Hey, I'm still around … it's just that you guys answer all of the questions before I get a chance to ;-)

I've written a couple of OI command line utilities, so I thought I'd share some pointers. The technical problem is that something run from the System Editor is using REVCAPI so it cannot start windows etc. because PS can't talk to the engine until the System Editor is done which means that your program has stopped running by that time. So Start_Window is a special exception, because it actually queues up that request, and the window starts (and CREATE runs etc.) after the calling program (launched from System Editor) terminates. So you can't call it like a dialog box, but you can build something like what I showed you:

1) A utility program that can accept arguments directly and will not pop up a window (like doing a PERFORM COPY in Arev with all the arguments passed)

2) The same program pops up a window if it needs more data (like doing a PERFORM COPY in Arev without all the arguments passed)

3) The same program can handle the events for that same window

My effort in doing this "project" was to try duplicate in OI the BLIST that many AREV developers love and find lacking in OI.

I always hated blist in Arev. A coding friend, David Buck, wrote FList or something like that for me to replace it. I'm not sure what the F stood for. Any takers?

in your code, you had a SUBMIT event. Isn't the SUBMIT event used only in the context of the internet, Web…That sort of stuff.

I didn't mean the SUBMIT event, I meant the general concept of the form submitting the request, which in my case happened from the OK button's CLICK event. Sorry for the confusion.

Cameron Purdy

Revelation Software


At 12 JUN 2000 12:56PM rayc@symmetryinfo.com wrote:

Cam,

I always hated blist in Arev. A coding friend, David Buck, wrote FList or something like that for me to replace it.

Blist isn't perfect, but it's certainly better than what is standard with OI.

I'm not sure what the F stood for. Any takers?

I think F=Free. I've been hacking at some code that Don Miller pass along. This NewBlist was used in AREV and does have some features that I like, such as being able to print a range of lines. However, maybe you should also make Flist available .

I didn't mean the SUBMIT event, I meant the general concept of the form submitting the request, which in my case happened from the OK button's CLICK event.

See when the Iron Code Cutter says SUBMIT, us ordinary mortals are thinking "The wizard has spoken. let it be SUBMIT."

Sorry for the confusion.

No problem. I guess we should always keep in the mind that only the pope is infallible and even then only on certain subjects.

Tally ho, and again appreciate your expert help.

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/2accd8f1d860e640852568f700792c67.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1