Dialog Object Rules

Got a problem you cannot solve? Try here.
Post Reply
zchris
Posts: 92
Joined: Wed Feb 23, 2005 3:16 am
Location: Austria

Dialog Object Rules

Post by zchris »

I have a dialog that allows the user to enter the password for a service.

The object rules allow me to enable the next button if text is entered in both the password and confirm-password fields - however I would like to enable the next button only if both passwords actually match. Is it possible to test for this somehow?

Thanks.

PS: Could you also enable the 'old style' copy/paste keyboard shortcuts for the IDE and dialog editor (ctrl-ins/shift-ins/shift-del)? I always try to use them and nothing happens :|
zchris
Posts: 92
Joined: Wed Feb 23, 2005 3:16 am
Location: Austria

Post by zchris »

Also the dialog has a very small bug - if I open the dialog by double clicking on a text box and then click on an existing rule that specifies a radio button, the checked property won't be displayed.
sinan
Site Admin
Posts: 1037
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post by sinan »

Yes, you can do this. Add two dialog rules, one that disables Next if password.text fields do not match, and one that enables Next if password.text fields match. You should be able to define this in the rules editor.

Thanks for the other reports/suggestions.
zchris
Posts: 92
Joined: Wed Feb 23, 2005 3:16 am
Location: Austria

Post by zchris »

Yes, but how can I compare the two control properties?

Code: Select all

IF (LogonPassword1.Text <> LogonPassword2.Text)  THEN  Next.Enabled := False;
This will only compare if LogonPassword1.Text does not contain the text "LogonPassword2.Text".
sinan
Site Admin
Posts: 1037
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post by sinan »

I apologize for the misunderstanding, you are correct.

The only place to exercise this control would be the script for now - and not the dialog rules editor. We will add this flexibility in future updates.

Thank you for the suggestion.
andrereg
Posts: 15
Joined: Tue Oct 24, 2006 3:43 pm
Contact:

Post by andrereg »

Hi,

<Memo>
continuing on this topic, i need to enable the next button based on whether someone has pasted in a license (which might contain line breaks) into a Memo component.

Using the following rule does not seem to work:
IF (MemoLicense.Lines <> ) THEN Next.Enabled := True;
Is there a property other than 'Lines' that i should reference to see if there is any text in the memo control?

<PTShellList>
Also, I've used PTShellList in order to select a file. Is there a property that i can check via the rules editor for that component?

I am using InstallAware v6.0.6 (SP3).

thanks,
drew
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Interesting questions.

1) Try using Memo.Text instead.
2) Let PTShellList write to a variable.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
andrereg
Posts: 15
Joined: Tue Oct 24, 2006 3:43 pm
Contact:

Post by andrereg »

In the Dialog "Object Rules" editor, the Memo component doesn't have a "text" property. Perhaps this is part of a new version that i don't have yet?

Both my Memo and my PTShellList write to a property, so i can check whether the user populates them and show the dialog again. I was just wondering about being able to validate them via "Object Rules" themselves.
thanks for the suggestions!
drew
Currently Using: Install Aware Studio, v6.42 (SP2)
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Ah sorry, yes this is currently not available.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
andrereg
Posts: 15
Joined: Tue Oct 24, 2006 3:43 pm
Contact:

Post by andrereg »

Another quick question about "Memo" vs "Edit" control.

with "Edit" control, i can set it to write its result to a property "LICENSE"
and set "[Written Variable Value]" in the Object Behavior dialog (under "Receives Information") so that it can be pre-populated with their existing license if this is an upgrade.

with the "Memo" control, i can allow a user to enter a complex field such as an encrypted license. However, during an upgrade, i want to pre-populate the "Memo" control with the license information that the user already has in their database? (only options i see in "Receives Information" are "ReadMe File" and "License Agreement") -- I've tried setting the "Lines" property to "$LICENSE$" as well, but that doesn't seem to work.

are there any other workarounds that would allow me to get my task completed? I wouldn't care which control was used, as long as it was able to get the job done.
-------------

The reason i can't simply replace this usage with an Edit control is that i need to allow the user to paste in multiple lines of text, as our licenses are emailed out in Base64 text. To get this entered via the "Edit" control, the user has to copy/paste multiple times, as the "paste" operation for the "Edit" control truncates the clipboard values past a NEWLINE.

Example:

sAnTm90dTH3LQ8EXL7gCp
xmlcI7wCnq/Bl9OrOvd+Zj
Vk3FKMEL1UqHiPK9/Oxbv2
3GoXeBL1TZCMI5MYIk6s=

thanks!
drew
Currently Using: Install Aware Studio, v6.42 (SP2)
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

I think the Memo control supports writing to a variable - it has a field for that in the Object Behavior tab. Did you try to assing this field to a variable, and then also to pre-set that variable to the initial value you desire? Try to do that - also set the Lines to the same variable (just one line with the var) and see if that helps. Make sure Receives Information is none, of course.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
andrereg
Posts: 15
Joined: Tue Oct 24, 2006 3:43 pm
Contact:

Post by andrereg »

Clarification:

I am already using the *write* capability of the "Memo" component to write to a variable. My question specifically is about a need to *read* from a variable into a Memo component.

thanks!
drew
Currently Using: Install Aware Studio, v6.42 (SP2)
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Did you try all steps and none of them pre-initializes the memo? If so, I'll escalate this - seems to be a bug.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
andrereg
Posts: 15
Joined: Tue Oct 24, 2006 3:43 pm
Contact:

Post by andrereg »

Thanks for the reply;

I did put in $LICENSE$ in for Memo.Lines, assigned a value to it with "Set Variable" (just to be sure it wasn't blank) and tested it.

The Memo component loads the pre-populated value just fine.

thanks for your quick reply -- we really enjoy using InstallAware!
drew
Currently Using: Install Aware Studio, v6.42 (SP2)
Post Reply