The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 object.addtext method
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

asp

USA
17 Posts

Posted - 05/02/2003 :  12:50:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
%B="aaa\bbb";
text.addtext (B);

does not add anything after "\".
Any help?

Mike Buess

USA
3037 Posts

Posted - 05/02/2003 :  1:49:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

\b is probably being interpreted as an escape sequence. Try this...

%B="aaa\\bbb"; // ie, use "\\" instead of "\"
text.addtext(B);

Mike Buess
Origin WebRing Member
Go to Top of Page

asp

USA
17 Posts

Posted - 05/02/2003 :  1:57:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry, my quwstion was not quite correct.
I am trying to put file's pathway into the text object. Something like
%B=FDLOG.path$; where FDLOG.path$ is "C:\AAA\BBB..."
text.addtext (B);
In this case only "C" is printed.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 05/02/2003 :  4:23:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This will work...

%B=fdlog.path$;
%B=\v(%B);
text.addText(B);

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/02/2003 4:23:43 PM
Go to Top of Page

rdremov

USA
28 Posts

Posted - 05/05/2003 :  1:00:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The best method to work with path in Origin7 is to use VERBATIM property.
text.verbatim = 1;
text.text$ = "c:\mypath\";

Verbatim property will ignore all escapes (similar to \v(...) escape) and treat the text as is without any additionals like escape itself.
This will ensure that path is ok both when displayed or accessed.

Thanks,
Roman.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000