• 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: Converting a CFImageRef to a NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a CFImageRef to a NSImage


  • Subject: Re: Converting a CFImageRef to a NSImage
  • From: "Felipe Monteiro de Carvalho" <email@hidden>
  • Date: Thu, 5 Jun 2008 21:28:50 -0300

Umm ... I am getting closer to the problem. It seams to be something
in the Pascal - Cocoa bindings. Here is the constructor for
[NSGraphicsContext currentContext]

constructor NSGraphicsContext.currentContext;
type
  TmsgSendWrapper = function (param1: objc.id; param2: SEL): objc.id; cdecl;
var
  vmethod: TmsgSendWrapper;
begin
  ClassID := getClass();
  vmethod := TmsgSendWrapper(@objc_msgSend);
  Handle := vmethod(ClassID,
sel_registerName(PChar(StrNSGraphicsContext_currentContext)));
end;

It returns zero in the Handle because the ClassID is zero:

class function NSGraphicsContext.getClass: objc.id;
begin
  Result := objc_getClass(StrNSGraphicsContext_NSGraphicsContext);
end;

The constant is declared as:

  StrNSGraphicsContext_NSGraphicsContext = 'NSGraphicsContext';

It's a mistery to me why NSGraphicsContext.getClass returns zero ...
It works with basically the same code in all other classes covered by
the bindings.

thanks,
--
Felipe Monteiro de Carvalho
_______________________________________________

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

  • Follow-Ups:
    • Re: Converting a CFImageRef to a NSImage
      • From: "Felipe Monteiro de Carvalho" <email@hidden>
References: 
 >Converting a CFImageRef to a NSImage (From: "Felipe Monteiro de Carvalho" <email@hidden>)
 >Re: Converting a CFImageRef to a NSImage (From: Nick Zitzmann <email@hidden>)
 >Re: Converting a CFImageRef to a NSImage (From: "Felipe Monteiro de Carvalho" <email@hidden>)
 >Re: Converting a CFImageRef to a NSImage (From: Nick Zitzmann <email@hidden>)
 >Re: Converting a CFImageRef to a NSImage (From: "Felipe Monteiro de Carvalho" <email@hidden>)

  • Prev by Date: Re: detect URL change
  • Next by Date: Re: gcc-4.0 Fail with Realease Configuration
  • Previous by thread: Re: Converting a CFImageRef to a NSImage
  • Next by thread: Re: Converting a CFImageRef to a NSImage
  • Index(es):
    • Date
    • Thread