Its not a bug but rather a limitation of MSI UI. Dialogs do not redraw when you set a property in a custom action. The usual workaround is to use the "double dialog" hack. See these threads for details. http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Combobox-n ot-refreshing-td1511419.html#a1513311 http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-ref resh-a-dialog-td691669.html#a691670
You could also replace the MSI UI with an external UI handler, but this is a fair amount of work. On the other hand if you need to do a lot of UI, it could be a time saver in the long run. -----Original Message----- From: Matt Johnson [mailto:ma...@timeamerica.com] Sent: 20 May 2010 01:48 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] UI Edit Box not updating I have a custom action that is fired from a UI button that ultimately sets a value to a property which is displayed in an Edit box on the same UI. It is working fine, but only the first time. If I clear the edit box and immediately hit the button again, the value doesn't show up. I know the custom action isn't the issue. In fact, if you just go back one dialog and then forward again, the value shows up. So it is indeed setting the property correctly. It's just that the Edit box appears to stop listening for changes to its property after the first time. The specific case I'm having this is on a dialog that has a field to enter a username, and a browse pick it from active directory using the DirectoryObjectPicker from the msiext project. (Thanks dblock). The dialog is exactly as presented in the example usage for that custom action. I've also tested it with a different custom action of my own, and the same thing happens, so it's not anything specific to the custom actions. It's just a bug with how the edit box displays changes to properties. I'm not sure if this is a bug in Wix or in MSI itself? Perhaps there's a way I can work around it? I didn't see any way to subscribe to a property changed event. Let me know if it's a Wix bug and I'll open an issue on sourceforge. Just to reiterate, this problem is reproduced by the following steps: 1) Put an edit control and a pushbutton control on a dialog. 2) Publish a custom action to the pushbutton that sets a property value 3) Set the edit control so it displays and edits that property value 4) Build, run the setup and get to your dialog 5) Push the button and see the value show up in the edit box. 6) Change the text in the edit box to anything, or clear it. 7) Push the button again and notice the edit box did not change this time! 8) For giggles, click back, then next, and notice the edit box now shows the correct value. Thanks, Matt Johnson MCPD, MCTS, MCSD, MCDBA Director of Application Development Time America, Inc. ma...@timeamerica.com | www.timeamerica.com ------------------------------------------------------------------------ ------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users </pre> <BR style="font-size:4px;"> <a href = "http://www.sdl.com"><img src="http://www.sdl.com/images/email logo_150dpi-01.png" alt="www.sdl.com" border="0"/></a> <BR> <font face="arial" size="2" "><a href = "http://www.sdl.com" style="color:005740; font-weight: bold">www.sdl.com</a> <BR> <BR> <font face="arial" size="1" color="#736F6E"> <b>SDL PLC confidential, all rights reserved.</b> If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.<BR> SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207.<BR> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. </font> ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users