RPG doesn't know slider value
-
- Profound User
- Posts: 22
- Joined: Fri Jul 30, 2010 1:37 pm
- First Name: Thomas
- Last Name: Garvey
- Company Name: Unbeaten Path Intl
- Phone: 630-462-3991
- State / Province: Illinois
- Zip / Postal Code: 60188
- Country: United States
- Contact:
RPG doesn't know slider value
I have a Slider widget and a displayed value that changes as the user adjusts the slider button. Works great. However, when the user has finished their adjustment (which I guess is OnMouseUp) I need to check the value they left the slider at and, depending on value, either turn on or off a separate radio button.
I'm guessing I have to use JavaScript for this because I can't figure out how to have my RPG program know when the user is done with the slider (and thus check the value and set/reset the radio button). That is, other than JavaScript. I can't bind a Response Indicator to it.
Any ideas, or JavaScript for this type of thing?
I'm guessing I have to use JavaScript for this because I can't figure out how to have my RPG program know when the user is done with the slider (and thus check the value and set/reset the radio button). That is, other than JavaScript. I can't bind a Response Indicator to it.
Any ideas, or JavaScript for this type of thing?
- 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: RPG doesn't know slider value
The screen would need to be submitted for your RPG to regain control of anything. You could just put a call to pui.click() on the onmouseup event of the slider. This should return control to RPG after they adjust the slider. Let me know if that meets your need.
-
- Profound User
- Posts: 22
- Joined: Fri Jul 30, 2010 1:37 pm
- First Name: Thomas
- Last Name: Garvey
- Company Name: Unbeaten Path Intl
- Phone: 630-462-3991
- State / Province: Illinois
- Zip / Postal Code: 60188
- Country: United States
- Contact:
Re: RPG doesn't know slider value
That didn't really help. My program gets control, but the new value of the slider is not provided to the program.
- 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: RPG doesn't know slider value
Did you bind a field to the "value" property of the slider?
-
- Profound User
- Posts: 22
- Joined: Fri Jul 30, 2010 1:37 pm
- First Name: Thomas
- Last Name: Garvey
- Company Name: Unbeaten Path Intl
- Phone: 630-462-3991
- State / Province: Illinois
- Zip / Postal Code: 60188
- Country: United States
- Contact:
Re: RPG doesn't know slider value
yes, and that field also appears on the display
-
- Profound User
- Posts: 22
- Joined: Fri Jul 30, 2010 1:37 pm
- First Name: Thomas
- Last Name: Garvey
- Company Name: Unbeaten Path Intl
- Phone: 630-462-3991
- State / Province: Illinois
- Zip / Postal Code: 60188
- Country: United States
- Contact:
Re: RPG doesn't know slider value
The OnChange event for the slider has this JavaScript Code...
changeElementValue("spAdjust", this.value);
So, the value is changing but the pui.click(); code in the OnMouseUp for the slider does not place the new value in the 'buffer' that my RPG program sees.
changeElementValue("spAdjust", this.value);
So, the value is changing but the pui.click(); code in the OnMouseUp for the slider does not place the new value in the 'buffer' that my RPG program sees.
-
- Profound User
- Posts: 22
- Joined: Fri Jul 30, 2010 1:37 pm
- First Name: Thomas
- Last Name: Garvey
- Company Name: Unbeaten Path Intl
- Phone: 630-462-3991
- State / Province: Illinois
- Zip / Postal Code: 60188
- Country: United States
- Contact:
Re: RPG doesn't know slider value
THis is why I think the only way is to have JavaScript in the OnMouseUp event for the slider that tests the value of the slider and then changes the value of the othere field (a radio button).
- 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: RPG doesn't know slider value
That is strange. What happens if you bind a field to your displayed value? Can RPG see the current value there?
-
- Profound User
- Posts: 22
- Joined: Fri Jul 30, 2010 1:37 pm
- First Name: Thomas
- Last Name: Garvey
- Company Name: Unbeaten Path Intl
- Phone: 630-462-3991
- State / Province: Illinois
- Zip / Postal Code: 60188
- Country: United States
- Contact:
Re: RPG doesn't know slider value
The bound field for Value is the same for both widgets. The slider ID is Spinner1 and the bound field for Value is spAdjust. The displayed field is an Output Field, whose ID is spAdjust and the bound field for Value is spAdjust.
I'm not sure why, but the following JavaScript is in the OnChange Event for BOTH the slider AND the display output field.
changeElementValue("spAdjust", this.value);
The Display Output field would never experience an OnChange Event, right? Why would this JavaScript code be there? And does it matter, as it regards this problem?
I'm not sure why, but the following JavaScript is in the OnChange Event for BOTH the slider AND the display output field.
changeElementValue("spAdjust", this.value);
The Display Output field would never experience an OnChange Event, right? Why would this JavaScript code be there? And does it matter, as it regards this problem?
- 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: RPG doesn't know slider value
I'm not really sure what is happening. I'm going to try to recreate the situation here so that I can debug it.
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests