Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

SdAskOptionsList: backslash not displayed


5 replies to this topic

yoh

yoh
  • Members
  • 8 posts

Posted 18 June 2003 - 12:04

Hello,

I would like to ask you the following :

How to display a backslash through dialog box "SdAskOptionsList"?

I have a file with a list of lines beginning by wildcards. I want to display the contents of this file in the dialog box, so that the user can choose a line (and the wildcard linked).

With others wildcards, there is no display problem, but with the backslash, the line is NOT displayed in the dialog box, so that the user cannot choose it (in fact he could select the empty line and then afterwards the backslash is selected, but we cannot apply this solution).


Thanks in advance,
Yoh Du.


vuttex

vuttex
  • Full Members
  • 35 posts

Posted 19 June 2003 - 09:12

I would guess that your problem is caused by the way InstallShield handles backslashes. It is required two backslashes in strings to become a visible backslash.

You could try to find / replace all single backslashes to \\ in your file before you display it.

Best regards,

yoh

yoh
  • Members
  • 8 posts

Posted 20 June 2003 - 14:54

In fact, I guess too that IS interpretes this as a special character, but I tried to put two backslashes \\ and it didn't work.

I tried to put "\" and it displays the first " and nothing after.

I tried to put /\/ and it displays the first / and nothing after.

etc.

Please someone help!



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 June 2003 - 21:12

I guess you are using ComponetnAddItem to build the list you want to display.
Be sure not to use any backslashes in the szComponent parameter, as this would be interpreted as sub-components.
Instead set the display text for the components you created using ComponentSetdata with COMPONENT_FIELD_DISPLAYNAME. You can use backslashes in this display name.

yoh

yoh
  • Members
  • 8 posts

Posted 31 July 2003 - 08:05

Stefan,

you are right, the program calls the ComponentAddItem function. So, if we call ComponentSetData instead, do we need to substitute szComponent or could it do with twice the name of the component ?
because the name to display is the name of the component.

In fact the code was :
ComponentAddItem(MEDIA, Data, 0, FALSE)
where Data is the name to display.

So we put the following :
ComponentSetData (MEDIA, Data, COMPONENT_FIELD_DISPLAYNAME, 0, Data);

But it doesn't work either because "Data" is the component and is also interpreted as a sub-component.
Or we need to use other component name ?

Thanks.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 July 2003 - 08:19

You need to change the component name (e.g. replace backslash with underscore). Then you set the display name to the string with backslashes. Thus InstallShield will not mis-interpret your component names as sub components, but your users will still see the backslashes