• 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
View does not get refreshed after Window deminimized...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

View does not get refreshed after Window deminimized...


  • Subject: View does not get refreshed after Window deminimized...
  • From: cocoa learner <email@hidden>
  • Date: Thu, 11 Mar 2010 20:20:36 +0530

Hi All,

I have subclassed a custom view in following way -

@implementation AppContentView


- (id)initWithFrame: (NSRect)frame

{

    self = [super initWithFrame:frame];

    if (self)

{

        // Initialization code here.

    }

    return self;

}


- (void)drawRect:(NSRect)rect

{

[[NSColor colorWithDeviceRed:0.961 green:0.961 blue:0.961 alpha:0.5] set];

[NSBezierPath fillRect: rect];

        [super drawRect:rect];

}


@end


And on this custom view I have a progress bar, that progressbar gets it's
progress value from a NSThread. And I am using following function render the
progressbar, from NSThread -


[progBar performSelectorOnMainThread: (display) withObject: nil
waitUntilDone: YES];


Every thing works fine except in following scenario -


1>. Minimize window while progress bar is at not completed (non 1.0), say
it's in 0.20 value,

2>. After waiting some time, maximize the app window when progress bar is
completed (it's value is 1.0),

3>. When window comes up it's only shows the progress bar up *0.20. *I am
handling notification* - NSWindowDidDeminiaturizeNotification.*

*
*

*Here is the code of notification handler and this handler is getting called
-*

*
*

**
*

- (void) deminimizedNotificationHandler

{

if ([progBar doubleValue] == 1.0)

{

[progBar setDoubleValue: 1.0];

[progBar setHidden: YES];

}


}
*

*
*

Does any body know why the why my progress bar is not getting completed...or
refreshed ...??? Even when it's value is 1.0



Regards

Cocoa.learner
_______________________________________________

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: View does not get refreshed after Window deminimized...
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Help visualizing something in IB
  • Next by Date: IsFileOnARemoteVolume
  • Previous by thread: Re: EXC_BAD_ACCESS
  • Next by thread: Re: View does not get refreshed after Window deminimized...
  • Index(es):
    • Date
    • Thread