Hey Alexander,

2009/2/28 Alexander Tsvyashchenko <[email protected]>:
> I'm trying to implement the following scenario: when user selects the file
> using WFileUpload widget, I start upload immediately (using
> WFileUpload.changed signal handler) and then upon its completion (in
> WFileUpload.uploaded handler) I start to execute some lengthy calculations
> with uploaded file.
>
> To provide feedback to the user I attempted to use processEvents() call,
> however it leads to the following exception:
>
> [fatal] "Exception while setting resource data
>
> Caused by exception:doRecursiveEventLoop(): inconsistent state"

> Is there anything that I'm missing about using this Wt API? Is any
> additional information required to determine what is the problem?

It was an implementation problem: the uploaded signal was emitted
while handling a resource request (since the file upload in the
background is implemented in that way) which is outside the event
loop. This can cause several problems, including the one you found out
about.

I have committed a change to CVS that should fix this problem by
handling the uploaded() event in the main event loop.

Regards,
koen

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to