[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trying to understand the run loop
From: |
Lloyd Dupont |
Subject: |
Re: trying to understand the run loop |
Date: |
Thu, 9 Mar 2006 11:12:36 +1000 |
You don't want to be using internal API from the library ... if
runModeBeforeDate is causing a problem you need to provide a bugfix (or
at least sample code to allow someone to replicate the bug and
Well, I can't see what kind of sample I could provide :S
I don't think a simple ObjectiveC.NET version will be a good sample (without
the binding code), or would it?
If it's the case I can write a simple ObjectiveC.NET app to show the
problem.
fix it). Current code in svn has several mingw32 cleanups and might work
fine for you anyway.
Ho.. I haven't get around to have the SVN working yet :-(
Although I read on the list this morning that there is an HTTP based
version, that might work better with TortoiseSVN, we shall see.....
(I'm using Tortoise SVN because I'm no big fan of everything command line,
beside SVN + SSH require a certain amount of setting on Windows...)
There are two approaches ...
The one using standard APIs would be something like above (polling from
within windows event handling) ...
NSUndoManager *undoManger = GetUndoManager();
NSRunLoop *loop = [NSRunLoop currentRunLoop];
NSDate *past = [NSDate distantPast];
[NSApplication shared];
while (event = GetEvent())
{
pool = [NSAutoreleasePool new];
DoEvent(event);
[runLoop acceptInputForMode: NSDefaultRunLoopMode beforeDate: past];
while ([undoManager groupingLevel] > 0)
[undoManager endUndoGrouping];
[pool release];
}
Simple enough....
Well if you're interested in my sample, that might do ;-)