Mail Archives: cygwin/2001/07/26/07:38:03
Not a bug in scriptics tcl/tk 8.0 sorry.
In the file generic\tclFileName.c the function Tcl_TranslateFileName
has the following code which is causing the problem.
/*
* Convert forward slashes to backslashes in Windows paths because
* some system interfaces don't accept forward slashes.
*/
#ifndef __CYGWIN__
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) {
if (*p == '/') {
*p = '\\';
}
}
}
#endif
I guess the above is needed in cygwin, but GetOpenFileName expects a
windows path, so as a work around put the following changes in tkWinDialog.c
667a668,670
> #ifdef __CYGWIN__
> strcpy((char*)ofnPtr->lpstrInitialDir, argv[v]);
> #endif
Clive Mayo
----- Original Message -----
From: "Mike Henninger" <freshyq314 AT yahoo DOT com>
To: "Clive Mayo" <cm AT ttl-3d DOT co DOT uk>
Sent: Tuesday, July 24, 2001 7:58 PM
Subject: Re: file dialog boxes with cygwish80
> I hate to be a pain on what *must* be an easy
> solution, but where is 8.2/8.3 availible for cygwin?
> I used cygwin setup to get the latest tcl/tk version
> (for cygwin) yesterday, and it gave me 8.0.4. Looked
> at contrib directory and didn't find any TCL/TK there.
> I also searched google and got nothing of interest,
> either.
>
> Mike
>
> --- Clive Mayo <cm AT ttl-3d DOT co DOT uk> wrote:
> > Hi Mike
> >
> > Look's like a bug in 8.0, works fine on 8.2 & 8.3
> > Would it be possible to bring tcl/tk up to the
> > current release ?
> >
> > Clive Mayo
> >
> > ----- Original Message -----
> > From: "Mike Henninger" <freshyq314 AT yahoo DOT com>
> > To: <cygwin AT cygwin DOT com>
> > Sent: Monday, July 23, 2001 9:45 PM
> > Subject: file dialog boxes with cygwish80
> >
> >
> > > I am using tk_getOpenFile to grab a file name. I
> > am
> > > using variables to define the -filetypes, -title,
> > and
> > > -initialdir. These all work, except -initialdir,
> > > which goes to the pwd no matter what the contents
> > of
> > > the variable. From there one can navigate and get
> > to
> > > any directory just fine.
> > >
> > > For -initialdir I have tried absolute posix paths,
> > > absolute windows paths, relative pathes of both
> > kinds,
> > > but the only things that will work are ./ and ../
> > Is
> > > this related to the posix path problems that have
> > been
> > > discussed elsewhere on this list? Is there a
> > > workaround?
> > >
> > > cygwin dll 1.3.2-1
> > > cygwish80 8.0.4
> > > xfree86 4.0.3
> > >
> > > thanks,
> > > Mike Henninger
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make international calls for as low as $.04/minute
> > with Yahoo! Messenger
> > > http://phonecard.yahoo.com/
> > >
> > > --
> > > Unsubscribe info:
> > http://cygwin.com/ml/#unsubscribe-simple
> > > Bug reporting: http://cygwin.com/bugs.html
> > > Documentation: http://cygwin.com/docs.html
> > > FAQ: http://cygwin.com/faq/
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -