Vote UpVote

Writing Delphi console applications that call a Cocoa API

Delphi Haven – Just a quick tip for anyone struggling with calling a Cocoa (i.e., Objective-C) API in a Delphi console application: if you’re getting ‘class cannot be found’ errors on the simplest of calls, that’s because the relevant Cocoa framework hasn’t been loaded, and therefore, hasn’t had a chance to register its classes with your application. A quick way to fix this is to make a dummy call at the top of the DPR to one of the string ‘constant’ loading routines in the Macapi.Foundation unit, e.g. NSDefaultRunLoopMode: uses System.SysUtils, ...
Favorite? Off-Topic? Chris Rolliston @ 2012-01-09 08:38


Visits: 643
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Primoz Gabrijelcic
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)