Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Uniface 9: Anyway to use Session Panels to trigger startupshell triggers?

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

22 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Let's have some positive approach how to add some operations to all the components. Trust the Beatles: "It's EASY! All you need is ..." - We need the metadictionary so we have to add to the IDF start: "/ins META" - We add a library MYENRICHLIB with an Included Proc NEWOPERSET - Finally we need a simple new dialog form ENRICHOPER. As the operations are stored on form level, we paint the UFORM on the paint tableau as a multi-occurence entity Metadictionary is out-of-the-box read-only, so in our form, we have to enrich the local WRITE trigger with a simple "write" Lets use "Load Fields" to have at least ULABEL visible and SFUNC to see the contents of the OPERATION trigger. Now comes the important code (I abused the menu trigger for it): forentity "UFORM" SFUNC = $concat(SFUNC,"%%^#include myenrichlib:newoperset") endfor - To ACT AS A PROFESSIONAL, it's time to export all the forms before modification. - Now we use our ENRICHOPER in testmode with a couple of GOLD commands: GOLD-R to retrieve all the forms GOLD-C to invoke the MENU trigger (check the result) GOLD-S so all the record are stored That's it. Depending on the amount of forms, processing may take a little while. Have a nice Chritmas and a Happy New Year, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Hi, Do you try macro "^switch_key" , if you don't already use it in form , can activate <switch keyboard> trigger of the startup shell .... Gilles. Merry CHirstmas.


Author: Gilles (gls.tools@free.fr)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Exactly. But he wants al solution at session level . So i think that the panel i a session panel and not a form panel. He should need to change that part   merry christmas


Author: fearandir (fearandir@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

The O.P.'s original point was that they didn't want to have to put a specific operation on every form so that the session panel would always be able to find the operation to call it.  You cannot define an operation on the application start up shell, so the operation must be compiled into every form.  We are looking for something you can access via the start up shell, so the code only needs to be compiled in once, but panels can't call anything but operations, and start up shells can't have operations defined. Catch 22.  If the user can define an operation against every form (using templates, or hacking the registry or similar), then the postmessage is (largely) redundant, as the operation can include the code necessary anyway.  It would appear to me that panels are largely ignored by Uniface development as being 'old school' or something. All their examples use buttons painted on the forms themselves, and the panel functions seem well behind the times.  Trouble is, if you want a U.I. with a nice consistent interface, they are so useful...... (where they are actually useful... Cool )


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Iain Sharp said The panel cannot postmessage, only call operations. I thought of that, but rejected it for those reasons.   

Hi Iain, but it can call an operation which in turn starts a postmessage ? Just a 2-step way with some supporting API in a "hidden form" may solve the problem. Nice christmas and a Happy New year to all in unifaceland, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

The panel cannot postmessage, only call operations. I thought of that, but rejected it for those reasons. 


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Did you try postmessage>asynchronous interrupt trigger?   Sergio


Author: fearandir (fearandir@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

I appreciate the effort Knut, no luck though as you have found out yourself. Thanks again.


Author: radarhead (bartonm@westinghouse.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Well, well, well.... I'd always thought the panels would issue the equivalent 'macro' statement - it would appear the kernel does not issue the 'macro' statement - thus bypassing the keyboard translation table... Ah well, back to the drawing board. Knut


Author: Knut (knut.dybendahl@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Anyway to use Session Panels to trigger startupshell triggers?

Author: bartonm@westinghouse.com (radarhead)

As the title asks, is it possible to use a custom function in a panel, at session level to trigger triggers in the startup shell? As far as I can tell Panels only let you trigger custom operations, Unfortunately the startup shell does not cater for operations.  I need it to trigger something (an include proc) at session level as I really don't want to have to add the operation trigger to the hundreds of forms we have in our application. I could use a menu but the visual impact of menus is just lacking compared to panels. Thanks in advance.

Have you tried to use the 'user key' trigger at appl startup shell level? in your custom session level panel - a macro "something" - mapped via keyboard device table - will be passed up to the 'user key' trigger.... Of course, there's no macro 'button' - but reassigning something like the 'ruler' or any other button which isn't used... maybe worth a try? Knut


Author: Knut (knut.dybendahl@gmail.com)