Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    26

    Problem setting a property from an edit box

    Hi,

    I'm trying to get a string value from a dialog box and then set a value in an xml file to this string value, however the xml value is just being set to the default value of the property and the entered value is being ignored.

    I'm using v2.1.1005.0 of MSI Factory and the steps I have used are:
    1. Create a property using Project, Settings, Properties, given it an ID, a default value of "Value" and all the check boxes are clear.

    2. Created a blank dialog box with an edit box on it. Set the property name to be the property I created in step 1 (without any square brackets around it) and so far tried it with indirect cleared and checked. Neither worked.

    3. Created an Install XML value with an action of "set value" and put in the correct values.

    It all works but it sets the value in the xml file to the default value of the property set in Step 1. I have an almost identical step in the process that sets a value in the same xml file to the installation directory and that works perfectly.


    Can anyone help me on this? It appears that it is having a problem setting the property to it's entered value rather than retaining it's default.


    Regards,


    Keith

  2. #2
    Join Date
    Mar 2004
    Posts
    26
    Me again.

    After some swearing at the computer I have deduced that putting the project property against the edit box simply puts the value of that property into the edit box and nothing else.

    Can someone please tell me how to put the value of the edit box into the property?


    Regards,

    Keith

  3. #3
    Join Date
    Aug 2008
    Posts
    30
    Hi Keith,
    The quick answer is: You need to enclose the property name in square brackets when you define the property as the value in the Install XML action.

    Assigning your custom property to the controls property name should bind that property to the control in your case an edit box so that when you type in something in the edit box the typed text will be stored in the property.

    Having said that, now if you want to use the property for instance to set a value in an xml file, you need to define in the value field on the install XML page, the property name enclosed in square brackets. That should work.
    Last edited by venky; 10-20-2008 at 09:32 PM.

  4. #4
    Join Date
    Mar 2004
    Posts
    26
    Hmmm....If I put the property name in square brackets in the edit box property window the msi fails with:

    "Error 5002: Validation Failed - 'SetupnFlow5.msi' was generated successfully but ICE validation errors occurred.
    Deleting temporary files

    Build FAILED! Error: 5002 - The setup (.msi) file was created but it did not pass ICE validation. See the individual ICE validation messages above for details."


    If I put the square brackets around the property name in the Install XML:setValue action it builds and runs fine, it just puts in the default value for the property rather than any values entered in the edit box.

  5. #5
    Join Date
    Mar 2004
    Posts
    26
    It appears that if you set the property up and then change it in any way then the msi builder retains the information about the old property.

    The solution to this was:
    1. Delete the property from project settings.
    2. Delete the dialog box.
    3. Delete the setXML action.
    4. Save and rebuild the msi.
    5. Start from scratch and do it all again...

  6. #6
    Join Date
    Aug 2008
    Posts
    30
    Don't put square brackets in the edit box. Put square brackets only around the property name in the InstallXML.

    I built a project and tested and it works fine. In my project, I created a property called MYPROPERTY and I added two custom dialogs. On the 1st custom dialog I have an edit box linked to MYPROPERTY. On the 2nd custom dialog (shown after a couple of dialogs later) I have an edit box linked to the same property i.e., MYPROPERTY. I also set up an InstallXML action to set an XML value in a XML file to MYPROPERTY. When I ran the installer, I changed the value in edit box on 1st custom dialog and then on the 2nd custom dialog the edit box has the new value of MYPROPERTY. After the installation completed I checked the XML file and the new value of MYPROPERTY was written to it.

    Hope that helps.

Similar Threads

  1. Listbox and Input box problem
    By Training in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 10-25-2006, 09:43 AM
  2. List Box problem
    By TonyTJ in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 02-25-2006, 07:22 AM
  3. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 AM
  4. Packages and If Statements
    By Medlir in forum Setup Factory 6.0
    Replies: 4
    Last Post: 05-09-2002, 03:51 PM
  5. Problem editing property variable
    By JBQuinn in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 06-08-2001, 01:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts