Page 1 of 1

Flipping predefined indicators?

Posted: Thu Mar 24, 2016 11:06 am
by MLeege
Is there a good way to flip an indicator like *in40, *inka, etc. in a Rich Display? Say I want to flip *inka when a button is clicked.

Thanks for your time.

Re: Flipping predefined indicators?

Posted: Thu Mar 24, 2016 11:43 am
by Glenn
Mason,

I was able to turn on *INKA by using our pressKey() API (http://www.profoundlogic.com/docs/pages ... Id=4849987) in the 'onclick' event of a button. Note that I used pressKey("F1"). This should work for the function key based indicators.

For the indicators above 24 (or actually for any indicators), I would suggest not using numbered indicators at all. I would bind a named indicator to the 'response' property of the button. If you need the numbered indicators in your RPG for existing logic, I would use the named one to 'map' to the numbered one. Make sense?

Glenn

Re: Flipping predefined indicators?

Posted: Thu Mar 24, 2016 1:00 pm
by MLeege
Hi Glenn,

Thanks for that tip.

The context of the question is that I'm currently adapting a green screen RPGLE program to run in a Profound environment and am interested in reusing as much code as is possible - the green screen has to continue to work while half of the shop locations are running on the web and the other half aren't. Emulating the button presses using pressKey appears to be work fine for my purposes.

Mason

Re: Flipping predefined indicators?

Posted: Mon Mar 28, 2016 9:08 am
by Scott Klement
If the goal is just to turn on *IN40 when a button is clicked, you can bind the "response" property to *IN40.

If the goal is to turn on *INKA, then set the "shortcut key" property to F1, then when the button is clicked *INKA will be turned on. (and the AID code in the INFDS will also be set correctly.)

If you are on Profound UI 5.3.0 or higher, the pressKey() JavaScript API will also work. But, IMHO,writing JavaScript code isn't as simple/clean as simply using the standard properties.