[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Mac::Glue to CodeWarrior IDE?



Does anyone have any samples of using Mac::Glue to talk to the CodeWarrior
IDE?

I've used Glue before, but not in what I would consider a very complicated
way...

Here's an example problem, I need to be able to return the list of names of
CodeWarrior targets within a project file.

Here's the snippet:

$CW = new Mac::Glue "CodeWarrior_IDE_4";

my $projfilealias = $CW->obj(file => "Denmark:Desktop Folder:foo:foo.mcp");

$CW->open($projfilealias);

$doc = $CW->get($CW->obj(document => whose(name=> equals => "foo.mcp")));
@targslist = $CW->obj(targets => gAll, of=> $doc);

foreach $targ (@targslist) {
    $name = $CW->get($CW->prop(name => $targ));
    print $name;
    }


My understanding from the Glue docs is that event calls which generate a
list of objects should result in a Perl list. However @targslist above is a
one element list. The element then returns nothing to the prop(name) call.

Interestingly, nothing above returns an error. It just never gets a real
name.

Any suggestions appreciated. Examples that show how to parse CodeWarrior
errors from Perl (my next project) would be even better.

Thanks,

Alex




# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org