View Full Version : SLIDER problem
windtrader
January 14th, 2005, 12:08 AM
I've read the issues on SLIDER and I seem to have things correct. But I can not seem to get the IR commands attached to the slider button to work.
I've attached a graphic of the setttings.
What I am trying to do is:
Create a slider button with a range, initial setting, and increment.
Have an IR command that registers the slider button variable to Girder.
Have an IR command that executes a Girder command aftert the prior IR command.
When to button is pressed I can see the register commnand going to girder with the proper value of the slider in pld2.
The problem is the IR command that is defined after the register variable does not seem to get executed.
I could swear I had this working earlier today but I can not do it now.
Thanks for the help guys.
Don
Rob H
January 14th, 2005, 01:19 AM
I'm not sure whether you can have another IR command on a slider.
Why not just use NR_Lexicon_Slider_Volume as the event string in Girder? From the logger it's clearly being received by girder and it's getting different payloads as you move the slider.
danward79
January 14th, 2005, 10:11 AM
With a bit of lua girder side you could have it receive the variable, then after x seconds, trigger the command
windtrader
January 14th, 2005, 10:18 AM
Why not just use NR_Lexicon_Slider_Volume as the event string in Girder?
Rob, this worked! But WHY? The only place I define this name in the button or any action is on the SLIDER command where NR_Lexicon_SliderVolume is supposed to be the name of the variable linked to the slider value.
With a bit of lua girder side you could have it receive the variable, then after x seconds, trigger the command Are you suggesting that the problem is associated with timing of some sort?
I removed the register variable IR command and created a seperate button to register the variable once at the start of NR. I'll add here when I see what this does.
and THANKS again for the help guys sort out the mysteries of this stuff.
EDIT - This is what I see happening now.
I create a button that does the ffff 9999 9999 register variable for Lexicon.SliderVolume
The Slider buttton is defined as SLIDER:Lexicon.SliderVolume,-30,-50,0,1
The IRName is xxxxx (nothing in system like this)
Girder has event called Lexicon.SliderVolume
Reset all variables in Girder
Save and execute NR
Press register button . I see command going across registering Lexicon.SliderVolume.
Move slider button.
Lexicon.SliderVolume is passed in payload 1 and and used as the event name as it is excuted.
danward79
January 14th, 2005, 10:38 AM
No suggesting you move the second command to act from girder, instead of NR
windtrader
January 14th, 2005, 10:48 AM
Yes. I have now only IR command in the slider button. It still is not acting according to the docs. Is there a simple sample (CCF and GML) that does the slider interaction? I found it used a couple times in some older examples but I'm not sure they are reliable as they had odd IR codes for the register variable.
danward79
January 14th, 2005, 11:35 AM
Does this help?
http://www.promixis.com/phpBB2/viewtopic.php?t=9745&start=0&postdays=0&postorder=asc&highlight=
Rob H
January 14th, 2005, 01:10 PM
Rob, this worked! But WHY? The only place I define this name in the button or any action is on the SLIDER command where NR_Lexicon_SliderVolume is supposed to be the name of the variable linked to the slider value.
It's also the name of the first IR command in the action.
windtrader
January 14th, 2005, 01:39 PM
It's also the name of the first IR command in the action. That is how I have seen it documented. What I am experiencing is that it does not matter what you put in the IR name. It ignores it. I have it working now by naming an event the same as the Slider variable. For the IR name it is BLANK and works fine.
This is just another one of the mysterious ways that NR seems to work. I've given up hope awhile ago that NR works in accordance with any documented or logical fashion.
If I find a way that works, like this instance, where the documentattion clearly states a variable name is supposed to go but it takes it as an event name, so be it. I'll just code it up that way and press ahead.
thx don
Ben S
January 14th, 2005, 02:00 PM
The important thing here is that only the first action is "registered" with the plugin, so the IR action of the slider button can be -1,0x9999,0x9999 with an IR name of "Lexicon.SliderVolume". This means that whenever the value of Lexicon.SliderVolume changes, it will send the new value to Girder.
So that's part one - the same as your previous code (when a value changes, send the value to Girder).
Now to setup a slider, as you've done, define the IDTAG of a button (which can be the same button as the IR action above, but doesn't need to be) to be
SLIDER:Lexicon.SliderVolume,[start value],[min value],[max value],1
You can see this information on the wiki (http://www.netremote.org/pmwiki/index.php/Docs/SpecialTypes).
The important thing to understand is that a slider and it's IR code are not "tied" in any way. I understand this might be confusing. To add to the confusion, most actions won't work on a slider "thumb" because the action doesn't get called due to it being a slider. So only registrations of variables (as above) will work.
windtrader - I apologize for the sparseness of advanced documentation. It's something we're making great strides to reconcile.
Ben S
January 14th, 2005, 02:04 PM
I've given up hope awhile ago that NR works in accordance with any documented or logical fashion.
I know it requires some effort, but if you wouldn't mind sending me a short note regarding where it seems most illogical (or undocumented), we would definitely make use of the comments to fix the issues. It's certainly not our intention to make the product as confusing as possible, despite the way it might seem sometimes. :)
Promixis
January 15th, 2005, 12:02 PM
Dan, is this not documented right in the Pro guide?
danward79
January 15th, 2005, 12:08 PM
Dan, is this not documented right in the Pro guide?
Not that i have seen
Promixis
January 15th, 2005, 12:26 PM
ok, will add to the todo list...
windtrader
January 15th, 2005, 01:09 PM
The important thing here is that only the first action is "registered" with the plugin, so the IR action of the slider button can be -1,0x9999,0x9999 with an IR name of "Lexicon.SliderVolume". This means that whenever the value of Lexicon.SliderVolume changes, it will send the new value to Girder.
"Can be?" May as well make that SHOULD BE. :o After going round and round trying many combinations of this and that, I finally ended up with the command as you describe above. It really is the only thing that makes sense to put there as the IR action, given the constraints.
Funny thing is after getting it all working , I don't like the slider behavior in this instance. I am using the slider on a horizontal volume control bar and it works but I decided just to put a series of connected discrete transparent buttons on the bar and have a simple press on the bar set the discrete volume directly. Using the slider seems more cumbersome than just pushing on the bar to set the volume. I've included a volume down and up button on either side of the slider bar to make small fine tune volume adjustments. If only I had figured that out BEFORE implementing the slider. :roll:
I've given the issue of documentation quite a bit of thought over the past few days and I have two key suggestions that I believe will make the greatest improvement with the least effort. I've tried to consider that NR is a new commercial product and hold it to reasonable expectations as such.
First, designate a single source for the current reference materials such as NR user guide, all pllugs, their functions tonto and executeaction code. Second, make a committted effort to ensure the documentation is accurate and complete.
Although some may read and this and chuckle, I honestly offer this in the spirit of making the use of this product as painfree and productive as possible of all users, new and experierienced, with the weight going toward the less experienced user.
I believe much of the detail already exists in the forum and current documentation. The big effort would be to scrub it all down into the designated, single source doucment and then having the rigor and discipline to maintain it whenever something new is learned or changed.
Thanks again for the support.
Rob H
January 15th, 2005, 04:34 PM
The new CCF Builder should make a lot of this considerably easier by the sound of it. I can't wait for it.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.