[ANN] ObjectiveC Bridge
Avi Bryant
avi at beta4.com
Wed Apr 7 10:48:01 UTC 2004
On Apr 4, 2004, at 6:16 AM, Alain Fischer wrote:
> Hi All Squeakers,
>
> Following the steps of Marcel Weiher, I have done a new ObjectiveC
> Bridge
> with an ObjectiveCPlugin for the Mac OX X Unix VM 3.6g-2.
Cool. I managed to pop up a modal alert box with:
|nsalert a|
nsalert := ObjcBridge default getClass: 'NSAlert'.
a := nsalert alloc init.
a runModal
However, when I tried this:
a setMessageText: 'foo' asObjcProxy
I got an error inside #coerce:to:. I fixed it by changing the '@' case
to:
{['@']->[(ByteArray new: 4) unsignedLongAt: 1 put: (anObject id
bitShift: 2); yourself]
based on #coerce:from:.
I also changed #sendToId:messageNamed:with: to immediately return nil
if returnLength is 0, which seems to happen with methods that return
void.
No idea if I'm doing the right thing, but it seems to work.
Cheers,
Avi
More information about the Squeak-dev
mailing list
|