Re: Refresh View After Mouse Inactivity
Re: Refresh View After Mouse Inactivity
- Subject: Re: Refresh View After Mouse Inactivity
- From: Quincey Morris <email@hidden>
- Date: Sat, 30 Apr 2016 17:46:31 -0700
- Feedback-id: 167118m:167118agrif8a:167118sCJyTeT55u:SMTPCORP
On Apr 30, 2016, at 17:27 , Richard Charles <email@hidden> wrote:
>
> NSNumber *yes = [NSNumber numberWithBool:YES];
> [self performSelector:@selector(setNeedsDisplay:) withObject:yes afterDelay:0.0];
No, that’s the opposite of the solution to that particular issue. :)
The problem is that you’re passing an object pointer (an 8-byte value) to a method that takes its value from the low-order byte of the the value it receives (more or less — exactly what it looks at is platform-dependent). A value of @YES or @NO is likely to be a tagged pointer, which is going to have at least one bit set in the low-order byte, which will make *either* @YES *or* @NO appear to be YES to the receiver.
You simply cannot validly invoke “setNeedsDisplay:” via ‘perfomSelector’. But this is not your problem.
> I have tried all these crazy ways to get the run loop to run once but nothing works.
The next place I’d go is to investigate NSActivityOptions, along with begin/end/performActivity… in NSProcessInfo.
IOW, you might have to declare that your app is “busy” until after the 2 seconds has expired.
_______________________________________________
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