Re: Passing NSPrintOperation* to CPP Function
Re: Passing NSPrintOperation* to CPP Function
- Subject: Re: Passing NSPrintOperation* to CPP Function
- From: KappA <email@hidden>
- Date: Thu, 22 Sep 2011 09:17:36 -0400
Did you try to cast the parameter being passed so that it enforces the
definition - when calling the function?
m_bprinter->Setup((NSPrintOperation*)po);
Also, did you rename your .cpp file to .mm? (although that shouldn't really
matter much)...
And in the CPP header file, did you include the appropriate cocoa headers
for the "NSPrintOperation*" type?
As a workaround, you can always declare the CPP function in your class to
take a "void*" instead of "NSPrintOperation*" and then cast it back to a
"NSPrintOperation*" in the body of the function... and cast the "po" to a
"void*" when calling the CPP function...
Hope this helps.
Kappa
On Wed, Sep 21, 2011 at 11:10 PM, Jens Alfke <email@hidden> wrote:
> I think we’d need to see the actual code (or sections directly copied from
> it) to tell what’s going wrong.
> For example, the class declaration you provided wouldn’t work because
> Setup() isn’t declared as public, but I assume that’s just because you just
> typed in a couple of lines from it.
>
> —Jens_______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden