INTERACT FORUM

Please login or register.

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

Author Topic: Probably a very stupid question...  (Read 1790 times)

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5906
  • Farm Animal Stupid
Probably a very stupid question...
« on: May 03, 2006, 11:15:31 pm »

But how do you use the MJImageFileFlags for GetImageFile?

If I use GetImageFile(IMAGEFILE_IN_DATABASE) I'm told that "The name 'IMAGEFILE_IN_DATABASE' does not exist in the current context".

If I just try sticking an integer in there, ie GetImageFile(3), then I get "The best overloaded method match for 'MediaJukebox.IMJFileAutomation.GetImageFile(MediaJukebox.MJImageFileFlags)' has some invalid arguments" and "Argument '1': cannot convert from 'int' to 'MediaJukebox.MJImageFileFlags'"

So where are these MJImageFileFlags defined and how do I gain access to them? This is in C# 2005 Express Edition, BTW...
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5906
  • Farm Animal Stupid
Re: Probably a very stupid question...
« Reply #1 on: May 04, 2006, 10:02:40 am »

Anyone?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Probably a very stupid question...
« Reply #2 on: May 04, 2006, 10:17:36 am »

IMAGEFILE_IN_DATABASE must be part of an enumated type at a guess.

Infact it would be this one
MediaJukebox.MJImageFileFlags.IMAGEFILE_IN_DATABASE

I've just realised a flaw in the template, which stems from
the time I created the C# Script plugin.

The method called
public void Init ( object MediaJukebox )
is very badly named and cased...

MediaJukebox is an Interface.  By doing what i've done above
Intellisense gets confused.

Change the method to look like this
public void Init ( MediaJukebox.MJAutomation mediaCenterRef )
 {           
            this.mediaCenterReference = mediaCenterRef ;           
 }


This will allow Visual Studio to give you better intellisense information when
using the MediaJukeBox Interface.

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5906
  • Farm Animal Stupid
Re: Probably a very stupid question...
« Reply #3 on: May 04, 2006, 10:58:59 am »

That seems to have done the trick. Thanks!
Logged
Pages: [1]   Go Up