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

Promoted Create event

Hola all,

I'm hoping this is something really simple and stupid that I've been overlooking. I have a promoted event handler, basically a shell that calls an event driver that actually handles the events. The shell is installed into Sysreposeventexes for the following records/events:

@dbid:'*..OIWIN*'
@dbid:'*CREATE.WINDOW.OIWIN*'
@dbid:'*READ.WINDOW.OIWIN*'
@dbid:'*WRITE.WINDOW.OIWIN*'
@dbid:'*CLEAR.WINDOW.OIWIN*'
@dbid:'*CLOSE.WINDOW.OIWIN*'
@dbid:'*POSCHANGED.EDITTABLE.OIWIN*'

The event driver then handles any generic window behavior and calls the commuter module for the form and event.

All of these work fine and are called automagically Except the Create event. Currently it will not execute unless I include a quickevent on the Create event. The quickevent is just the usual SYSPROG*STPROCEXE**OBJ_CALL_EVENT.

Any ideas what I've missed? It would be nice if this worked automagically too.

Humbled,

Michael

Comments

  • Is the CREATE event enforced?
  • At the risk of seeming really stupid, what do you mean by "enforced"? Is this something in addition to writing the shell object code to Sysreposeventexes?

    If so, is that unique to the Create event? All the other events work fine.

    Is there a way to enforce the event programmatically? I have a handy install routine that updates Sysreposeventexes.

    Humbled again,

    Michael
  • No worries. I always assume that anybody who has dabbled into Promoted Events is familiar with the documentation since this is arguably an advanced topic. It's a setting in the Event Designer. Look for "Enforce" in our white paper.
  • Also, it is not unique to any event. Each event can be enforced or not, but some are enforced by default. This might not be your issue, but it is what I would look at first.
  • Curious.. Which events are enforced by default? I'm assuming that Create isn't one of them.

    Is there any way to set the Enforced setting programmatically? I'd like to include in my install pgm if so.

    Thanks!
  • I don't have a list. You would have to install a fresh copy of OI and use the Event Designer or inspect the CFG_EVENTS record to confirm. But, this is missing the point. You can't programmatically set this and have it benefit you in the same session. OI loads this information when it is launched and you have to restart OI for any changes to be noticed.
  • I figured I'd have to restart OI; I wasn't thinking to have it work in the same session.

    Thanks for the guidance!
  • You do understand that all this flag does is allow your forms to acknowledge your promoted events when they are being compiled? It does not magically trigger a promoted event if the form was never aware of it to begin with.
  • Yes sir.. and you were spot on. I went into Eventdesigner and enforced the Create event and restarted OI. I then took off the quickevent and the Create event is still called when the window is called. Success!

    Thanks!
Sign In or Register to comment.