PDA

View Full Version : escape sequence



CWRIGHT
02-02-2004, 09:17 AM
I am sure this is a simple one -- is there any way to avoid escape sequences (particularly \n) in a text string when using Paragraph.SetText ?

I am using the Dialog.FolderBrowse action to browse for a folder, and then write the chosen folder and path in a paragraph. For example:

storage_path = Dialog.FolderBrowse("Please select a folder:", _ProgramFilesFolder);
if (storage_path ~= "CANCEL") then
Paragraph.SetText("Paragraph2", storage_path);
end

The problem is, if I select a folder starting with the letter n (eg c:\newfolder), this and its preceeding backslash are interpretted as a \n newline, and the paragraph text is set as:

c:
ewfolder

Any help appreciated.
Thanks, CW

rhosk
02-02-2004, 09:33 AM
Try c:\\newfolder :)

CWRIGHT
02-02-2004, 09:44 AM
Thanks Ron, :) but unfortuantely that doesn't work. :(

I am using the Dialog.FolderBrowse function which automatically sets the variable for me. The variable is displayed correctly in a message box, but not when used with Paragraph.SetText.

Even the following doesn't work:

testvar = "C:\\newfolder";
Paragraph.SetText("Paragraph1", testvar);

Lorne
02-02-2004, 10:35 AM
Thanks for reporting this! I've confirmed the behaviour and logged it for further inspection.

CWRIGHT
02-02-2004, 10:54 AM
Thanks.

Mark
02-16-2004, 10:21 AM
Hi,

This has been confirmed as a bug and will be fixed for the next version.

Thak you for the post.

nmax
06-26-2004, 06:08 AM
Try using ListBox & ListBox.SetItemText.