Calling WinView using file associations 
Author Message
 Calling WinView using file associations

I have previously posted questions about being able to click on a file
name with a .F extension (say from the Windows Explorer) and have the
Winview editor come up with the specified file loaded.  I discovered
an important clue in that the usual file association method works in
this case, as long as the path to the .F file does NOT contain folders
with SPACES in the name.  The problem appears to be within WinView,
especially in the function command-options .  Command-options makes
use of the somewhat overused phrase:

     bl WORD

This is applied to the command line which is passed to WinView from
the operating system.  I do not know the details of the line, but it
almost certainly includes the path with the possible embedded spaces.
The parsing of word will stop at the space and thus give the wrong
file name to WinView.  Presumably a similiar problem will happen if
the file name in question also has embedded spaces.

The total cure is not obvious (to me) at the present time since Tom
Zimmer allows a number of additional arguments both before and after
the file name.  Perhaps Tom will see this message and suggest a cure.

Bob



Sat, 03 Jul 2004 11:54:57 GMT  
 Calling WinView using file associations



Quote:
> I have previously posted questions about being able to click on a file
> name with a .F extension (say from the Windows Explorer) and have the
> Winview editor come up with the specified file loaded.  I discovered
> an important clue in that the usual file association method works in
> this case, as long as the path to the .F file does NOT contain folders
> with SPACES in the name.

I had the same problem when I was writing Playsnd
Here is how I resolved the problem in Playsnd:

\ In w98 a file-name is NOT between 2 quotes.
\ In w2k a file-name may be between 2 quotes.

\ unquote removes them when there are 2 quotes and
\ replaces the last one by a 0.

: unquote ( a - a1 )

     if   1+ dup maxstring  ascii " scan drop 0 swap c!   then ;

: play-sound  ( - )
    cmdline drop unquote sounds bye ;

\s Jos



Sat, 03 Jul 2004 16:54:53 GMT  
 Calling WinView using file associations
Bob,

Get the latest version of Win32Forth and if nothing else recompile vinview again
(my version is WV.exe). Tom has implemented some changes with appropriate
suggestions from certain knowledgable persons to fix that particular problem.

Quote:

> I have previously posted questions about being able to click on a file
> name with a .F extension (say from the Windows Explorer) and have the
> Winview editor come up with the specified file loaded.  I discovered
> an important clue in that the usual file association method works in
> this case, as long as the path to the .F file does NOT contain folders
> with SPACES in the name.  The problem appears to be within WinView,
> especially in the function command-options .  Command-options makes
> use of the somewhat overused phrase:

>      bl WORD

> This is applied to the command line which is passed to WinView from
> the operating system.  I do not know the details of the line, but it
> almost certainly includes the path with the possible embedded spaces.
> The parsing of word will stop at the space and thus give the wrong
> file name to WinView.  Presumably a similiar problem will happen if
> the file name in question also has embedded spaces.

> The total cure is not obvious (to me) at the present time since Tom
> Zimmer allows a number of additional arguments both before and after
> the file name.  Perhaps Tom will see this message and suggest a cure.

> Bob

regards
--
Bruce Rennie ( from God's Own Country Downunder )
Disciple of Jesus Christ in Training

The Cross of Jesus Christ - Salvation for all men.

Song of Solomon ( Song of Songs ) - The greatest Love Story Ever
and a story for our times.

Be a GOD Chaser.



Sat, 03 Jul 2004 18:39:59 GMT  
 Calling WinView using file associations
Hello Bob,

I am working under Windows2000, so this may not work for you, but here is
what I did.

The latest version of Win32Forth and WinView has a word /PARSE-WORD, which
was added in July 2001, and allows words to be parsed out that contain
spaces.  So, if filenames passed to WinView on the command line are
surrounded by quotes, then they will be opened properly.  I added a .F
type to Windows2000 file types, that invokes WinView, and when I double
click on a file in a directory that has a space in it, like "\my
documents\words.f", it opens properly.

Again, I want to reiterate, that it already works, you just have to
surround filenames containing spaces with quotes.

Good luck,

Tom

Quote:

> I have previously posted questions about being able to click on a file
> name with a .F extension (say from the Windows Explorer) and have the
> Winview editor come up with the specified file loaded.  I discovered
> an important clue in that the usual file association method works in
> this case, as long as the path to the .F file does NOT contain folders
> with SPACES in the name.  The problem appears to be within WinView,
> especially in the function command-options .  Command-options makes
> use of the somewhat overused phrase:

>      bl WORD

> This is applied to the command line which is passed to WinView from
> the operating system.  I do not know the details of the line, but it
> almost certainly includes the path with the possible embedded spaces.
> The parsing of word will stop at the space and thus give the wrong
> file name to WinView.  Presumably a similiar problem will happen if
> the file name in question also has embedded spaces.

> The total cure is not obvious (to me) at the present time since Tom
> Zimmer allows a number of additional arguments both before and after
> the file name.  Perhaps Tom will see this message and suggest a cure.

> Bob



Sat, 03 Jul 2004 23:39:59 GMT  
 Calling WinView using file associations
Hello Tom,

I didn't know about the newest version of Win32Forth and WinView.  I
downloaded it with great anticipation.  Unfortunately, the newest
version did not work on my system (Windows-98, Second Edition).  I
will attempt to continue work on the problem.  It looks a little
tricky to use the standard debugging technics on this problem.  As
another writer pointed out, the variations on what is done on the
different Windoze systems can be very difficult to deal with, to say
the least :-(

Bob

Quote:

> Hello Bob,

> I am working under Windows2000, so this may not work for you, but here is
> what I did.

> The latest version of Win32Forth and WinView has a word /PARSE-WORD, which
> was added in July 2001, and allows words to be parsed out that contain
> spaces.  So, if filenames passed to WinView on the command line are
> surrounded by quotes, then they will be opened properly.  I added a .F
> type to Windows2000 file types, that invokes WinView, and when I double
> click on a file in a directory that has a space in it, like "\my
> documents\words.f", it opens properly.

> Again, I want to reiterate, that it already works, you just have to
> surround filenames containing spaces with quotes.

> Good luck,

> Tom


> > I have previously posted questions about being able to click on a file
> > name with a .F extension (say from the Windows Explorer) and have the
> > Winview editor come up with the specified file loaded.  I discovered
> > an important clue in that the usual file association method works in
> > this case, as long as the path to the .F file does NOT contain folders
> > with SPACES in the name.  The problem appears to be within WinView,
> > especially in the function command-options .  Command-options makes
> > use of the somewhat overused phrase:

> >      bl WORD

> > This is applied to the command line which is passed to WinView from
> > the operating system.  I do not know the details of the line, but it
> > almost certainly includes the path with the possible embedded spaces.
> > The parsing of word will stop at the space and thus give the wrong
> > file name to WinView.  Presumably a similiar problem will happen if
> > the file name in question also has embedded spaces.

> > The total cure is not obvious (to me) at the present time since Tom
> > Zimmer allows a number of additional arguments both before and after
> > the file name.  Perhaps Tom will see this message and suggest a cure.

> > Bob



Sun, 04 Jul 2004 12:21:49 GMT  
 Calling WinView using file associations
Tom,

Well, as you said, "this may not work for you", and it did NOT!
I am using Windows-98 Second Edition.  Jos noted that there was a
difference.  It looks like the correct file name is being passed to
the function open-initial-file (with no quote marks at that point, in
my case), but the additional parsing in open-initial-file drops the
information after the space in the file name.  Work continues ....

Bob

Quote:

> Hello Bob,

> I am working under Windows2000, so this may not work for you, but here is
> what I did.

> The latest version of Win32Forth and WinView has a word /PARSE-WORD, which
> was added in July 2001, and allows words to be parsed out that contain
> spaces.  So, if filenames passed to WinView on the command line are
> surrounded by quotes, then they will be opened properly.  I added a .F
> type to Windows2000 file types, that invokes WinView, and when I double
> click on a file in a directory that has a space in it, like "\my
> documents\words.f", it opens properly.

> Again, I want to reiterate, that it already works, you just have to
> surround filenames containing spaces with quotes.

> Good luck,

> Tom


> > I have previously posted questions about being able to click on a file
> > name with a .F extension (say from the Windows Explorer) and have the
> > Winview editor come up with the specified file loaded.  I discovered
> > an important clue in that the usual file association method works in
> > this case, as long as the path to the .F file does NOT contain folders
> > with SPACES in the name.  The problem appears to be within WinView,
> > especially in the function command-options .  Command-options makes
> > use of the somewhat overused phrase:

> >      bl WORD

> > This is applied to the command line which is passed to WinView from
> > the operating system.  I do not know the details of the line, but it
> > almost certainly includes the path with the possible embedded spaces.
> > The parsing of word will stop at the space and thus give the wrong
> > file name to WinView.  Presumably a similiar problem will happen if
> > the file name in question also has embedded spaces.

> > The total cure is not obvious (to me) at the present time since Tom
> > Zimmer allows a number of additional arguments both before and after
> > the file name.  Perhaps Tom will see this message and suggest a cure.

> > Bob



Sun, 04 Jul 2004 23:54:09 GMT  
 Calling WinView using file associations
Finally success!

It turns out that the WinView.exe file delivered with Tom's latest
Win32Forth system does NOT work correctly with paths with sapces.
HOWEVER, if you merely re-compile WinView.f, and note that the file
generated is WV.exe , then WV appears to work correctly.  I might note
an absolutely trivial thing with either WinView or WV is that the
title says "WinViewX".  That was a result of some of my prior changes
where I added the "X" so I could tell whether I was working with a new
version of WinView or the old version.

Bob

Quote:

> Hello Bob,

> I am working under Windows2000, so this may not work for you, but here is
> what I did.

> The latest version of Win32Forth and WinView has a word /PARSE-WORD, which
> was added in July 2001, and allows words to be parsed out that contain
> spaces.  So, if filenames passed to WinView on the command line are
> surrounded by quotes, then they will be opened properly.  I added a .F
> type to Windows2000 file types, that invokes WinView, and when I double
> click on a file in a directory that has a space in it, like "\my
> documents\words.f", it opens properly.

> Again, I want to reiterate, that it already works, you just have to
> surround filenames containing spaces with quotes.

> Good luck,

> Tom


> > I have previously posted questions about being able to click on a file
> > name with a .F extension (say from the Windows Explorer) and have the
> > Winview editor come up with the specified file loaded.  I discovered
> > an important clue in that the usual file association method works in
> > this case, as long as the path to the .F file does NOT contain folders
> > with SPACES in the name.  The problem appears to be within WinView,
> > especially in the function command-options .  Command-options makes
> > use of the somewhat overused phrase:

> >      bl WORD

> > This is applied to the command line which is passed to WinView from
> > the operating system.  I do not know the details of the line, but it
> > almost certainly includes the path with the possible embedded spaces.
> > The parsing of word will stop at the space and thus give the wrong
> > file name to WinView.  Presumably a similiar problem will happen if
> > the file name in question also has embedded spaces.

> > The total cure is not obvious (to me) at the present time since Tom
> > Zimmer allows a number of additional arguments both before and after
> > the file name.  Perhaps Tom will see this message and suggest a cure.

> > Bob



Mon, 05 Jul 2004 01:26:43 GMT  
 Calling WinView using file associations
Hello Bob,

I'm glad you got it to work.  The WV thing, is a mistake I made, during debugging.  I forgot to remove the
WV line at the end of WinView.F, and reinstate the WinView line at the end of WinView.F.

Sorry about that,

Tom

Quote:

> Finally success!

> It turns out that the WinView.exe file delivered with Tom's latest
> Win32Forth system does NOT work correctly with paths with sapces.
> HOWEVER, if you merely re-compile WinView.f, and note that the file
> generated is WV.exe , then WV appears to work correctly.  I might note
> an absolutely trivial thing with either WinView or WV is that the
> title says "WinViewX".  That was a result of some of my prior changes
> where I added the "X" so I could tell whether I was working with a new
> version of WinView or the old version.

> Bob


> > Hello Bob,

> > I am working under Windows2000, so this may not work for you, but here is
> > what I did.

> > The latest version of Win32Forth and WinView has a word /PARSE-WORD, which
> > was added in July 2001, and allows words to be parsed out that contain
> > spaces.  So, if filenames passed to WinView on the command line are
> > surrounded by quotes, then they will be opened properly.  I added a .F
> > type to Windows2000 file types, that invokes WinView, and when I double
> > click on a file in a directory that has a space in it, like "\my
> > documents\words.f", it opens properly.

> > Again, I want to reiterate, that it already works, you just have to
> > surround filenames containing spaces with quotes.

> > Good luck,

> > Tom


> > > I have previously posted questions about being able to click on a file
> > > name with a .F extension (say from the Windows Explorer) and have the
> > > Winview editor come up with the specified file loaded.  I discovered
> > > an important clue in that the usual file association method works in
> > > this case, as long as the path to the .F file does NOT contain folders
> > > with SPACES in the name.  The problem appears to be within WinView,
> > > especially in the function command-options .  Command-options makes
> > > use of the somewhat overused phrase:

> > >      bl WORD

> > > This is applied to the command line which is passed to WinView from
> > > the operating system.  I do not know the details of the line, but it
> > > almost certainly includes the path with the possible embedded spaces.
> > > The parsing of word will stop at the space and thus give the wrong
> > > file name to WinView.  Presumably a similiar problem will happen if
> > > the file name in question also has embedded spaces.

> > > The total cure is not obvious (to me) at the present time since Tom
> > > Zimmer allows a number of additional arguments both before and after
> > > the file name.  Perhaps Tom will see this message and suggest a cure.

> > > Bob



Mon, 05 Jul 2004 06:01:23 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Is partial named association in subprogram calls allowed?

2. VAST: launching a url by file association in runtime

3. File Association

4. Question: File Association

5. running files from associations?

6. index file association

7. Register a File Association ..

8. g77: association of LUN with a file?

9. Win95(9x/NT?) file extension / association tricks

10. file type & WinDoze association

11. Setting File Associations

12. file association manipulation for Windows?

 

 
Powered by phpBB® Forum Software