INTERACT FORUM

Windows => Plug-in Development => Topic started by: RhinoBanga on December 07, 2003, 02:01:21 am

Title: Can't get MJFieldAutomation to work
Post by: RhinoBanga 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.
Title: Re:Can't get MJFieldAutomation to work
Post by: nila on December 09, 2003, 11:41:41 am
Yeah - exact same crash here for me with the tester I just did :(
Title: Re:Can't get MJFieldAutomation to work
Post by: Matt on December 09, 2003, 01:37:15 pm
Is your MC TLB 18,432 bytes? (if not, grab the one from the next build)
Title: Re:Can't get MJFieldAutomation to work
Post by: RhinoBanga 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.
Title: Re:Can't get MJFieldAutomation to work
Post by: Nikolay 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
Title: Re:Can't get MJFieldAutomation to work
Post by: rrsavage 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 (http://www.vbaccelerator.com/home/VB/Utilities/Type_Library_Registration_Utility/VB6_Register_TypeLib_Utility.asp)


Good Luck !

Thanks,
Robert