Bug 108706 - Perl DCOP bindings: Pass QStringList as an array (or whatever) does not work
Summary: Perl DCOP bindings: Pass QStringList as an array (or whatever) does not work
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: Perl (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-07 17:40 UTC by Sven Hergenhahn
Modified: 2005-07-07 17:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Hergenhahn 2005-07-07 17:40:50 UTC
Version:            (using KDE KDE 3.4.0)

Hi,

I'm trying to get juk to add a list of files to the Play Queue with Perl. I already contacted the juk developer about this and he says it must be a problem with the Perl bindings.

------------------------------------------------------------------------
use DCOP;
my $client = new DCOP();
$client->attach();

my $collection = $client->createObject("juk", "Collection");
my $player = $client->createObject("juk", "Player");
my @files = ('/path/to/foo.mp3', '/path/to/bar.mp3');

# this works fine (passing one file only)
my $playlistsRef = $collection->openFile("Play Queue", "/path/to/foo.mp3");

# this does as well
my $playlistsRef;
foreach my $file (@files) {
$playlistsRef = $collection->openFile("Play Queue", $file);
}

# but this doesn't (although it "should")
my $playlistsRef2 = $collection->openFile("Play Queue", @files);
------------------------------------------------------------------------------------------

The error is:

Function "juk.Collection.openFile()" doesn't exist. at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/DCOP/Object.pm line 24.
Process perl exited with code 9

According to the documentation, a QStringList is represented by an array in Perl, so in my opinion,
 
$collection->openFile("Play Queue",  @files);

should work. openString in juk either takes a QString (works) or a QStringList (works on the shell but not in Perl)

Any ideas?

Thanks,
Sven
Comment 1 Scott Wheeler 2005-07-07 17:55:13 UTC
Again, wrong place.  I'd already switched the previous bug to the correct component.