• 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: Strange NSTextField behaviour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange NSTextField behaviour


  • Subject: Re: Strange NSTextField behaviour
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 21 Dec 2004 18:30:26 -0600

The first thing to check when a method unexpectedly returns nil is whether the receiver is nil. What is the value of userNameTextField? Are you sure the outlet is set in the nib?

-- F

On 21 Dec 2004, at 4:19 PM, Peter Browne wrote:

However, when the sheet is ended, the content of the NSTextField seems to be unavailable. The NSLog shows the contents of the textfield to be NULL which to me suggests a broken connection of some sort. Any ideas? Here is the relevant code:
...
- (void)loginSheetDidEnd:(NSWindow *)sheet

returnCode:(int)returnCode

contextInfo:(void *)contextInfo;
{
NSString * username = [userNameTextField stringValue];
NSLog(@"Now logged in as %@", username);

--
Fritz Anderson
Consulting Programmer Chicago, Illinois
http://resume.manoverboard.org/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Strange NSTextField behaviour (From: Peter Browne <email@hidden>)

  • Prev by Date: arbitrary date formats based on user prefs
  • Next by Date: Re: arbitrary date formats based on user prefs
  • Previous by thread: Strange NSTextField behaviour
  • Next by thread: I cant get my helper tool to launch
  • Index(es):
    • Date
    • Thread