• 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: performSelector: withObject: afterDelay help for noob please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performSelector: withObject: afterDelay help for noob please


  • Subject: Re: performSelector: withObject: afterDelay help for noob please
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 2 Jul 2008 15:23:35 +0100


On 2 Jul 2008, at 15:09, Papa-Raboon wrote:

Hi There,

I have been scratching my head and trying everything to get this to
work and as a noob I find the docs a bit sparse of real world
examples.

I am trying to get performSelector: withObject: afterDelay to work but
not sure what to stick where.

I have a bit of static text I set with a value of: @"record Added"
with the following: [complete setStringValue:@"Record added"]; and I
want it to disappear after 3 seconds and I thought the easiest way
would be to just change the value to: @"" with a timer.

Currently I have this: [self setStringValue:complete withObject:@""
afterDelay:3.0];

Which doesn't seem to work and has the following warning:

'mainController' may not respond to '- setStringValue:withObject:afterDelay:'

What am I doing wrong please and what should my code really be?

Well the compiler is telling you exactly what is wrong; mainController doesn't respond to the -setStringValue:withObject:afterDelay: message. Instead, you need to do:


[self performSelector:@selector(setStringValue:) withObject:@"" afterDelay:3.0];



Cheers
Paul
_______________________________________________

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: performSelector: withObject: afterDelay help for noob please
      • From: Ken Thomases <email@hidden>
References: 
 >performSelector: withObject: afterDelay help for noob please (From: Papa-Raboon <email@hidden>)

  • Prev by Date: performSelector: withObject: afterDelay help for noob please
  • Next by Date: Re: performSelector: withObject: afterDelay help for noob please
  • Previous by thread: performSelector: withObject: afterDelay help for noob please
  • Next by thread: Re: performSelector: withObject: afterDelay help for noob please
  • Index(es):
    • Date
    • Thread