RTF files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RTF files

Louis Sumberg-2
Can rtf files be opened as rtf?  I have most of my workspaces saved in
rtf format.  Opening them shows all the rich text format codes which
makes it a challenge to read them or evaluate the Smalltalk code.  (I
realize one workaround is to open them in D5 and save as .st.)

-- Louis


Reply | Threaded
Open this post in threaded view
|

Re: RTF files

Blair McGlashan
"Louis Sumberg" <[hidden email]> wrote in message
news:[hidden email]...
> Can rtf files be opened as rtf?  I have most of my workspaces saved in rtf
> format.  Opening them shows all the rich text format codes which makes it
> a challenge to read them or evaluate the Smalltalk code.  (I realize one
> workaround is to open them in D5 and save as .st.)

There was a point in time when the D6 File/Open command would open an RTF
file, but all it did was open it in a "Wordpad" instance (not the real
Wordpad, but a simplified Dolphin sample). However the resulting window had
no workspace functionality, so it wasn't very useful. You can still open up
the Wordpad sample to open RTF files if you want to (its in the Sample
Applications folder), but you will need to copy and paste any expressions
out into a proper workspace and then resave as .st. Or you could write an
expression to translate all your expressions automatically - if you load the
rtf files into RichText instances then you can use #asString to strip out
all the formatting and get plain text that you can then save down into a .st
file.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: RTF files

Ian Bartholomew-20
Blair,

>                 You can still open up the Wordpad sample to open RTF files
> if you want to (its in the Sample Applications folder),

Doesn't appear to be there in Beta1 - just NotePad (aMultilineTextEdit) and
XMLPad (a ScintillaView).

The funny thing is that the "IDB Printer" goodies package I just uploaded
includes a class called Wordpad that I needed for testing the RichTextEdit
printing.  I'll remove it if it's going to clash (it's only got two
methods).

Whilst we are on the subject.  Is it possible to use a ScintillaView in the
same way that you could a RichTextEdit - i.e. select some text and format
the selection with a different font/colour etc.  I've had a couple of quick
looks but I am having a bit of trouble getting past the first hurdles in
Scintilla.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: RTF files

Blair McGlashan
"Ian Bartholomew" <[hidden email]> wrote in message
news:[hidden email]...

> Blair,
>
>>                 You can still open up the Wordpad sample to open RTF
>> files
>> if you want to (its in the Sample Applications folder),
>
> Doesn't appear to be there in Beta1 - just NotePad (aMultilineTextEdit)
> and
> XMLPad (a ScintillaView).
>

Hmmm, sorry, a config issue that clearly needs fixing. In fact it seems that
when it was taken out of service for File/Open, it was removed from our
development image altogether. It will go back in (#1710). but in the
meantime I've attached it.

> The funny thing is that the "IDB Printer" goodies package I just uploaded
> includes a class called Wordpad that I needed for testing the RichTextEdit
> printing.  I'll remove it if it's going to clash (it's only got two
> methods).
>
> Whilst we are on the subject.  Is it possible to use a ScintillaView in
> the
> same way that you could a RichTextEdit - i.e. select some text and format
> the selection with a different font/colour etc.  I've had a couple of
> quick
> looks but I am having a bit of trouble getting past the first hurdles in
> Scintilla.

Its not really designed for that - primarily it is intended for situations
where the colour of text is something you can regenerate, rather than
something that is manually configured. However it can be used to apply
"externally" held styling information - take a look at the DiffPresenter for
an example. This is a modified version of your RTE original that uses
Scintilla. The diffs are held as ranges by the styler, so it simply applies
the pre-configured style ranges that correspond to the areas where there are
differences. I don't think this would work terribly well in an editor pane
though, since you'd have to adjust the stored ranges to account for changes
in the text, e.g. deleting characters before, or in, a styled range.For that
I'd suggest sticking to RTE.

Regards

Blair


begin 666 Wordpad.zip
M4$L#!!0````(`(22LS)'LC]KL1<``(].```+````5V]R9'!A9"YP86/L//MS
MVSAS/R<S^1_@9,9RVK.'[X=S=]_(DIQHZM=82M+K.=\WM C9;"B2):G8[MW]
M[]U=`'Q(E*TT3=H?&CL1"6 7B\6^@%WE3Y8%L\_!#6=_OGBN'@]_81?R,0D6
M_)#U/J9YF 5A[Z >E 7W'WA>1&ERR/0W+YX_NPZ*:#9(%PN>E `R3./L-DK8
M9!'$<1G$GYE$PB;!(HOY`7OQ?)!F#WET<UNRO=EK=G[][WQ6LGY>%NRD#']B
MAJ;9,..+YPHR*EC <AXN9SQD\V4R*V'Z(([*!Q8A3IPZP#:6SEEYRUE1!DD8
MY"$K'HJ2+]BRC&CTQ_/+X45_>##Z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`DHK?[0=[.4RY@*.GK8!J4X#!";>NJ;;
ML#V(XCP361]A0^EY99NPYP/9IHJ3KM:AXL8*]K4D.F&B2A[,V&#+HW&D@%^+
MP3JH&]/(%GWN.GU62W(JU7DTG#6EW=DF?#65];G8%+"VE8N$8QI<"][CPW^U
M<O4\#<- =$?B/R &)!;D..<D*PR(D:&,#(@R=&A3A,KOYSY\CNW:35JAJE*N
MKB]VE#CO[KWS\=2>[_A?\=2:PM3:S#<1]>SUA0Y6XW[S^;/PGA#*FOJF!#U1
MUJ\?Z_S2TPGBT=E6FXXA,6).7)\8+T9LY8K(F0@2X!.-@1I(POS1,V.2_V4,
M@*$=W'0]8F1^TP-5R;');W0`8T(KQ;6((=CDR4,_A+XX<Z :-S71,V7UO$E9
M*F,&-7'E<(0?Q!4MYJ[I0BMEM2A[IWW)5,^\O#I*W_E67#8=F'A4SND4?$%U
MZ,MFKZ,2<["0F$/LJI.P=+KN<I3'!K84&[!8O?=)'@QL&X!&2LH\>MTFY69@
M+4AS%;OJ9PZ;SGVG:AM-7=FV"P5G<O NSP%A4D:J#$8G*'O/1-YA5V,1WZ*6
M5.='Z@+>7LKK74:A[+;CKZINF7MF8N,A<(SYF9@;.R4)$(]B3/0CB=S611%
M*@DJZJQ%Y_6U^SYLZ,>*FJC>504P%[HHL:G1O+/-+98[/BE].,=18.O+HJX+
M-?"UCN%V^)>+<+:&?L9??+\N&^#UU>T3[TB6;L'S!U!+`0(4"Q0````(`(22
MLS)'LC]KL1<``(].```+``````````$`( ````````!7;W)D<&%D+G!A8U!+
4!08``````0`!`#D```#:%P``````
`
end


Reply | Threaded
Open this post in threaded view
|

Re: RTF files

Ian Bartholomew-20
Blair,

> . I don't think this would work terribly well in an editor pane though,
> since you'd have to adjust the stored ranges to account for changes in the
> text, e.g. deleting characters before, or in, a styled range.For that I'd
> suggest sticking to RTE.


OK, thanks.  That's roughly what I thought the situation was.

Ian