Results 1 to 7 of 7

Thread: Variable slider problem

  1. #1
    Constant Bitrate
    Join Date
    Dec 2008
    Posts
    167

    Variable slider problem

    I defined a variable slider to display the volume of car headunit. Also, I can adjust the headunit volume by clicking the silder. Now, the problem is that the slider can display the volume well just before clicking it. Once click the slider, it will always stay in the position mouse clicked.

    I traced the ReturnSlider(). It was called but the slider just does not refect the ReturnSlider value.

    -- SKIN
    Code:
    S01,9,440,390,35,9,440,390,35,H,01,"vslider1\pointer.gif",013"$CAR_MASTER$",
    -- ExecTBL.ini
    Code:
    "ONSLDCAR_MASTER","SETCARVOL;$CAR_MASTER$"
    -- ReturnSlider() in RRExtension
    Code:
    Case "$car_master$"
        Dim level As Integer = carVolume.getLevel()
        ReturnSlider = Int(65535 / CarVolume.MAX_VOLUME * level)
    -- ProcessCommand() in RRExtension
    Code:
    If InStr(CMD, "SETCARVOL") <> 0 Then
       'here is code to control car volume
    Endif

  2. #2
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,078
    I believe that your ReturnSlider Case "$car_master$" is not correct. You are also mixing two different methods. If you are gonna use a Ext PI, then you don't need any of the variable stuff, as that is mostly for creating a custom slider in a skin and be able to use it w/o using an ext pi. You can also use the setSlider() in RRExtention as well which is called when you click the slider ie...

    -- SetSlider() in RRExtension
    Code:
    Case "car_master"
         rrsdk.execute("SETCARVOL;" & Value") 
         totally NOT recomended!!, reuse code from setcarvol cmd or better yet make it a func and then both can use it to set the volume
    RideRunner...The #1 FE, PERIOD.

    Current Project: DFXVoice [v1.0 Released]
    Next in line: RRMedia v2.0

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

    "There are no bugs - only undocumented features."

  3. #3
    Constant Bitrate
    Join Date
    Dec 2008
    Posts
    167
    Yeah, it works well. Thanks!

  4. #4
    Constant Bitrate
    Join Date
    Dec 2008
    Posts
    167
    I have a little confuse about the SetSlider(). It seems that one click will invoke this method many times. The value in first call is correct, but the value in later calls has a value larger than 65535.

    Added a msgBox in this method. After one mouse click on the slider, the first message box showed value 17308 which is correct, but the next msg box showed value 83180




    Edit: SetSlider() works well, the code only execute once for one mouse click. Not sure why the msgbox comes

  5. #5
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    I would suggest saving a log (and not showing messageboxes) to display the values returned. The value should never be more than 65536 -- this could be very well happening because of the messagebox (hard to explain but has to do with the position of the mouse after the first messagebox is displayed).
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  6. #6
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,078
    Good call G!
    RideRunner...The #1 FE, PERIOD.

    Current Project: DFXVoice [v1.0 Released]
    Next in line: RRMedia v2.0

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

    "There are no bugs - only undocumented features."

  7. #7
    Constant Bitrate
    Join Date
    Dec 2008
    Posts
    167
    Quote Originally Posted by guino View Post
    I would suggest saving a log (and not showing messageboxes) to display the values returned. The value should never be more than 65536 -- this could be very well happening because of the messagebox (hard to explain but has to do with the position of the mouse after the first messagebox is displayed).
    Thanks guino! you are correct.

Similar Threads

  1. songpos slider problem
    By carputer1 in forum Road Runner
    Replies: 3
    Last Post: 05-16-2008, 05:21 PM
  2. DSATX problem, not power switch problem!
    By VThokieME in forum Power Supplies
    Replies: 4
    Last Post: 05-04-2008, 12:22 AM
  3. Not your typical flicker problem
    By JPuma in forum LCD/Display
    Replies: 17
    Last Post: 05-30-2007, 09:28 AM
  4. had an all day (9 hr) problem at work....
    By wizardPC in forum Off Topic
    Replies: 13
    Last Post: 10-20-2005, 11:50 AM
  5. yet another frodo install with problems.
    By Marsupial in forum FrodoPlayer
    Replies: 10
    Last Post: 08-27-2004, 06:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •