• 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: void value not ignored as it ought to be??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: void value not ignored as it ought to be??


  • Subject: Re: void value not ignored as it ought to be??
  • From: Eric Peyton <email@hidden>
  • Date: Thu, 16 Aug 2001 11:10:34 -0500

Well selectText defined in NSTextField.h is defined as

- (void)selectText:(id)sender;

selectText: just selects the contents of the text field it does not return anything.

Therefore you cannot do

enteredLogFile = [logField selectText:self];

(Well you can, but enteredLogFile will always be nil).

Are you trying to figure out what the user type in the field?

enteredLogFile = [logField stringValue]; might be more appropriate.


Eric

On Thursday, August 16, 2001, at 10:59 AM, Mark Wridt wrote:

Well, I'm kind of stuck here. I have a textField that
I wish to implemtent a selectText: on and the "void
value not ignored as it ought to be" error is
produced.

my code :

enteredLogFile = [logField selectText:self];

and I have also attempted just:

[logField selectText:self];

which just produces a parse error.

There is something similar in the Currency Converter
program in 'Learning Cocoa' which seems to work just
fine.

Any ideas?

Mark
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


  • Follow-Ups:
    • Re: void value not ignored as it ought to be??
      • From: Ondra Cada <email@hidden>
References: 
 >void value not ignored as it ought to be?? (From: Mark Wridt <email@hidden>)

  • Prev by Date: Re: [OT] default web browser
  • Next by Date: Category vs Subclass
  • Previous by thread: void value not ignored as it ought to be??
  • Next by thread: Re: void value not ignored as it ought to be??
  • Index(es):
    • Date
    • Thread