On 10/24/05, mikkel / gmail.com <mikkel / gmail.com> wrote:
> But when I try to run the exporter i get:
> *** -[ExampleBox initWithExportImageObj:]: selector not recognized
> [self = 0x6273cb0]
>
> Now, being a cocoa/xcode newbie, I get the impression that I need to
> implement the - (id)initWithExportImageObj:(id)fp8 from ExampleExport.m
> As far as I know, thats a constructor?? How would I implement this in
> my ruby class??

Not having tried the example (thanks for the tip, looks interesting) I
can't say for sure, but from your error, and in particular the casing
of it, I'd guess you haven't called alloc anywhere.  Cocoa objects are
typically instantiated, then initialized.  The instantiating is done
by the alloc message, and then you send init[...] to actually
initialize your instance.  Most often, these two are called together:
exampleBox = [[ExampleBox alloc] initWithExportImageObj:anObj];

In ruby, this probably becomes:
exampleBox = ExampleBox.alloc.initWithExportImageObj(anObj)

hope this helps,
--
Terje