INTERACT FORUM

Please login or register.

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

Author Topic: Additional MJSchemeAutomation method please  (Read 2253 times)

DeleteMe

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • nothing more to say...
Additional MJSchemeAutomation method please
« on: August 12, 2003, 03:30:39 pm »

Matt,

Could you add an additional method to the MJSchemeAutomation object to get the column of the last search criteria?

For example:
I have a scheme under Audio called Genre.  It contains a Genre, Artist, then Album column.  When I'm traversing the Scheme tree I'd like to know if the node I'm on is the Genre, the Artist, or the Album node.

Of course if there is already a way to do this through the Media Center Interface SDK, can someone please let me know?

Thanks!
Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Additional MJSchemeAutomation method please
« Reply #1 on: August 13, 2003, 10:44:44 pm »

Hi.

You can find out if you are on the lowest level or not by calling GetNumberSchemes().  If it returns Zero, then you are at a leaf node (last column).

However, to generalize this to any column, I think JRiver would need to add a new method to the Automation SDK.

You might can work around it by keeping track of how deep you are recursing as you go traverse the scheme tree.

Soundman
Logged

DeleteMe

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • nothing more to say...
Re: Additional MJSchemeAutomation method please
« Reply #2 on: August 14, 2003, 08:52:34 am »

Hi Soundman,

With your last recommendation I'd have to have the scheme named automatically correct?  For example, Genre/Album/Artist.  I could capture the scheme name, track the node level, then parse the scheme name using the current node level and the slash '/' delimiter to get the appropriate column name.  Hmmm, I think this would work.  I was hoping to name the scheme anything that I wanted.  

. . . Maybe in the next release we will have a GetColumnName method.   8)

Thanks for the suggestions.

Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Additional MJSchemeAutomation method please
« Reply #3 on: August 14, 2003, 03:26:32 pm »

Hi.

I always write recursive code to traverse the MJSchemeAutomation code.  If you increment a counter every time you recurse one level deeper, you can use the counter to determine which column number you are currently on.  This way, you don't have to parse the name and you can call it anything you want.

You see what I mean?

Soundman
Logged

DeleteMe

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • nothing more to say...
Re: Additional MJSchemeAutomation method please
« Reply #4 on: August 14, 2003, 03:45:20 pm »

Hi Soundman,

Thank you, but I'm interrested in obtaining the column name in addition to the number.  For example, using Genre\Atrist\Album, I would like to display
Genre: Pop/Rock
then at the next node
Artist: Dave Mathews
then at the next node
Album: Crash

Unless I'm mistaken, column numbers won't help obtain names without a means to resolve names from column numbers.

Logged
Pages: [1]   Go Up