[Cocoa-sharp] Open Source Project (tiny one)
Chuck Esterbrook
chuck.esterbrook at gmail.com
Mon Feb 25 21:02:51 EST 2008
On Mon, Feb 25, 2008 at 3:55 PM, Andrew Brehm <ajbrehm at gmail.com> wrote:
> How can I get a Cocoa# program to do something when the window loads?
>
> [Export("awakeFromNib:")]
> public void awakeFromNib()
> {
> // whatever...
> }
>
> That doesn't seem to work.
Disclaimer: I haven't even used Cocoa# yet. (But I used to crank out
Objective-C and AppKit all day long for years back in the 90s.)
I notice the Objective-C name indicates one argument (one colon) and
your C# method has none. Try changing the C# method to:
public void awakeFromNib(object sender)
> Also, and this is perhaps a stupid question, how do I create a
> multiline NSTextField?
Check out NSTextView.
-Chuck
More information about the Cocoa-sharp
mailing list