Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Custom List creation

  1. #1
    Maximum Bitrate
    Auto Apps:loading...
    lambosprit's Avatar
    Join Date
    Sep 2006
    Location
    UK
    Posts
    799

    Custom List creation

    I'm looking for some help creating a custom list in RideRunner.

    I have a list of values in a plugin that I want Riderunner to be able to show in a skin but I dont want to create a text file just to load the values in.

    I tried just using CLADD but that seemed to fail unsurprisingly.

    So is there anyway to initialise a custom list without using a text file?

    thanks in advance

  2. #2
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    7,775
    Blog Entries
    32
    whats your syntax for CLADD? it will work without a text file you just have no way of saving the data without using a text file


    rrsdk.execute("CLADD;555-555-5555;XXX-XXX-XXXX") works fine for me.

    If you're using CLADD in a loop you may want to add some sleep() value to prevent freezing up RR, but this is only a problem when dealing with large amounts of commands (RRShoutcast sends up to 1000 CLADDs with maybe a 5 second delay)
    NOVA, MD, DC Monthly Meets Here
    Ride Runner and Centrafuse 3 plugin creator
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  3. #3
    Maximum Bitrate
    Auto Apps:loading...
    lambosprit's Avatar
    Join Date
    Sep 2006
    Location
    UK
    Posts
    799
    thanks for that sonic. Checked my format and found an extra ; hidden in the text.

  4. #4
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    You can also store your data in an array and only add what is displayed in the CL.

    You can use RR labels "CLTOP" and "CLLINES" to develop a loop to add items to a custom list based on list position instead of loading all you data all at once.
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  5. #5
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    4,849

    Lightbulb

    You silly, silly people.... if you have data inside an ext plugin that you want displayed in a custom list without saving to a file only to load back into RR Daaaa...ie directly load into the list...

    Here is an example of how to do this:
    (sorry for the poor layout, tried to keep it narrow as possible for the posting)

    BTW...You welcome...

    Code:
    Public Function ProcessCommand(CMD As String, frm As Object) As Integer
    
    Select Case LCase(CMD)
    
    Case "scn_memberlist"
    		
    If frm.ShowCL Then '<-- Check if current screen has a custom list
      LoadRecords  '<-- Function that retrieves data/info and stores it in the Names array
      frm.CL.Clear (-1)  '<-- Clears the custom list of all items ( Same as "CLCLEAR;ALL" )
      If UBound(Names) > 0 Then '<-- Check if array was filled with data
        Dim x As Integer
        For x = 0 To UBound(Names)
          DoEvents '<-- allows for outside application events to be processed,
                        'basically acts as a sleep in your loop 
          
          frm.CL.AddItem Names(x) + Chr(10) + Names(x)  
          'above line adds items to list, 
          'Chr(10) is the seperator for the Text & Desc item parts
          '( Same As "CLADD;TEXT;DESC" )
        Next
      Else
        frm.CL.AddItem "Reload List"
      End If
      frm.CL.CenterList  '<-- This repaints/updats the control and centers it if needed
                         '( is a MUST USE to show properly )
    End If
    
    ProcessCommand = 2
    
    End Select
    
    End Function
    RideRunner...The #1 FE, PERIOD.

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

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

  6. #6
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    pfft! Where were you when I posted this?

    :P

    Good stuff...gonna go back and try it out.
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  7. #7
    Maximum Bitrate
    Auto Apps:loading...
    lambosprit's Avatar
    Join Date
    Sep 2006
    Location
    UK
    Posts
    799
    thanks blue. had most of that already.

    Question though. Your using frm rather than rr's execute. Any reason? I thought using frm was frowned upon. quote "* frm is the form object which generated the current command. Be VERY VERY careful when using it."

  8. #8
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,762
    It's not "frowned" upon -- you just have to be VERY VERY careful when using it. Using it to reference simple functions from lists should be just fine. What you have to be careful is to avoid changing/modifying variables and/or properties of the form as it could potentially cause many problems even lock ups.. other than that, the object is there exactly so extension plugins can use it.
    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."

  9. #9
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    4,849
    What....do you think that I don't know what I'm doing....

    I usually only use that to load a list if, and only if i'm NOT dealing with a ton of data. That example actually came from a custom plugin that I was asked to access a mysql database online, worked out really well!
    RideRunner...The #1 FE, PERIOD.

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

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

  10. #10
    Maximum Bitrate
    Auto Apps:loading...
    lambosprit's Avatar
    Join Date
    Sep 2006
    Location
    UK
    Posts
    799
    I wasn't questioning whether you knew what you where doing. I was just trying to learn.

    So is using frm better than execute or vice versa or no different? Whats best practice?

    It would seem from Guino's comments that if there's no performance gain etc then I should stick to execute to be on the safe side.

Page 1 of 2 12 LastLast

Similar Threads

  1. NEC 8.4" Transflective Solution - Custom Kit
    By thermoptic in forum LCD/Display
    Replies: 125
    Last Post: 12-11-2010, 12:02 AM
  2. 2003 BMW M3 Custom Dash / Overhead Console
    By gork in forum Show off your project
    Replies: 373
    Last Post: 01-01-2008, 08:52 PM
  3. Hardware Compatibility List - 800x480 Video Cards
    By alfabob in forum LCD/Display
    Replies: 13
    Last Post: 10-10-2006, 09:54 PM
  4. thumbnail view for folder and list view for file?
    By civic5zigen in forum Road Runner
    Replies: 9
    Last Post: 11-01-2005, 01:55 AM
  5. "state of the art" parts list?
    By kbyrd in forum Newbie
    Replies: 13
    Last Post: 04-29-2005, 12:35 PM

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
  •