English 中文(简体)
NSProgressIndicator将不会消失(待定)。
原标题:NSProgressIndicator will not disappear (determinate)

I have a determinate progress indicator. It is working just like I would expect it to but it does not disappear after it reaches maxValue. I have set the progress indicator to not display when stopped in the main.nib file, I have also entered it into the awakeFromNib{} method. I put a log at the end of the routine to make sure the [displayWhenStopped] setting was still set to NO and it is.

我的法典如下:

-(void)getEvents:(NSURL *)mffFile{

NSMutableArray * eventTypeResults =[[NSMutableArray alloc]init];

EWaveformRecording  *ptrToRcdFile = [EWaveformRecording openRecording:mffFile permission:readOnly user:nil convertFileFormat:NO openReadOnlyAnyway:NO];
NSArray *events = [ptrToRcdFile getEvents];
//get the size of events for the progressbar and instantiate a loop counter
NSInteger total = [events count];
int loop = 0;

//set progress bar params
[self->meter_ setUsesThreadedAnimation:YES];
[self->meter_ setControlSize:NSMiniControlSize];
[self->meter_ setMaxValue:(double)total];

for(EEvent* event in events){
    loop ++;
    if(![eventTypeResults containsObject:event.code]){
     NSLog(@"check eventNames in getEvents %@", event.code);
     [eventTypeResults addObject: event.code];
    }//end if
//display loop increment in progress bar
[self->meter_ setDoubleValue:(1000*(double)loop)/1000];
}//end for

//send the eventTypesResults array to the EventExport class
[evtPtr setEventsAvailableList:eventTypeResults];
 }

我曾尝试过:

我完全不理解的“已准备好的绿化”;它确实放慢了进展节奏,使之看得更好,但只有不确定的类型才能通过估计来实现。

I have tried using [start & stop animation] I have tried [setDisplayWhenStopped:NO] after my loop

Any help is greatly appreciated MIke

问题回答

这是我学到的。

我不应允许进展谈判在不同的轨道上进行,尽管它看着它的工作,因为国家进步指标器不能再应对主线上的各种环境,因此,适当的事情是不要立即采用这一方法,即不是解决我的问题的办法;我正在竭尽全力,但主要线索不能重开进展,因为它忙于国际倡议中所有其他呼吁。 解决办法是实施NSRunLoop,以便每一座 lo能够打断主线,并重新计算进度表,然后进行回归控制。





相关问题
Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

How to get a flash url in a webpage using a webframe?

As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate): webView:didStartProvisionalLoadForFrame: webView:...

热门标签