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

Validate user input


4 replies to this topic

ClydeMontreal

ClydeMontreal
  • Members
  • 15 posts

Posted 13 August 2003 - 20:55

I want to restrict user to input an even number to one of my MSI field. Can anyone please help me on this. Thank you.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 14 August 2003 - 03:47

I would recommend creating a custrom action that will run when the user presses the next button of your dialog. The custom actio can then set a property if the value is incorrect, and pop up a dialog for this.

ClydeMontreal

ClydeMontreal
  • Members
  • 15 posts

Posted 14 August 2003 - 19:48

Luke thanks for replying so fast. I am working on my MSI with ORCA. The problem is I don't know how to do something like "[Number] mod 2 <> 0" in condition field.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 August 2003 - 08:33

You should be able to use the bitwise AND operator ><:

Number >< 1

will betrue if the least significant bit of Number is set, i.e. if it's an odd number.

ClydeMontreal

ClydeMontreal
  • Members
  • 15 posts

Posted 18 August 2003 - 14:36

Thank you Stefan.