0

この問題にはまだ大きな困難があります。助言がありますか?

NSWindow とは異なる NSPanel ウィンドウの基本を説明する簡単なチュートリアルをオンラインで見つけることができません。

通知と入力ボックスとして表示したい HUD ウィンドウがありますが、どうすればよいかわかりません。私の試みは以下のとおりです。

これは言い回しが悪く、広すぎる質問であることは承知しています。私は Objective C と Interface Builder を初めて使用するので、具体的に説明できるほどまだ足を踏み入れていません。

関連部分: AppController.h

@interface AppController : NSObject {

    IBOutlet NSMenu *statusMenu;
    IBOutlet id HUDPanel;


    IBOutlet NSTextField *HUDTextField;
    IBOutlet NSTextField *HUDLabel;
    IBOutlet NSProgressIndicator *HUDSpinner;

    NSStatusItem *statusItem;
    NSImage *statusImage;
    NSImage *statusHighlightImage;  

}


- (IBAction)recognizeCurrentLocation:(id)sender;

- (IBAction)saveButtonPressed:(id)sender; 

- (IBAction)newLocationMenuItem:(id)sender; 

- (IBAction)HUDPanelHide:(id)sender;

- (IBAction)HUDPanelShow:(id)sender;



@end

関連部分: AppController.c

- (IBAction)HUDPanelHide:(id)sender{
    [HUDPanel close];
}

- (IBAction)HUDPanelShow:(id)sender{
    [HUDPanel makeKeyAndOrderFront:self];
}

また、IB でのリンクが正しいことはかなり確信しています。チュートリアルに従って、このほとんどをセットアップしました。他のアクションに割り当てたメニュー項目は適切に実行されています。

私が見つけたチュートリアルはここにありました:

http://www.mataderu.com/xphere/info/cocoa_tut02/OpenGLrules.zip

4

1 に答える 1

1

Apparently my answer was that I was not creating a "utility window" - e.g. I had an *.xib instead of a *.nib file.

I'm not sure why this makes a difference so perhaps more explanation from an expert would be worth noting here.

Otherwise, my code was exactly what it should be.

于 2010-02-19T19:33:03.833 に答える