SciLor's Open Source Forums

Also visit my Website!
It is currently Fri Dec 14, 2018 5:06 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Jan 07, 2012 4:34 am 
OK, so I am trying to make another app of which downloading Grooveshark songs is kind of a "plus". It would be a .NET Winforms app. So I am having some issues using your code. Here is my code:

Code:
    Private Sub Me_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DoReconnect()
    End Sub
    Public Client As Groove.GroovesharkClient = Nothing
    Private Sub DoReconnect()
        Try
            Client.Reconnect()
        Catch ex As Exception
        End Try
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Client = New Groove.GroovesharkClient(True) 'Problem is here!!!!!!!!
        Client.UseGZip = True
        DoSearch(Client.PopularSongs.result.Songs)
    End Sub
    Private Sub DoSearch(ByVal Data As List(Of Groove.Functions.SearchArtist.SearchArtistResult))
        Try
            For Each SearchItem As Groove.Functions.SearchArtist.SearchArtistResult In Data
                ListBox1.Items.Add(SearchItem.SongName)
            Next
        Catch ex As Exception
        Finally
        End Try
    End Sub


The line I highlighted gives me an error EVERY time.
Here is the error:
Quote:
NullReferenceException was unhandled
Object reference not set to an instance of an object.

What do I do?


Top
  
 
 
Online
The Adswinger

Joined: Wed Jan 13, 2010 11:56 pm
Posts: Too many!
Donated: Ad Posts


PostPosted: Sat Jan 07, 2012 12:14 pm 
Offline
The Developer

Joined: Wed Jan 13, 2010 11:56 pm
Posts: 1467
Donated: free software
I do not think this is the problem ;)
When the form loads, you do a Client.Reconnect, but the client is still "Nothing".
Put a Client = New Groove.GroovesharkClient(True) into Me_Load just before "DoReconnect".

Also, please change DoSearch(Client.PopularSongs.result.Songs) to DoSearch(Client.PopularSongs().result.Songs)
PopularSongs is a method :D, I see I got the same in my source and I changed it

_________________
My Windows Mobile and Windows Open Source Website:
www.scilor.com

Like my work? Donate!
Donation Website

My Programs:
grooveshark™.com Downloader, GrooveMobile, Fuel Blaster, Chameleon TicTacToe, QuickTap, WiMoBlue, Driving Licence Trainer, CodeSnippetViewer, Gesture Launcher, Fahrplanauskunft, GSensor Control


Top
 Profile  
 
PostPosted: Sat Jan 07, 2012 3:46 pm 
SciLor wrote:
I do not think this is the problem ;)
When the form loads, you do a Client.Reconnect, but the client is still "Nothing".
Put a Client = New Groove.GroovesharkClient(True) into Me_Load just before "DoReconnect".

Also, please change DoSearch(Client.PopularSongs.result.Songs) to DoSearch(Client.PopularSongs().result.Songs)
PopularSongs is a method :D, I see I got the same in my source and I changed it


Unfortunately that didn't work. I tried doing that but I keep getting the same error on the:

Code:
Client = New Groove.GroovesharkClient(True)


No matter what I do before it. I think it has something to do with the API source. Is the API's source somewhere? Or do you have any other ideas?


Top
  
 
PostPosted: Sat Jan 07, 2012 4:17 pm 
Fixed it! It was just that I forgot to add the Groovefix files to the directory! :) Happy

I would still like the API's source... PM me


Top
  
 
PostPosted: Sat Jan 07, 2012 4:45 pm 
Offline
The Developer

Joined: Wed Jan 13, 2010 11:56 pm
Posts: 1467
Donated: free software
The source is not available.
Maybe you are missing the "SciLors Logger.dll" or the "GrooveFix.xml" in the directory of "SciLorsGroovesharkAPI.dll".

Edit: Have fun ;)
Let me know if you have something stable running!

_________________
My Windows Mobile and Windows Open Source Website:
www.scilor.com

Like my work? Donate!
Donation Website

My Programs:
grooveshark™.com Downloader, GrooveMobile, Fuel Blaster, Chameleon TicTacToe, QuickTap, WiMoBlue, Driving Licence Trainer, CodeSnippetViewer, Gesture Launcher, Fahrplanauskunft, GSensor Control


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
template->_php_include(): File ./counter/foruminclude.php does not exist or is empty Powered by phpBB® Forum Software © phpBB Group