Randall Meadows wrote:
On Aug 28, 2008, at 10:37 AM, Martin Stoufer wrote:I am developing an app that is utilizing some legacy C code that I have massaged into Objective-C classes. In one of them, I am trying to drive an NSProgressIndicator view as defined by the NIB for the project. There is a core processing loop that originally spit out multiple '.' to stdout as it ran. Now I want to capture a count of these and update the indicator.The class has the proper IBOutlet defined in its header file and IB correctly sees this class (via a new Object I created in IB) and the IBOutlet I defined for it. I hooked it up properly and now when the code in the C class runs, the calls to[myProgressIndicator setDoubleValue:progress] aren't being displayed in the App.Are you doing all this in a single loop (e.g., inside the main event loop)? If so, you aren't giving the main event loop itself time to service the GUI updates. You can add in a call to [myProgressIndicator display], but even better would be to break out this inner loop and put it in a thread (giving the main loop a chance to execute alongside your loop, and therefore take care of the screen updates). See NSThread +detachNewThreadSelector:toTarget:withObject:. This will require some refactoring...
-- * Martin C. Stoufer * * ISS/IT * * Lawrence Berkeley National Lab * * 510-486-5306 * * MS 937-700 *
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]