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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to