• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?


  • Subject: Re: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?
  • From: Sherm Pendley <email@hidden>
  • Date: Mon, 3 Oct 2005 14:08:14 -0400

On Oct 3, 2005, at 11:38 AM, Stephen Sample wrote:

If I use initWithSize_(NSSize->NSMakeSize_($finalImageWidth, $finalImageHeight)) to create the NSImage, I get the error message:

**** ERROR **** PerlObjCBridge: sendObjcMessage: Can't get class object for class name NSSize

This paragraph from the end of "man PerlObjCBridge" seems rather relevant:


Access to functions, variables, and other non-object-oriented con-
structs exported by libraries containing Objective-C is not currently
supported.


Thanks in advance for any suggestions.

My obviously biased suggestion: You might think about using CamelBones instead of PerlObjCBridge. Not only are NSPoint, NSRange, NSRect, and NSSize structures supported, they're toll-free bridged, so all you have to do is pass a reference to a hash with the appropriate keys:


my $scaledNSImage = NSImage->initWithSize({ width=> $finalImageWidth, height=> $finalImageHeight});

Naturally, the standard NSMakeSize() and other functions are supported too. Have a look at:

<http://camelbones.sourceforge.net/documentation/reference/ structs/index.html>

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?
      • From: Stephen Sample <email@hidden>
References: 
 >PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working? (From: Stephen Sample <email@hidden>)

  • Prev by Date: Re: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?
  • Next by Date: TIFFRepresentationUsingCompression
  • Previous by thread: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?
  • Next by thread: Re: PerlObjCBridge: calls to NSMakeSize_ (and NSMakeRect_) not working?
  • Index(es):
    • Date
    • Thread