Well, keeping searching on Google, here is the best post I've found on
the subject:
http://www.nbdtech.com/blog/archive/2007/08/01/Passing-Wpf-Objects-Between-Threads-With-Source-Code.aspx
That still doesn't explain why I need this for OnCommitFinished, but
not for GetCommitMessage2...
S.
On Mar 13, 11:06 pm, Stefan Küng <tortoise..._at_gmail.com> wrote:
> Stephane EHRET wrote:
> > Hi Stefan,
>
> > Thanks for adding the CheckCommit method...
> > ;-)
>
> > My BugTraq plugin contains a few Wpf windows. No problem at all when a
> > Wpf window is instanciated by GetCommitMessage2.
>
> > However, when I try to instanciante a Wpf from within
> > OnCommitFinished, I get the following error:
> > "The calling thread must be STA, because many UI components require
> > this."
>
> > Everything works fine if I use a "regular" Win Form instead of the Wpf
> > window, but I'd like to avoid that...
>
> > Have you got any clue why?
>
> WPF uses multiple threads, not just one. For example, the
> rendering/composition is happening on a second thread from the UI thread.
>
> Do a google search on "The calling thread must be STA, because many UI
> components require this." and you'll find out what to do.
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net
>
> ------------------------------------------------------http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMess...
>
> To unsubscribe from this discussion, e-mail: [users-unsubscr..._at_tortoisesvn.tigris.org].
>
> signature.asc
> < 1KViewDownload- Hide quoted text -
>
> - Show quoted text -
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=1332477
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-03-16 11:33:26 CET