You should be using ApplicationContext#queueCallback() to push code
onto the event thread, so that your other threads do not need
to call pivot stuff directly.

On Sat, Apr 21, 2012 at 18:24, Ashish Dalela <[email protected]> wrote:
>
> The issue is that if I have multiple threads then I have to also be doing
> thread.join for the other threads, which in effect suspends the main thread
> until the other threads exit and makes the window unresponsive.
>
> I thought this is what PIVOT-780 is about, but I might be wrong.
>
> Ashish
>
>
> On Sat, Apr 21, 2012 at 8:53 PM, Noel Grandin <[email protected]> wrote:
>>
>> You can only call window.open from the event thread, not from other
>> threads.
>>
>>
>> On Sat, Apr 21, 2012 at 14:00, Ashish Dalela <[email protected]>
>> wrote:
>> > Hi,
>> >
>> > I'm a new user, and hope I can find some help here.
>> >
>> > I have a MVC application, with each M/V/C run in separate threads. The
>> > Pivot
>> > code runs in the View thread, and I see the following error at startup:
>> >
>> > Exception in thread "Thread-6" java.lang.IllegalStateException: this
>> > method
>> > can only be called from the AWT event dispatch thread, and not from
>> > "Thread-6"
>> >
>> > The error is seen while executing the following code:
>> >
>> > <snip>
>> > this.window = (Window)
>> > bxmlSerializer.readObject(getClass().getResource("abc.bxml"));
>> > window.open(this.display);
>> > </snip>
>> >
>> > A similar issue seems to have been reported and (apparently) fixed
>> > earlier: https://issues.apache.org/jira/browse/PIVOT-780
>> >
>> > I'm wondering if this is regressed, or what is the right version to get
>> > this
>> > fix? I'm using 2.0.1.
>> >
>> > Thanks for any help,
>> >
>> > Regards,
>> > Ashish
>
>

Reply via email to