PDA

View Full Version : Updating edit control after custom action



albamo
06-04-2004, 03:24 AM
Basic MSI Project.

I create a custom action (CA) and use this as event by press of button.
This CA calls common dialog and set puiblic property USERTARGETDIR (folder path).

USERTARGETDIR associated with edit control in the parent dialog.

Unfortunatelly this edit control does not update after my actions.

Alex

paul_shmakov
06-04-2004, 05:14 AM
Hello!

We currently use the following solution (dirty): create a copy of your dialog, fill a button event handler with something like this (suppose your dialog's name is SomeDialog and its copy's name is SomeDialog2):

Event handler for button on SomeDialog:

DoAction MySelectFolderAction
NewDialog SomeDialog2

Event handler for button on SomeDialog2:

DoAction MySelectFolderAction
NewDialog SomeDialog

This works. But it's ugly and dirty hack - we need to duplicate most of dialogs.
I'm also looking for right solution.

albamo
06-04-2004, 05:27 AM
Thank you, it's completely adequate solution for my task.

P.S. I readed about correct solution using Script (not Basic MSI), but our previous developer railed at using script as unreliable solution.

JGAJGA
07-01-2004, 10:02 AM
A tips :

In your custom action, you modify a property :
(in VBScript)
Session.Property("Toto") = NewTotoValue

In your dialog, on the control who call custom action :

Event - Argument - Condition
DoAction - CustomActionName - 1
[Toto] - [Toto] - 1

albamo
07-01-2004, 10:36 AM
Thank you. It works. It is excellent.:)

paul_shmakov
07-02-2004, 03:47 AM
Originally posted by JGAJGA
A tips :

In your custom action, you modify a property :
(in VBScript)
Session.Property("Toto") = NewTotoValue

In your dialog, on the control who call custom action :

Event - Argument - Condition
DoAction - CustomActionName - 1
[Toto] - [Toto] - 1

Excelent tip! Thank you!

But it works perfectly only with read-only text controls. If a property is linked to an edit control and a text in this edit control was edited by user, this tip doesn't work.