Re: BOOL returned from Objective-C does not getted mapped properly (always true)
[email protected] (Sherm Pendley)
| Newsgroups | perl.macosx |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Sep 18, 2010 at 7:07 PM, Sherm Pendley <[email protected]> wrote: > On Sat, Sep 18, 2010 at 3:32 AM, Thilo Planz <[email protected]> wrote: > >> Any idea on how I can fix or workaround this issue? > > One workaround is to assign a tag to the relevant controls in > Interface Builder, and compare it like this: > > if ($sender->tag() == $self->{'thisButton'}->tag()) { > ... > } > > Tags are 32-bit values, so this bug doesn't bite them. Another possibility is to use a bit mask to ignore the additional bytes: if ($sender->isEqual($self->{'thisButton'}) & 0xf) { ... } sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net