2
votes
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, ...
Statistics
|
Visits by Source |
User Actions |



