BOOL returned from Objective-C does not getted mapped properly (always true)

[email protected] (Thilo Planz)
Newsgroups perl.macosx
Message-ID <[email protected]>
Hi there,

For a long time, PerlPad has been segfaulting on recent Camelbones
versions, and it seems that is caused BOOL return values no longer being
mapped properly into Perl.

It seems that functions such as NSObject->isEqual that return a BOOL
return some kind of memory index to Perl.


> my $x = NSApplication->sharedApplication;
> 	print $x->isEqual($x);
> 	print "\n";

should return YES, prints 44858369

> 	print $x->isEqual("random string");
> 	print "\n";

should return NO, prints 42636800

> 	print "true\n" if $x->isEqual("random string");

should evaluate to false in boolean context, but evaluates as true.


I think in previous versions (of CB) this worked better.

Is there any way I can rewrite my code to make at least
"isEqual" work for now?

Thanks,

Thilo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.