• 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: SetHidden on two objects... Slow to hide
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SetHidden on two objects... Slow to hide


  • Subject: Re: SetHidden on two objects... Slow to hide
  • From: Trygve Inda <email@hidden>
  • Date: Thu, 27 Jul 2006 12:41:19 +0000
  • Thread-topic: SetHidden on two objects... Slow to hide

>>
>> On Thursday, July 27, 2006, at 05:29AM, Trygve Inda <email@hidden>
>> wrote:
>>
>>> I call:
>>>
>>> [myViewA setHidden:YES];
>>> [myViewB setHidden:YES];
>>>
>>> A is a spinning progress indicator, B is a text field. The spinner
>>> disappears about .75 seconds before the text regardless of the order of
>>> these lines.
>>>
>>> Is the only way to hide them simultaneously (to the user) to encapsulate
>>> them in an NSView containing object?
>>>
>>> I would have thought that setHidden would queue them up to be redrawn the
>>> next time through the loop and thus they'd vanish at the same time.
>>
>> My guess is that due to the animation, the progress indicator will be updated
>> when it needs to render the next frame.  It may be the case where each frame
>> in the animation forces a redisplay of itself.   Then, the text field will
>> wait until the next iteration through the run loop.
>>
>> Possible workarounds are to put them both in a single view as you've
>> mentioned, or to do a direct refresh of them using - (void)display.
>
> Hmm... Neither of these works - the spinner always goes away first... Even
> if I remove the call to stop the animation.

After playing some more - I think the animation task also must check to see
if the progress control was hidden, so this seems to work around that:

[spinner stopAnimation:nil];
[spinner display];
[spinnerGroup setHidden:YES];

Trygve


 _______________________________________________
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: 
 >Re: SetHidden on two objects... Slow to hide (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: universal/intel zlib in framework
  • Next by Date: Soap web Service (get an image back from a webservice server)
  • Previous by thread: Re: SetHidden on two objects... Slow to hide
  • Next by thread: Re: SetHidden on two objects... Slow to hide
  • Index(es):
    • Date
    • Thread