Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Platformsdk MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 06-03-2009, 06:02 AM   #1 (permalink)
Steven Bethard
Guest
 
Posts: n/a
Default Enable Control when Feature set to "Will be installed..."

I have a dialog that contains a SelectionTree and a PathEdit. The PathEdit is
only relevant to one of the Features in the SelectionTree, so I'd like the
PathEdit to be disabled unless the user enables the corresponding Feature.

So I added the following entries to the the ControlCondition table:

SelectFeaturesDlg, PathEdit, Enable, &PythonOther=3
SelectFeaturesDlg, PathEdit, Disable, &PythonOther<>3

I was hoping that when the user changed the status of the feature (e.g. from
"unavailable" to "installed"), these conditions would be fired off, and the
PathEdit would be enabled when the PythonOther feature is set to be
installed. But it seems like these conditions only fire once, when the dialog
is started - if PythonOther is initially set to "unavailable", the PathEdit
is always disabled, and if PythonOther is initially set to "installed", the
PathEdit is always enabled.

How can I get these conditions to update each time the user changes their
selection for the PythonOther feature?
  Reply With Quote
Old 06-03-2009, 06:02 AM   #2 (permalink)
Steven Bethard
Guest
 
Posts: n/a
Default RE: Enable Control when Feature set to "Will be installed..."

"Steven Bethard" wrote:
> I have a dialog that contains a SelectionTree and a PathEdit. The PathEdit is
> only relevant to one of the Features in the SelectionTree, so I'd like the
> PathEdit to be disabled unless the user enables the corresponding Feature.
>
> So I added the following entries to the the ControlCondition table:
>
> SelectFeaturesDlg, PathEdit, Enable, &PythonOther=3
> SelectFeaturesDlg, PathEdit, Disable, &PythonOther<>3
>
> I was hoping that when the user changed the status of the feature (e.g. from
> "unavailable" to "installed"), these conditions would be fired off, and the
> PathEdit would be enabled when the PythonOther feature is set to be
> installed. But it seems like these conditions only fire once, when the dialog
> is started - if PythonOther is initially set to "unavailable", the PathEdit
> is always disabled, and if PythonOther is initially set to "installed", the
> PathEdit is always enabled.
>
> How can I get these conditions to update each time the user changes their
> selection for the PythonOther feature?


I found a workaround. Not sure if this is the right way to go, but... I
added a ControlEvent:

SelectFeaturesDlg, SelectionTree, [FEATURE], X

Then I changed my ControlCondition entries to:

SelectFeaturesDlg, PathEdit, Enable, FEATURE AND &PythonOther=3
SelectFeaturesDlg, PathEdit, Disable, FEATURE AND &PythonOther<>3

That seems to work - presumably because while the ControlConditions do not
fire off for changes in Feature action states, they do fire off for changes
in Property values?

I'd be happy to see a less hackish solution to this. =)

  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:34 PM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com