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

Thread: VB6 Plugin with latest RRExtension & RRSDK Question

  1. #1
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1

    VB6 Plugin with latest RRExtension & RRSDK Question

    I'm having some trouble pulling data from RR with the new RRExtension and RRSDK classes in place. I'm sure this is mostly due to me not really knowing what i'm doing which is why I figured i'd ask.

    Ok, so i'd like to pull the GPS lat and lon from RR which i know i can do by querying the RRSDK via GetInfo, however i'd like to query the SDK from within the form in my plugin. The RRExtension class already declares an instance of RRSDK, but I can't figure out how to use it from within my form.

    Any help would be greatly appreciated.

    Thanks!

  2. #2
    MySQL Error
    Auto Apps:loading...

    Join Date
    Oct 2004
    Posts
    5,248
    RRSDK.GetInfo("blabla")

    real example...

    RRPath = RRSDK.GetInfo("=$rrpath$")

    gets the user var path
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

  3. #3
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    That works fine from the RRExtension class where RRSDK is declared but just placing RRSDK.GetInfo("GPSLAT") in the form produces a Run-time error '424': Object required.

    I'm having issues getting the form to be aware of the RRSDK object, just not sure how to do it.

  4. #4
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    cant you just reference the class? Like RRExtension.rrsdk.getinfo(). Thats how its done in .net.. been awhile since i messed with vb6
    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

  5. #5
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    I tried that. I ended up getting a Run-time error stating "Type mismatch".

    Anybody have any more ideas? Can it even be done?

  6. #6
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    i just went into some old movietimes code and it looks like i had the set a seperate object for the form to communicate with the .sdk

    below is code from my timer form.

    Code:
    Dim RunOnce As Boolean        ' set to prevent a double execution of code
    Public RREInstance As New RRExtension
    Public formRRSDK
    If RunOnce = False Then ' only want to do once
            RunOnce = True
            Set formRRSDK = CreateObject("RoadRunner.SDK")
            'Code here is executed when loading the Extension plugin
            ' set RRSDK (this is the sub class)
            'Set formRRSDK = New RRSDK
            
            ' run any one time code here
            FirstN = True
        End If
    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

  7. #7
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    I'll give that a try Sonic. I just wasn't sure if it was considered bad practice to create two separate objects inside the same plugin to talk to the same thing.

  8. #8
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    it might be bad practice.. but its the only way i know how
    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

  9. #9
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    You should make a Module (.bas file) and declare RRSDK there as a public object. Then have it created in the module ONCE for the whole application to use. (you can create it just like the faq explains or just like the code in the RRExtension class creates it). Once you make a public RRSDK object, you can remove the RRSDK object from within the RRExtension (if you want -- but it would be redundant to have it re-declared there).
    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."

  10. #10
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Thanks for the reply Guino, what you said makes sense I'm just having some trouble trying to implement it.

    I currently have the standard RRExtension.cls and RRSDK.cls files in my project. If I remove the object declaration from RRSDK.cls and move it into a new module, SDK.bas like so:
    Code:
    Public RRSDK As Object
    
    Public Sub Class_Initialize()
    
        Set RRSDK = CreateObject("RideRunner.SDK")
        
    End Sub
    All I get are Run-time errors, both from the plugin and RR. I've also tried leaving the object declaration in the RRSDK.cls file and moving a new declaration into the SDK.bas like:
    Code:
    Public RRSDK As RRSDK
    
    Public Sub Class_Initialize()
    
        Set RRSDK = New RRSDK
    
    End Sub
    I just get the same Run-time errors, "Object variable or With block variable not set" from the plugin and "Automation error" from RR.

    Any help is appreciated.

Page 1 of 2 12 LastLast

Similar Threads

  1. Web Plugin Question
    By Anointed in forum Centrafuse
    Replies: 7
    Last Post: 01-26-2006, 08:46 PM
  2. newbie question location trigger plugin
    By johnn4711 in forum Centrafuse
    Replies: 1
    Last Post: 04-28-2005, 09:19 AM
  3. question about medio plugin
    By thanatos106 in forum Wireless Communications
    Replies: 0
    Last Post: 04-16-2005, 09:51 PM
  4. LCD plugin Question
    By lstrunk in forum LCD/Display
    Replies: 4
    Last Post: 01-14-2002, 02:19 AM
  5. Lorty's plugin question
    By Dima in forum Software & Software Development
    Replies: 1
    Last Post: 11-01-2000, 04:29 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
  •