PDA

View Full Version : Slider Woes... What am I doing wrong ... AGAIN!



NeoMorph
July 22nd, 2007, 08:11 PM
I swear that I'm getting very irritated by error dialogs that chop off the end of the message. I can't see what the error is to try and fix it.. See attached error dialog snapshot for what I mean. An error message that doesn't actually say anything informative is just hopeless - it just gets me angry.

All I'm trying to do is a simple slider to send a volume commands to XBMC (XBOX Media Center). Unfortunately whenever I put anything in the system lua it kicks out errors (which I don't understand becuase it cuts off the important info. It might as well just say "HA HA ... YOU GOT IT WRONG!" :)

One thing I feel is missing in the help files is proper coded examples. An example shows things a lot better than the existing syntax only.

OK... back to the problem...

Once my slider has finished moving I want it to send a value to a webpage. For instance to set the volume to 80%...

http://xbox/xbmcCmds/xbmcHttp?command=setvolume&parameter=80 The web browser plugin in on pagefile "XBMC".

To retrieve the volume level you do the following

http://xbox/xbmcCmds/xbmcHttp?command=GetVolume and it returns

<html>
<li>80</html>

I have setup a slider bar (nicked from the example ccf) and changed the variable from "mp.volume" to "xbmc.volume". The slider is on the same page as the web browser plugin.

Unfortunately I now know absolutely nothing about what I should be doing next as the helpfile doesn't tell me. I'm just plain and simply lost. I really need to sit down and get a background in lua coding as I keep putting in php, C++, visual basic and god knows what else as the syntax. Also the lua methodology seems slightly different as it doesn't seem to have the same flow as those other languages (or it may just be the way I'm getting confused).


Can someone send me a simple ccf that shows me how to use sliders as I'm getting nowhere fast.

NeoMorph
July 22nd, 2007, 08:18 PM
Oh dear... 4:16am... Once I try to do some coding I lose track of time. I swear to god that coding bends the fabric of time and space! :D

theguywiththefunnyhair
July 23rd, 2007, 02:28 AM
I swear that I'm getting very irritated by error dialogs that chop off the end of the message. I can't see what the error is to try and fix it..

Hi NeoMorph,

If it comes up in an error window it most probably also came up in your Lua console, this can be stretched to see the secrets of any error.

To see your console window use NRD and choose view from the menu, you should see it in the list.

As far as how to use slider goes, i could give you a demo... but that wouldnt help you as much as you working it out for yourself. Create your own simple ccf that has just a slider and displays a variable thats linked to the slider var. If your anything like me, while you are learning to create your own .ccf files using NRD you will need to use this method of overcoming problems many (many) times.

If you create a simple ccf and still cant get it to work, post it here and i will be happy to give any guidance i can.

Cheers

Dan

NeoMorph
July 23rd, 2007, 07:23 AM
Dan... thank you... I never thought of looking in the console... I was looking to see if there was an error log in the NRD or NR directories like most other progs do... oh yeah and at 4:16am I wasn't exactly on form neither.