TylerOhlsen
Posts: 4
Joined: Thu Jan 10, 2013 7:03 pm

Property editor

I need to create MANY installers. Each of which have MANY properties defined (different for each installer). These installers will be used by developers, so they do not need to be pretty. I am trying to avoid creating many dialogs filled with many controls to change every property individually. Ideally, I have envisioned one page of the installer which is a simple table of properties and their values. Then double clicking on a value would bring up a modal dialog that allows you to edit the value of a property. That modal dialog would be the same dialog for every single property. I have been successful in creating the table, displaying the property values, opening a modal dialog of the property value, but I have not been able to figure out how to save the value back to the property.

Just to reiterate...
- The UI is made up of only two dialogs (besides the normal prepare, welcome, progress, exit, etc pages). One for the table or properties and one for the modal property editor.
- The table can be a static list that is manually updated (it does not need to be dynamically populated with each property, although that would be nice).
- When a row is double clicked, the property value for that row is populated into the modal editing dialog. If the user selects save on that dialog, the property value is updated and the table shows the new value.

Is this possible?
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Property editor

Hi Tyler and welcome to our forums,

From what I see you already have almost everything implemented, setting the new property value can be easily done with a predefined custom action "Set installer property value", which you can add from Published Events tab, I assume you already knew that since you were able to configure the rest of the requirements.

Maybe the problem is that your static list does not get refreshed, this could happen. In this case an approach that you could take is to use the twin dialog design.

If this is not the case can you please post a sample aip file that you have created so we can see what you have implemented and try to find a solution for the rest of the requirements?

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TylerOhlsen
Posts: 4
Joined: Thu Jan 10, 2013 7:03 pm

Re: Property editor

The problem is the child dialog has no direct reference to the property being edited. It has the name of the property you are editing in a property. So how do I set the value of a property whose name is stored in a property?

See attached aip file for an example of what I'm after. I'm trying to figure out how I should set up the published events on the Save button on the EditDialog (the child dialog of the PropertyEditor).

Also, if you have suggestions of a better way to do this whole property editor, I'm all ears.

Thanks,
Tyler
Attachments
PropertyEditor.aip
(19.38 KiB) Downloaded 255 times
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Property editor

Hello Tyler,

In order to achieve what you want you can use a custom action which will set the property name stored in your PROPERTY_NAME property to a specific value. For example you can add, on "Custom Actions' page, an "Execute inline script code" custom action without sequence like this:
  • Script Text: Session.Property(Session.Property("PROPERTY_NAME"))=Session.Property("PROPERTY_VALUE")
Also, you should set the "Sort By Index" attibute, of your values listbox (LISTBOX_PROPERTY_VALUES), to True.

Here's attached your edited .AIP (project file) which implements your scenario.
PropertyEditor.aip
(19.69 KiB) Downloaded 253 times
If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TylerOhlsen
Posts: 4
Joined: Thu Jan 10, 2013 7:03 pm

Re: Property editor

Excellent! That's exactly what I needed and thanks for the tip about the "Sort by Index".

Tyler
TylerOhlsen
Posts: 4
Joined: Thu Jan 10, 2013 7:03 pm

Re: Property editor

I have a new issue with the same feature.

When the project is built as the default "EXE setup with the resources next to it", the listbox events behave as I would expect (single click to select, double click to open the child editor dialog).
When the project is built as "Single MSI (resources inside)", the listbox events behave oddly (single click anywhere in the listbox opens an unpopulated child editor dialog).

Thoughts?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Property editor

Hello,

Please keep in mind that when your project type is "Single MSI (resources inside)" the "Enhanced User Interface" feature is disabled automatically.
When the project is built as "Single MSI (resources inside)", the listbox events behave oddly (single click anywhere in the listbox opens an unpopulated child editor dialog).
I'm afraid this is the normal behavior when our "Enhanced UI" feature is disabled. So, you should activate this feature in order to achieve what you want. Also, in order to use the "Enhanced UI" it is mandatory to have an EXE installation package.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”