|Newbie questions about Pliant
"listing" instruction and string variables
Listing is a usefull instruction when text is physicaly present,
but how to do with String
|Message posted by michel on 2005/06/13 08:20:37
|When you want to display a text with indentation and with attributes (bold or italic),
you can do it with a "listing" instruction, but how can you do the same if text is contained in a file or in a serie of String variables ?
|Message posted by hubert.tonneau on 2005/06/13 09:05:32
|You need to write your own function that will read each line, find and
replace all control characters to HTML equivalent.
So, you fall on the problem: how can the end user simply generate such files.
Three possible answers:
. either you define your own set of control characters that are easy to type
along, but will be non standard so no so good on the long run (this is what
. or they use any tool and upload an HTML file, and what your code will
de is just remove the head and tail of the file (just keep what is inside
<body> and </body>)
. or you need the Pliant browser, which is currently still not available (sorry
If you want to reuse listing encoding, you can do something like (untested):
var List:Str text
text += "first line with ¤bold attribute"
text += "second line"
|Message posted by michel on 2005/06/13 10:50:02
|The least solution is exactly what I need and run perfectly.