• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: HUD Windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HUD Windows


  • Subject: Re: HUD Windows
  • From: Scott F Bayes <email@hidden>
  • Date: Wed, 23 Jan 2008 08:16:36 +0900

Hi Jeremy,

Are you *sure* your IBOutlets are non-nil? In IB it's easy to accidentally leave them unconnected. Compounding this, you can send any message to nil without getting an error or exception (either good or bad, depending on your worldview).


ScottB

On Jan 23, 2008, at 08:06 , Jeremy wrote:

Ok, now I feel stupid with the B. But ok. I thought I got what you are saying, band I am looking at my book, and it doesn't seem to be helping me out much. I am not getting any warnings at all for this code:

- (void)showLyrics:(id)sender
{
[lyricsWindow setTitle:[NSString stringWithFormat:@"%@ Lyrics", [[iTunes currentTrack] name]]];
[lyricsText setTitle:[[iTunes currentTrack] lyrics]];
[window showWindow:lyricsWindow];
[lyricsWindow makeKeyWindow];
}


But what is boggling my mind, is why it isn't working. And lyricsWindow is an IBOutlet id that has the HUD window attached to it. lyricsText is an IBOutlet with the text box attached to it. So, any help would actually help me out! A bunch.

Jeremy

"How would a car function if it were designed like a computer? Occasionally, executing a maneuver would cause your car to stop and fail and you would have to re-install the engine, and the airbag system would say, 'Are you sure?' before going off." - Katie Hafner


On Jan 22, 2008, at 4:47 PM, Kyle Sluder wrote:

On Jan 22, 2008 4:18 PM, Jeremy <email@hidden> wrote:
I have an IBOutlet id lyricsText; which is connected to a text field
within a HUB Panel Window. I have the HUB hidden by default within the
MainMenu.nib file. I would like to (on command) open up the HUB
window, change it's title, and change the text of lyricsText. Now I
feel stupid asking, but can anyone help me out?

First, it's HUD, not HUB. ;-)

Secondly, this is what one would typically use an NSWindowController
to do.  What you're describing is really easy to do (-[NSWindow
makeKeyAndOrderFront:], -[NSWindow setTitle:], -[NSTextField
setTitle:]), and is made even easier with an NSWindowController
subclass.

I suggest re-reading the model-view-controller conceptual
documentation, and then read about NSWindowController.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: HUD Windows
      • From: Jeremy <email@hidden>
References: 
 >HUB Windows (From: Jeremy <email@hidden>)
 >Re: HUB Windows (From: "Kyle Sluder" <email@hidden>)
 >Re: HUD Windows (From: Jeremy <email@hidden>)

  • Prev by Date: Re: HUD Windows
  • Next by Date: Re: HUD Windows
  • Previous by thread: Re: HUD Windows
  • Next by thread: Re: HUD Windows
  • Index(es):
    • Date
    • Thread