'Does not support a collection'

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

Pater
Posts: 15
Joined: Fri Jun 03, 2011 12:45 pm

'Does not support a collection'

Post by Pater »

When executing the following code:

Code: Select all

$MM->Player->Volume(1)
i get the following error:

Code: Select all

Fatal error: Uncaught exception 'com_exception' with message 'Error [0x80020011]
 Does not support a collection.
' in C:\xampp\htdocs\MMSockServer\MMSocketServer-0.1\SongsDB\SDBPlayer.php:29
Stack trace:
#0 C:\xampp\htdocs\MMSockServer\MMSocketServer-0.1\SongsDB\SDBPlayer.php(29): 
variant->Volume(1)
#1 C:\xampp\htdocs\MMSockServer\MMSocketServer-0.1\MMSockServer.php(93) : 
eval() 'd code(1): SDBPlayer->Volume(1)
#2 C:\xampp\htdocs\MMSockServer\MMSocketServer-0.1\MMSockServer.php(93): 
eval()
#3 {main}
  thrown in C:\xampp\htdocs\MMSockServer\MMSocketServer-0.1\SongsDB\SDBPlayer.php on line 29
The function:

Code: Select all

function Volume($volume){
		global $COM;
		$volume = is_numeric($volume) ? (float) $volume : false;
		print gettype($volume);
		if('double' == gettype($volume)) { //$volume <= 1.0 && $volume >= 0.0
			return $COM->Player->Volume((float) $volume);
		} else {
			return $COM->Player->Volume();
		}
	}
The function does report back that $volume is an double. Anyone got an idea what the problem is?
Pater
Posts: 15
Joined: Fri Jun 03, 2011 12:45 pm

Re: 'Does not support a collection'

Post by Pater »

Solved my own problem:

is it is a property you should set it by using $MM->Player->Volume = $volume; and not $MM->Player->Volume($arg) as i did

topic may be closed
Post Reply