From: Eloy D. <elo...@gm...> - 2007-09-21 09:10:28
|
A better solution might be something like UKKQueue at: http://www.zathras.de/angelweb/sourcecode.htm Eloy On 9/21/07, Yvon Thoraval <yt...@ne...> wrote: > Hey all, > > right now in my RubyCocoa project i get a bunch of errors like that : > > 2007-09-20 10:17:57.289 eSync[970] *** Exception handlers were not > properly removed. Some code has jumped or returned out of an > NS_DURING...NS_HANDLER region without using the NS_VOIDRETURN or > NS_VALUERETURN macros. > 2007-09-20 10:17:57.303 eSync[970] *** Attempt to remove unrecognized > exception handler 0xbfff5a14 > > > I suspect this comes from a thread started when awakeFromNib : > > def awakeFromNib > [...] > @mutex = Mutex.new > @thread = start_thread > end > > [...] > > def start_thread > Thread.start { > loop do > update_state > sleep 5 > end > } > end > [...] > > def update_state > @mutex.synchronize do > change = false > @root.items.each { | item | > old_items = item.items_name() > new_items = getFolders( item.path ) > delta = ( old_items.length > new_items.length )? ( old_items > - new_items ) : ( new_items - old_items ) > if delta.length != 0 > item.refresh() > change = true > end > } > if change > @prefs.root = @root > @prefs.save > @outlineView.reloadData > end > @syncButton.setEnabled( FileTest.exists?( "# > {@prefs.root.path}" ) ) > end > end > > > the purpose of thsi thread is to refresh folder structure after a > change of it. > > may be there are better and cleaner solution. > > best, > > Yvon > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |