[Cocoa-sharp] Open Source Project (tiny one)

millenomi at gmail.com
Tue Feb 26 01:43:46 EST 2008


No: awakeFromNib takes no arguments. Remove the argument and the colon  
from Export and it'll work.

  - ev


Il giorno 26/feb/08, alle ore 03:02, "Chuck Esterbrook" <chuck.esterbrook at gmail.com 
 > ha scritto:

> 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
> _______________________________________________
> Cocoa-sharp mailing list
> Cocoa-sharp at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/cocoa-sharp


More information about the Cocoa-sharp mailing list