OI 10 - promoted events (OpenInsight 64-bit)
At 03 MAY 2021 09:52:58PM James Birnie wrote:
Hi everyone
We've just started converting our base application to OI 10 to see how it looks - quite a bit of good stuff but of course we've also come across a few issues. I'll do seperate posts, as we work though them, initially starting with control-based promoted events
We have various promoted events, both for form and control based events. The subroutines came across fine, however I noticed the control-based event settings (EVENTDESIGNER form in OI 9.x) didn't come across, and appear to be the default values. I can see the new control types, but is it ok to copy across the relevant rows for each control type from our 9.x account (also I noticed RADIOBUTTON has become RADIOGROUP)?
After this, what is the best way to recompile all the forms. The old 9.x trick of moving a control 1 pixel left then right then running the form in the designer doesn't result in a recompile anymore.
With regard to the control based e.g. edittable promoted events - this is not working for popups. Popups are breaking for us as when the POPUP_EVENTS subroutine (which I don't have code for) brings up a message along the lines of "Invalid Method "GOTFOCUS" passed to POPUP_EVENTS procedure". It does this for each event e.g. POSCHANGED, LOSTFOCUS - could this MSG be commented out perhaps? I'm guessing it's just there for debugging.
TIA
At 04 MAY 2021 08:49AM Carl Pates wrote:
Hi James,
1) You should be able to copy over CFG_EVENTS from your v9 system into the v10 one. The v10 will "protect" the ones it cares about and use your other custom settings otherwise. Give it a try and let me know.
2) "RadioButton" controls, as far as the PS is concerned (in v9 and v10), are actually RADIOGROUP controls - a radio button is an individual button that the RadioGroup manages. The terminology used in the tools should still say "Radio Button" though.
3) Recompile - the save code is tied to a old→new comparison rather than a "modified" flag, so try something simple like adding a space in the repository description field? You can also issue a repository command at the system monitor like so:
repository compile myapp*oiwin**myform4) I'm not sure why POPUP_EVENTS is triggering that error - what is happening in your promoted code? For example the POPUP form doesn't have any GOTFOCUS quick events that would call the POPUP_EVENTS commuter module, so I don't know how it's getting there?
Regards
Carl
At 04 MAY 2021 07:53PM James Birnie wrote:
Hi Carl
Thanks for the reply.
1. Ok great, thanks.
2. I was talking about SYSENV.CFG_EVENTS record - in OI 10 there is a RADIOGROUP control within this, in OI 9 this isn't there, but there is one called RADIOBUTTON. No biggie.
3. Ok cool.
4. The promoted code automatically calls the <windowname>_EVENTS so my guess is that within POPUP_EVENTS there is a default case which shows a MSG if there isn't a case statement to match?
p.s. I just recompiled and installed our COM .NET library as 64 bit - worked like a charm. Good work.
At 04 MAY 2021 11:13PM James Birnie wrote:
re: 4. I excluded the POPUP window from our PROMOTED_EVENTS routine, so it's functioning fine now except that after the popup is displayed and a value gets returned → field updated, record gets READ etc, I see a dialog saying "No options are available". I'm guessing no-one else is seeing this?
I'll follow through the events in the next day.
At 05 MAY 2021 01:09AM James Birnie wrote:
re: The "No options are available" dialog, I thought this might have been because we use a single routine to populate the popup value then move to the next field, impersonating all the relevant events, but this isn't related.
For me, this msg dialog just appears after the popup closes, even if I just cancel it.
At 05 MAY 2021 04:13AM Carl Pates wrote:
Hi James,
2) OK - RADIOGROUP is the "real" name for a RADIOBUTTON - guess the old dialog translated that. Just checking - you did find the new dialog in the Tools/Form Designer menu yes?
4) Yes (from POPUP_EVENTS):
locate method in "CLICK,CLOSE,CREATE,DBLCLK,INACTIVATED,MENU,RETRIEVE,ROWSELCHANGED,SIZE,SORTED" using "," setting pos then on pos goSub onClick,onClose,onCreate,onDblClk,onInactivated,onMenu,onRetrieve,onRowSelChanged,onSize,onSorted end else // ERR002: Invalid method "%1% passed to the %2% procedure errorText = rti_Res2Str( RESID$, "ERR002", method : @fm : retStack()<1> ) abort = TRUE$ endAs a rule you should never call into forms that you don't own from a promoted event, or if you do you should forward the event along the chain normally. This rule is even more important now that the OI IDE is written in in itself which means that promoted events will affect it (ask me how I know ;)). You can check this at runtime by using the GETAPPID Repository method which will return that actual app that an entity belongs to rather than it's "inherited" ID.
At 05 MAY 2021 04:21AM Carl Pates wrote:
Hi James,
That message is the result of the default OPTIONS event handler, so somewhere along the line an OPTIONS event is being forwarded to SYSPROG*OPTIONS..OIWIN*.
From there it does this:
Call SEMANTICLOGICLAYER(), which then does this:
[list]
If a ComboBox,EditField,EditTable,PropertyGrid with a"Dropdown" then display the DropdownOtherwise look for a quick event - if it's there run that, otherwise trigger a SYSMSG event that will display the default message.[/list]