开发者

Is there a way to call a method inside an NSTextView when a Mac OSX 10.4 program is launched?

I'm trying to make a Mac OSX program in Objective-C, and I'm trying to ca开发者_开发百科ll a method inside an NSObject when the program is launched (opened by the user). I've tried so many different things. I'm still stuck on this.


Your question is quite vague. Are you using the Cocoa AppKit framework or are you trying to write a simple command-line tool using Objective-C? In the former, write an -applicationDidFinishLaunching: method in your application delegate class and it will be called when, well when the app finishes launching. In the later case, just add code to your main() method.


You can try notify_post("com.yourcompany.yourapp.themethod").

Or, just include the header of the NSObject and init, call the method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜