INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Can't get MJFieldAutomation to work  (Read 2720 times)

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Can't get MJFieldAutomation to work
« on: December 07, 2003, 02:01:21 am »

Getting an error in v9.1.315 when using MJFieldAutomation in C++ so I knocked up this small VB sample showing the problem.


Private Sub Form_Load()

Dim myMJ As MediaJukebox.MJAutomation
Set myMJ = GetObject(, "MediaJukebox Application")
If Err.Number = 429 Then
    Set myMJ = CreateObject("MediaJukebox Application")
End If

Dim myFields As MediaJukebox.MJFieldsAutomation
Set myFields = myMJ.GetFields

Dim myField As MediaJukebox.MJFieldAutomation
For loop1 = 0 To myFields.GetNumberFields
    Set myField = myFields.GetField(loop1)
    MsgBox myField.GetName(True)
Next

End Sub



I get the following error when executing the MsgBox function:

Wrong number of arguments or invalid property assignment


Can anyone get this working?

If not can we have it fixed in v9.1 please.
Logged

nila

  • Guest
Re:Can't get MJFieldAutomation to work
« Reply #1 on: December 09, 2003, 11:41:41 am »

Yeah - exact same crash here for me with the tester I just did :(
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re:Can't get MJFieldAutomation to work
« Reply #2 on: December 09, 2003, 01:37:15 pm »

Is your MC TLB 18,432 bytes? (if not, grab the one from the next build)
Logged
Matt Ashland, JRiver Media Center

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Re:Can't get MJFieldAutomation to work
« Reply #3 on: December 09, 2003, 01:54:17 pm »

It already is that size:

18.0 KB (18,432 bytes)


And the date is 14th/November/2003.
Logged

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
Re:Can't get MJFieldAutomation to work
« Reply #4 on: February 19, 2004, 02:12:19 pm »

I just tried the functionality with the latest version of MC (10.0.73). It works on my computer. So, I updated the TLB file in MC's install directory.

Install next build of MC (10.0.74) to get the latest TLB file and please try again. It should work.

Regards,
Nikolay
Logged

rrsavage

  • Regular Member
  • Recent member
  • *
  • Posts: 8
Re:Can't get MJFieldAutomation to work
« Reply #5 on: April 10, 2004, 12:18:14 pm »

I was getting the same problem with the Zones automation interface.  It turned out that my computer had two copies of the "media center.tlb" file on it.  The older one was registered and it did not have these newer interfaces defined.  

I used a TLB registration utility from VBAccelerator (see link below) to manually select and register the TLB file located in the: "C:\Program Files\J River\Media Center " directory.  

(FYI, the older TLB file on my system was in the: "C:\Program Files\J River\Media Jukebox" directory)


http://www.vbaccelerator.com/home/VB/Utilities/Type_Library_Registration_Utility/VB6_Register_TypeLib_Utility.asp


Good Luck !

Thanks,
Robert
Logged
Pages: [1]   Go Up