TextDocument bug?

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

TextDocument bug?

Bill Schwab
Hi Andy,

Here's a nice example of poor coverage analysis on my part.  One of the
small tools that I use intermittently is designed to keep me from shooting
myself in the foot with text editors<g>.  It appears that the last time I
used it was under 3.06, because it works there and not under 4.x.

The offending line boils down to this:

 TextDocument show
    filename:'c:\my documents\test.txt';
    fileRevert;
    yourself.

In 3.06, it works as expected; in 4.x, it warns of a change and then
regardless of the answer to the prompt, shows a blank shell.  Digging around
in 4.0, I found a shortcut (which is also available in 3.06, and perhaps
earlier versions too):

   TextDocument filename:'c:\my documents\test.txt'

It also works in 3.06.  In 4.x, it doesn't prompt, but, it similarly
displays a blank shell.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: TextDocument bug?

Ingo Blank
"Bill Schwab" <[hidden email]> schrieb im Newsbeitrag
news:9b9vns$ipt$[hidden email]...

> Hi Andy,
>
> Here's a nice example of poor coverage analysis on my part.  One of the
> small tools that I use intermittently is designed to keep me from shooting
> myself in the foot with text editors<g>.  It appears that the last time I
> used it was under 3.06, because it works there and not under 4.x.
>
> The offending line boils down to this:
>
>  TextDocument show
>     filename:'c:\my documents\test.txt';
>     fileRevert;
>     yourself.
>

Bill,

if you replace TextDocument with Notepad, it works.

ibl


Reply | Threaded
Open this post in threaded view
|

Re: TextDocument bug?

Bill Schwab
Ingo,

> if you replace TextDocument with Notepad, it works.

Thanks for a quick response with a workaround.  It looks like the problem
with TextDocument is a missing view resource??

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: TextDocument bug?

Blair McGlashan
Bill

You wrote in message news:9bb9j8$gvv$[hidden email]...
>
> > if you replace TextDocument with Notepad, it works.
>
> Thanks for a quick response with a workaround.  It looks like the problem
> with TextDocument is a missing view resource??

That's right. The TextDocument resources were deliberately removed (although
this was omitted from the 4.0 release notes) because the class is really an
abstract framework class, with Notepad as a useful concrete implementation.

Regards

Blair