Button indicator does not turn on consistently
-
- Profound User
- Posts: 35
- Joined: Thu Mar 15, 2012 3:42 pm
- First Name: Robert
- Last Name: Moore
- Company Name: General Parts Company
- Phone: 770-818-4736
- Address 1: 3100 Windy Hill Rd.
- City: Atlanta
- State / Province: Georgia
- Zip / Postal Code: 30339
- Country: United States
- Contact:
Button indicator does not turn on consistently
This will be one of those things the solution which will be so simple, I will roll my eyes and think what a cretin I am.
I have a button labelled "Add". When I click it, it does not turn on the indicator except under mysterious circumstances I cannot discern. In debug, the program resumes control as soon as I click the button, but the indicator associated with the button is still '*OFF' most every time. The field containing the new data is cleared, but since the indicator is not *ON the record is not added. It behaves as if enter was pressed. I have spent roughly six hours in debug and cannot understand. There is no code in the program to change the status of the indicator either *ON or *OFF. The program is not a large, complex program and there are only two fields to update. One is a drop down box and one is a free form text of up to 75 characters. That is all there is.[
If you have any ideas, I could use some new ones.
I have a button labelled "Add". When I click it, it does not turn on the indicator except under mysterious circumstances I cannot discern. In debug, the program resumes control as soon as I click the button, but the indicator associated with the button is still '*OFF' most every time. The field containing the new data is cleared, but since the indicator is not *ON the record is not added. It behaves as if enter was pressed. I have spent roughly six hours in debug and cannot understand. There is no code in the program to change the status of the indicator either *ON or *OFF. The program is not a large, complex program and there are only two fields to update. One is a drop down box and one is a free form text of up to 75 characters. That is all there is.[
If you have any ideas, I could use some new ones.
- Brian
- Profound Logic Staff Member
- Posts: 286
- Joined: Thu Apr 14, 2011 10:23 am
- First Name: Brian
- Last Name: May
- Company Name: Profound Logic Software
- Contact:
Re: Button indicator does not turn on consistently
Hmmm. Your indicator is bound to the "response" property, right?
Any js on the button's "Events"?
Any js on the button's "Events"?
-
- Profound User
- Posts: 35
- Joined: Thu Mar 15, 2012 3:42 pm
- First Name: Robert
- Last Name: Moore
- Company Name: General Parts Company
- Phone: 770-818-4736
- Address 1: 3100 Windy Hill Rd.
- City: Atlanta
- State / Province: Georgia
- Zip / Postal Code: 30339
- Country: United States
- Contact:
Re: Button indicator does not turn on consistently
The response indicator is bound to a field.
No javascript.
No javascript.
- Brian
- Profound Logic Staff Member
- Posts: 286
- Joined: Thu Apr 14, 2011 10:23 am
- First Name: Brian
- Last Name: May
- Company Name: Profound Logic Software
- Contact:
Re: Button indicator does not turn on consistently
That is very strange. I would suggest reporting it to support via email.
-
- Profound User
- Posts: 35
- Joined: Thu Mar 15, 2012 3:42 pm
- First Name: Robert
- Last Name: Moore
- Company Name: General Parts Company
- Phone: 770-818-4736
- Address 1: 3100 Windy Hill Rd.
- City: Atlanta
- State / Province: Georgia
- Zip / Postal Code: 30339
- Country: United States
- Contact:
Re: Button indicator does not turn on consistently
I have a little more to add to the scenario. This is a second program that is having the same problem. I am using ProfoundUI's built-in validation. for two fields as well as using a custom button that is labelled "SAVE" linked to an indicator named Save. When the program executes first time through, the three indicators linked to these two fields and the Save button show values of ' '.
I added two lines of code to set the two error indicators to *OFF. I expected that if I displayed the values of the two indicators, they would have values of '0'; however, both showed values of ' '. This time through, I clicked Save and the associated indicator changed to '1' unlike the first iteration when it remained ' '. I manually changed the value of the error indicator to '0' just to test the file update. After the update to the file is complete, I included a line to set the Save indicator to *OFF. This time after it executed, the indicator had a value of '0'. I don't know if these are related. My next idea is to initialise the indicators to '0' at program initialisation since setting them *OFF is not working.
I added two lines of code to set the two error indicators to *OFF. I expected that if I displayed the values of the two indicators, they would have values of '0'; however, both showed values of ' '. This time through, I clicked Save and the associated indicator changed to '1' unlike the first iteration when it remained ' '. I manually changed the value of the error indicator to '0' just to test the file update. After the update to the file is complete, I included a line to set the Save indicator to *OFF. This time after it executed, the indicator had a value of '0'. I don't know if these are related. My next idea is to initialise the indicators to '0' at program initialisation since setting them *OFF is not working.
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Button indicator does not turn on consistently
As Brian recommended, the quickest solution is probably to email a copy of your DDS source member to technical support.
We could then have a look.
FYI, the behavior your'e reporting with blank vs. '0' for indicators is normal. If you used named "indicators" in the display files, they are not "really" indicators at all, because you can't have named indicators in a display file.
These are created as 1A fields which RPG initializes to blank, as with all other character fields.
They happen to just work nicely as indicators because you can move *On and *Off into them and also check against those values.
When PUI is using one of these fields as an indicator, it takes '1' (*On) to mean on, and anything else (including blank) to mean off.
We could then have a look.
FYI, the behavior your'e reporting with blank vs. '0' for indicators is normal. If you used named "indicators" in the display files, they are not "really" indicators at all, because you can't have named indicators in a display file.
These are created as 1A fields which RPG initializes to blank, as with all other character fields.
They happen to just work nicely as indicators because you can move *On and *Off into them and also check against those values.
When PUI is using one of these fields as an indicator, it takes '1' (*On) to mean on, and anything else (including blank) to mean off.
-
- Profound User
- Posts: 35
- Joined: Thu Mar 15, 2012 3:42 pm
- First Name: Robert
- Last Name: Moore
- Company Name: General Parts Company
- Phone: 770-818-4736
- Address 1: 3100 Windy Hill Rd.
- City: Atlanta
- State / Province: Georgia
- Zip / Postal Code: 30339
- Country: United States
- Contact:
Re: Button indicator does not turn on consistently
Ok. I will send the DDS. My initial post on this subject still occurs. When the button is clicked it is populated with a value of '0' instead of '1'.
-
- Profound User
- Posts: 35
- Joined: Thu Mar 15, 2012 3:42 pm
- First Name: Robert
- Last Name: Moore
- Company Name: General Parts Company
- Phone: 770-818-4736
- Address 1: 3100 Windy Hill Rd.
- City: Atlanta
- State / Province: Georgia
- Zip / Postal Code: 30339
- Country: United States
- Contact:
Re: Button indicator does not turn on consistently
I believe I have found a work-around. In my routine to build the screen data, I used a WRITE of the format followed by the EXFMT. The button seems to work perfectly, now. The overhead of additional write statements is not noticeable enough for the human to notice. There is no subfile.
I have attached the DDS for the screen and the code for the RPG ILE program. I added the RPG code, "WRITE VSTRCENRXA", in two places to make the SAVE button indicator work the way I expected. Without them, the indicator will have a value of '0' after the first click. I added the *INZSR to initialize all the indicators to '0', but until I added the two WRITE statements it did not work.
I have attached the DDS for the screen and the code for the RPG ILE program. I added the RPG code, "WRITE VSTRCENRXA", in two places to make the SAVE button indicator work the way I expected. Without them, the indicator will have a value of '0' after the first click. I added the *INZSR to initialize all the indicators to '0', but until I added the two WRITE statements it did not work.
- Attachments
-
- PSTRCENR10.txt
- (8.98 KiB) Downloaded 478 times
-
- VSTRCENR10.txt
- (41.71 KiB) Downloaded 469 times
Last edited by leomoore on Tue May 08, 2012 3:40 pm, edited 1 time in total.
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Button indicator does not turn on consistently
Glad it's working for you, but you really shouldn't have to do that. I would still recommend emailing the DDS to technical support -- I'm sure we could spot any trouble very quickly and save you a lot of headaches down the road.
-
- Profound User
- Posts: 35
- Joined: Thu Mar 15, 2012 3:42 pm
- First Name: Robert
- Last Name: Moore
- Company Name: General Parts Company
- Phone: 770-818-4736
- Address 1: 3100 Windy Hill Rd.
- City: Atlanta
- State / Province: Georgia
- Zip / Postal Code: 30339
- Country: United States
- Contact:
Re: Button indicator does not turn on consistently
I attached the code to my previous post. If I still need to e-mail, is there a generic technical support address to use or do I simply choose one of the guys on tech support with whom I have corresponded in the past?
Who is online
Users browsing this forum: No registered users and 1 guest