Just saw your latest commit and had to laugh. I tried to commit the same fix at exactly the same time. Of course, svn detected the conflict...

-Matthew

2008/3/2, Vincent Spader <vince@vspader.com>:
Vincent Spader wrote:
> The setCurrentEntry call was originally there because if you start
> playing a song before it's loaded, anything bound to
> PlaylistController.currenEntry.whatever will not get updated. I guess
> binding's just aren't smart enough to figure it out. I've added it back,
> unless you know of a better way to handle that.
>
Actually, doing that doesn't work anymore. Hrm...
> Cheers,
> --Vincent Spader
>
> Matthew Leon Grinshpun wrote:
>
>> I figured that this is what's happening... It must be a bug with
>> NSTableView not being thread-safe, because it seems to update about
>> 90% of the time. Well, I'll fix the code to work with the main thread.
>>
>> -Matthew
>>
>> 2008/3/2, Vincent Spader <vince@vspader.com <mailto:vince@vspader.com>>:
>>
>>     Matthew Leon Grinshpun wrote:
>>     > Where did you get this info about KVO working on the thread from
>>     which
>>     > the change is generated? Have you looked into implementing operation
>>     > objects in the code?
>>     >
>>     > -Matthew
>>
>>     I've been bitten by it before. There is the same exact same
>>     problem with
>>     observing isFinished. That method is being called off the main thread,
>>     so the bindings aren't updating the GUI properly.
>>
>>     Cheers,
>>     --Vincent Spader
>>     >
>>     > 2008/3/1, Vincent Spader <vince@vspader.com
>>     <mailto:vince@vspader.com> <mailto:vince@vspader.com
>>     <mailto:vince@vspader.com>>>:
>>
>>     >
>>     >     It's definitely still buggy! I'll move setting status to the
>>     main
>>     >     thread...
>>     >
>>     >     Cheers,
>>     >
>>     >     --Vincent Spader
>>     >
>>     >
>>     >     Vincent Spader wrote:
>>     >     > Matthew Leon Grinshpun wrote:
>>     >     >
>>     >     >> Can you point out which particular part of the code you find
>>     >     >> problematic here?
>>     >     >>
>>     >     >
>>     >     > - (void)readPropertiesThread in PlaylistEntry.m is setting the
>>     >     status.
>>     >     > readPropertiesThread is called from a thread that is not the
>>     >     main thread
>>     >     > (from PlaylistLoader). The PlaylistEntry properties were
>>     >     originally set
>>     >     > on a separate thread previously, but I remember having
>>     issues on
>>     >     Tiger
>>     >     > (or it may have been Panther, even) where the tableview would
>>     >     freak out.
>>     >     > Changing it so the properties were set on the main thread
>>     fixed this
>>     >     > problem, but I'm not sure if it was a bug or just a limitation
>>     >     at the time.
>>     >     >
>>     >     > This may no longer be the case though. According to
>>     >     >
>>     >
>>     http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/chapter_950_section_2.html#//apple_ref/doc/uid/10000057i-CH12-123351-BBCFIIEB
>>     >     > views are generally thread safe, so it may be fine.
>>     >     >
>>     >     > Cheers,
>>     >     > --Vincent Spader
>>     >     >
>>     >     >
>>     >     >> 2008/2/29, Matthew Leon Grinshpun <vertespain@gmail.com
>>     <mailto:vertespain@gmail.com>
>>     >     <mailto:vertespain@gmail.com <mailto:vertespain@gmail.com>>
>>
>>     >     >> <mailto:vertespain@gmail.com
>>     <mailto:vertespain@gmail.com> <mailto:vertespain@gmail.com
>>     <mailto:vertespain@gmail.com>>>>:
>>
>>     >     >>
>>     >     >>     There are multiple ways to do this and I'm not sure which
>>     >     one is
>>     >     >>     best. I'm going to read Apple's threading docs tonight.
>>     >     >>
>>     >     >>
>>     >     >>     2008/2/29, Vincent Spader <vince@vspader.com
>>     <mailto:vince@vspader.com>
>>     >     <mailto:vince@vspader.com <mailto:vince@vspader.com>>
>>
>>     >     >>     <mailto:vince@vspader.com <mailto:vince@vspader.com>
>>     <mailto:vince@vspader.com <mailto:vince@vspader.com>>>>:
>>
>>     >     >>
>>     >     >>         I just noticed that status is set off-main-thread
>>     and it
>>     >     >>         seemed to work
>>     >     >>         fine.
>>     >     >>
>>     >     >>         I'm pretty sure this didn't work on Tiger,
>>     because UI calls
>>     >     >>         needed to be on
>>     >     >>         the main thread, and KVO receives on whatever
>>     thread the
>>     >     >>         change happened on.
>>     >     >>         Was this updated for Leopard? I can't find any
>>     >     reference for
>>     >     >>         it in the docs.
>>     >     >>
>>     >     >>         Either way, if it's not in the docs, status
>>     should also
>>     >     be set
>>     >     >>         in the main
>>     >     >>         thread.
>>     >     >>
>>     >     >>         Cheers,
>>     >     >>         --Vincent Spader
>>     >     >>
>>     >     >>
>>     >     >>
>>     >     >>         On Fri, Feb 29, 2008 at 09:37:49PM +0100, Matthew
>>     Leon
>>     >     >>         Grinshpun wrote:
>>     >     >>         > Okay, I'll work on this.
>>     >     >>         > -Matthew
>>     >     >>         >
>>     >     >>         > 2008/2/29, Vincent Spader <vince@vspader.com
>>     <mailto:vince@vspader.com>
>>     >     <mailto:vince@vspader.com <mailto:vince@vspader.com>>
>>
>>     >     >>         <mailto:vince@vspader.com
>>     <mailto:vince@vspader.com> <mailto:vince@vspader.com
>>     <mailto:vince@vspader.com>>>>:
>>
>>     >     >>         > >
>>     >     >>         > > On Fri, Feb 29, 2008 at 08:34:10PM +0100,
>>     Matthew Leon
>>     >     >>         Grinshpun wrote:
>>     >     >>         > > > I was going to take a look at playlistentry
>>     myself,
>>     >     >>         actually... Two
>>     >     >>         > > things
>>     >     >>         > > > jump out at me right away:
>>     >     >>         > > > 1. The setKeys: calls in the initialize method
>>     >     are all
>>     >     >>         deprecated. I'll
>>     >     >>         > > go
>>     >     >>         > > > ahead and replace them.
>>     >     >>         > >
>>     >     >>         > > Okey doke.
>>     >     >>         > >
>>     >     >>         > > > 2. The setProperties: method strikes me as
>>     redundant
>>     >     >>         since KVC give you
>>     >     >>         > > the
>>     >     >>         > > > more flexible
>>     setValuesForKeysWithDictionary. Is
>>     >     there a
>>     >     >>         reason we need
>>     >     >>         > > > this?
>>     >     >>         > >
>>     >     >>         > > They're needed for people who don't know about
>>     >     >>         > > setValuesForKeysWithDictionary ;).
>>     >     >>         > >
>>     >     >>         > > That and setMetadata can probably be removed,
>>     we'd just
>>     >     >>         need a special
>>     >     >>         > > title
>>     >     >>         > > getter to use the filename if title does not
>>     exist.
>>     >     Also,
>>     >     >>         I'm not entirely
>>     >     >>         > > certain that it needs to be called on the main
>>     >     thread...
>>     >     >>         > >
>>     >     >>         > > Cheers,
>>     >     >>         > >
>>     >     >>         > > --Vincent Spader
>>     >     >>         > >
>>     >     >>         > >
>>     >     >>         > > >
>>     >     >>         > > > -Matthew
>>     >     >>         > > >
>>     >     >>         > > > 2008/2/29, Vincent Spader
>>     <vince@vspader.com <mailto:vince@vspader.com>
>>     >     <mailto:vince@vspader.com <mailto:vince@vspader.com>>
>>
>>     >     >>         <mailto:vince@vspader.com
>>     <mailto:vince@vspader.com> <mailto:vince@vspader.com
>>     <mailto:vince@vspader.com>>>>:
>>
>>     >     >>         > > > >
>>     >     >>         > > > > On Fri, Feb 29, 2008 at 08:26:57PM +0100,
>>     >     Matthew Leon
>>     >     >>         Grinshpun
>>     >     >>         > > wrote:
>>     >     >>         > > > > > Just a heads-up that I'm back from
>>     London...
>>     >     I will
>>     >     >>         be working on
>>     >     >>         > > > > > implementing the better Spotlight search
>>     >     interface
>>     >     >>         discussed
>>     >     >>         > > previously,
>>     >     >>         > > > > > looking into the Spotlight crashes that
>>     have
>>     >     popped
>>     >     >>         up on the forum
>>     >     >>         > > and
>>     >     >>         > > > > also
>>     >     >>         > > > > > looking into cleaning up some other code.
>>     >     >>         > > > > > -Matthew
>>     >     >>         > > > >
>>     >     >>         > > > >
>>     >     >>         > > > > Welcome back! I've likely broken a couple
>>     >     things due to
>>     >     >>         some changes
>>     >     >>         > > in
>>     >     >>         > > > > PlaylistEntry. I haven't had much time to dig
>>     >     in and
>>     >     >>         fix them though.
>>     >     >>         > > > >
>>     >     >>         > > > > Cheers,
>>     >     >>         > > > > --Vincent Spader
>>     >     >>         > > > >
>>     >     >>         > > > >
>>     >     >>         > >
>>     >     >>         > >
>>     >     >>
>>     >     >
>>     >
>>     >
>>
>>
>>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Cogosx-devel mailing list
Cogosx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cogosx-devel