Hi,
I'm just starting out with objective-c and have written a small program that takes input from a text file and does some calculations on the data. I'd like a progress bar to update while the calculations are ongoing.
I have a main app window with a progress bar in it and a controller with a linked IBOutlet.
In terms of actions I have a push button that starts the calculation via:
The calculation then takes place in another class(BatchConverter) which I've also linked an
I then have a loop in the BatchConverter class
But nothing appears to happen.
I've also tried putting the loop in the initial action and again nothing happens and having only one outlet in either class.
Thanks
Craig
I'm just starting out with objective-c and have written a small program that takes input from a text file and does some calculations on the data. I'd like a progress bar to update while the calculations are ongoing.
I have a main app window with a progress bar in it and a controller with a linked IBOutlet.
Code:
IBOutlet NSProgressIndicator *myProgressIndicator;
Code:
- (IBAction)batch:(id)sender{
BatchConverterObj =[[BatchConverter alloc]init];
[BatchConverterObj setHdlFactor:[hdlFactorField doubleValue]];
[BatchConverterObj BatchConvert];
}
Code:
IBOutlet for IBOutlet NSProgressIndicator *myProgressBar;
I then have a loop in the BatchConverter class
Code:
for (i = 0, count = [csvData count]; i < count; i = i + 1)
{
//start a progress bar
[myProgressBar setDoubleValue:100*i/(double)count];
I've also tried putting the loop in the initial action and again nothing happens and having only one outlet in either class.
Thanks
Craig