![]() |
nsDialogs - NSD_SetText "timing" issue
Hi,
I have the following function: code: Basically what I do is generate an encrypted "license" which will be displayed to the user in a text field. If the checkbox "Auto Apply" is checked, the license will also be added to the config file. My problem is the following: I would like the text field to be updated with the value of the license before the other operations (kill my process, write to ini, kill my service) but it doesn't. The value is added only when all the other things are done. Any idea why? Thanks, Mircea |
You are performing operations on the UI thread that prevents it from processing messages. A quick solution might be to call RedrawWindow with the system plugin but it is better to use the BgWorker plugin...
|
Hi Anders,
thanks for the suggestion(s). I tried the BgWorker plugin. I have the following code now: code: Problem is, the installer crashes whenever I enable my CheckBox and call the generate function... |
Why did you not comment things out until you found the line with the actual problem? Not everything works when called on a background thread because NSIS and plugins were never designed to do this. You are also missing a lot of Pop's in your code.
I can't get it to crash: PHP Code:
|
Hi again,
I used the system messages instead of BgWorker and it works (also added the Pops). Thanks for all your help! Mircea |
Quote:
|
| All times are GMT. The time now is 17:21. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.