Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Simple dialog problem


3 replies to this topic

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 10 April 2007 - 19:06

I've got what seems like it should be a really simple dialog problem... so much I'm almost embarrassed to ask. Anyway...

I have a checkbox on a dialog that I want to be disabled by default. I set the value property of the checkbox to 1, added a property to the checkbox, added the property to Property Manager and set the value to 0.

I thought that would make it unchecked by default. What I'm seeing is that the checkbox is checked, property is still 0, but they will sync up when I uncheck and recheck the checkbox. What am I doing wrong?


-- spdygnlz --

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 11 April 2007 - 00:53

This is a very silly design by MSI, but in order to uncheck the box you need to make sure the property is undefined rather than set to 0. This means you should remove the property from the property table and any command line entries. I am not 100% sure, but I believe you can undefine an existing property by setting it equal to an empty string like this: PROPERTY = {}
Regards
-Stein Åsmul

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 11 April 2007 - 16:16

Ahhh. thanks. That is pretty silly.

So if I do a comparison against a property that hasn't been defined yet, will that cause any problems? I'm only using something like :

PROPERTY = 1
and
PROPERTY <> 1

Would those still return the same results I'm expecting?

-- spdygnlz --

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 April 2007 - 15:02

If the property is undefined, a = comparision will result false, and <> will result true, just like you would expect it.