This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Can I call a CA from a Edit event?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
03:34 AM
Can I call a CA from a Edit event?
Hi guys,
I come again with a question: using IS 2008 Premiere (BasicMSI project), I have to do the following: On a custom screen I have a edit box and a label; I have to change the label based on the text entered in the edit box, in real time. I thought I can do this by calling a "DoAction" in the dialog's Edit Events for that EditFiled. This action (VBS MSI Type Number: 38) must make some calculations and then reset the label's value.
Doing this results in an error when executing line Session.Property("EDIT_PROPERTY") :
Install Log:
[HTML]
Action 11:00:41: Test.
Action start 11:00:41: Test.
Action ended 11:00:41: Test. Return value 3.
Info 2896.Executing action Test failed.[/HTML]
After this I must refresh the label to see the changes on the GUI
Is this a wrong approach? Can this be done in a easier way? I would like to keep it simple ..
Any advice is appreciated,
Best Regards,
Daniell
I come again with a question: using IS 2008 Premiere (BasicMSI project), I have to do the following: On a custom screen I have a edit box and a label; I have to change the label based on the text entered in the edit box, in real time. I thought I can do this by calling a "DoAction" in the dialog's Edit Events for that EditFiled. This action (VBS MSI Type Number: 38) must make some calculations and then reset the label's value.
Doing this results in an error when executing line Session.Property("EDIT_PROPERTY") :
Install Log:
[HTML]
Action 11:00:41: Test.
Action start 11:00:41: Test.
Action ended 11:00:41: Test. Return value 3.
Info 2896.Executing action Test failed.[/HTML]
After this I must refresh the label to see the changes on the GUI
Is this a wrong approach? Can this be done in a easier way? I would like to keep it simple ..
Any advice is appreciated,
Best Regards,
Daniell
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
06:31 AM
I do something similar in a custom dialog but not using the edit field and so I am not certain of the results.
Basically I have two labels already defined in the same x,y location. One label is visible, the other is not. I have conditions on the label based on a property value. If the property value is X then the label 1 is hidden and label 2 is visible. If the property value is Y then label 1 is visible and label 2 is hidden.
This works well with push button type controls such as Checkboxes, radio button controls, and normal push button controls.
For edit fields however, you will not be able to test conditions until the user leaves the edit field.
This approach works if you have a limited set of values that can be displayed. The other approach is through a custom action as you are pursuing. Just a word of caution, I would avoid use of vbscript custom actions as they can create chaos for debugging, for validation with antivirus software programs, etc.
Basically I have two labels already defined in the same x,y location. One label is visible, the other is not. I have conditions on the label based on a property value. If the property value is X then the label 1 is hidden and label 2 is visible. If the property value is Y then label 1 is visible and label 2 is hidden.
This works well with push button type controls such as Checkboxes, radio button controls, and normal push button controls.
For edit fields however, you will not be able to test conditions until the user leaves the edit field.
This approach works if you have a limited set of values that can be displayed. The other approach is through a custom action as you are pursuing. Just a word of caution, I would avoid use of vbscript custom actions as they can create chaos for debugging, for validation with antivirus software programs, etc.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
07:17 AM
Hi DLee, thanks for your reply
I am looking for a way to trigger the execution of a custom action when the edit field is changed, make some calculations with the new value entered in the field .. , an then set a label with the result computed.
A simple thing that already gives my head headaches ...
😞
I am looking for a way to trigger the execution of a custom action when the edit field is changed, make some calculations with the new value entered in the field .. , an then set a label with the result computed.
A simple thing that already gives my head headaches ...
😞
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
12:46 PM
Alas, that's evidently one of a handful of limitations of the MSI user interface, that it doesn't report events indicating that the contents of an edit field changed.
Please see KB article Q108570, "INFO: Limitations Of The Basic MSI User Interface", for some related information.
Please see KB article Q108570, "INFO: Limitations Of The Basic MSI User Interface", for some related information.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2008
02:32 AM
Hi,
I've edited the dialogs event list for the EditField, with:
DoAction | TestAction | 1
and in that CA, I've simply showed a message box, and it worked: every time the field was edited, the message box appeared (now that I think of it it's just because the appearance of the message box triggers a loose of focus ..8-} ), but when doing this with the request of a Session.Property("SOME_PROPERTY"), it crashes.
So in conclusion, this cannot be done as I wish it must .. ?
Best Regards,
Daniell
I've edited the dialogs event list for the EditField, with:
DoAction | TestAction | 1
and in that CA, I've simply showed a message box, and it worked: every time the field was edited, the message box appeared (now that I think of it it's just because the appearance of the message box triggers a loose of focus ..8-} ), but when doing this with the request of a Session.Property("SOME_PROPERTY"), it crashes.
So in conclusion, this cannot be done as I wish it must .. ?
Best Regards,
Daniell
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 26, 2008
08:15 AM
Meanwhile I managed to get a look on the ControlConditions, and with the hide/show is simple. The problem comes when wanting to refresh the label.
So this means that in ControlConditions, set something like:
Dialog | control | action | 1
and that action would be something like "Refresh" or "Update", to always update the value based on it's property (which has been changed meanwhile). I don't manage to see the actions available for the ControlConditions, to see which action will suit best ..
Any idea ?
Thanks,
Daniel
So this means that in ControlConditions, set something like:
Dialog | control | action | 1
and that action would be something like "Refresh" or "Update", to always update the value based on it's property (which has been changed meanwhile). I don't manage to see the actions available for the ControlConditions, to see which action will suit best ..
Any idea ?
Thanks,
Daniel
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 27, 2008
05:02 AM
Ahh, it was just a simple oversight. You needed to set the text value to [TEXT] as well as the label property attribute.
Here is the modified example. Note that when you leave the field using tab key then that is when the text is updated. It is not updated as you type characters into the field. Alas the Windows Installer engine does not permit monitoring character insertions.
Here is the modified example. Note that when you leave the field using tab key then that is when the text is updated. It is not updated as you type characters into the field. Alas the Windows Installer engine does not permit monitoring character insertions.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 27, 2008
05:30 AM
Now that I think of it, it makes sense. Uuf ..
Thank you very much Dan, :beer: 🙂
Best regards,
Daniel
Thank you very much Dan, :beer: 🙂
Best regards,
Daniel
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)