> From: On Behalf Of cgavin
> Sent: Monday, May 22, 2000 11:41 PM
>
> Yes, it should.
>
> Here are the problems that come with platform independence:
>
> - file pathnames are different; on Unix dirs are separated by slashes,
> on Windoze they are separated by slashes or backslashes, and on Mac
> dirs are separated by ":" or "::"
I am sure some of you have already found it, but I figured I would mention
the macFAQ
(see http://dev.scriptics.com/software/mac/macFAQ.html) I regret once again
to not be at my machine with TCL/TK/VTCL so forgive me if any of this is
already covered in existing code.
Aren't there some Tcl calls that isolate the program from this?
I am getting this from a book that covers up to tcl/tk 8.0 (although I would
have figured they would have improved on that in more recent versions)
> - the menu bar on Mac is always located at the top of the display, whereas
> on Windows/Unix the menu bar is attached to the window it is related to
See macFAQ http://dev.scriptics.com/software/mac/macFAQ.html#Q5.1
5.1. How do I install my own menus into the Macintosh Menubar?
5.2. How do I add pulldowns to a Macintosh Menubar?
5.3. Do I have to make a new menubar for each toplevel?
5.4. Can I install my own items in the Apple and Help menus?
5.5. Can I add Menus to the default Wish menu bar
> - Mac only has a one-button mouse; different bindings need to be set up
> to handle right button clicks and double clicks
Again I take from the macFAQ (see
http://dev.scriptics.com/software/mac/macFAQ.html#Q11.2)
11.2. I have some bindings in my code that rely on the other two mouse
buttons. How can I simulate these events
on the Mac
There are two ways to do this. The cleanest way to is to make a set of
abstract button events,
<<LeftMousePress>>, <<CenterMousePress>>, and <<RightMousePress>>, say,
and use these
everywhere in your code. Then somewhere at startup, use the "event add"
command to bind
<<LeftMousePress>> to ButtonPress-1, and on Unix bind
<<CenterMousePress>> to <ButtonPress-2>,
but on the Mac, bind it to <Control-ButtonPress-1>, or something else
that you are not using...
The second way is to dispatch your own ButtonPress-2,3 events, with
something like:
bind all <Control-ButtonPress-1> {event generate %W
<ButtonPress-2> \
-x %x -y %y -rootx %X -rooty %Y -button 2 -time %t}
You do have to populate all the detail fields of the event that you are
likely to use in your bindings, as this
example demonstrates.
> - the order in which mouse / focus in / focus out events occur might
> be different on the Mac
>
> - there are a few quirks with the way the wm command works on different
> platforms; I have noticed a few bugs on the Windows implementation of wm
> with Tcl/Tk 8.2 for example
>
> As it is right now vtcl 1.2.1 will probably not load on mac without
errors.
> To make paths platform independent there is a "file join" command to join
> directories; it is not used in the changes I made for vtcl 1.2.1. By
> making these changes vtcl 1.2.1 should work on Mac.
Say...
# generic path modelled after unix
set original_path "/Disk/System Folder/Extensions'
set platform_path [file split $original_path]
# I think dirname will return this correctly but
# you may need $platform_path I am not at my machine to test this
set dirname [file dirname $original_path]
set filename [file tail $original_path]
set file [file join $dirname $filename]
> vtcl 1.2.0 should be working on Mac, but I haven't been able to verify
> this.
>
> Christian Gavin
>
> Eric Bresie wrote:
> >
> > I am confused....shouldn't VTcl work on Mac? It is written in Tcl...or
are
> > there some platform dependent parts that make this not possible? I seem
to
> > recall there being some Platform/OS sections in VTcl...could these
possibly
> > be the cause? Could they perhaps be removed an fix the problem?
> >
> > Sorry don't have access to my machine with Vtcl, so I can't verify this
> > right now.
> >
> > Could this perhaps be a flaw in the implementation of TCL/TK on the Mac
> > platform?
> >
> > Eric Bresie
> > [EMAIL PROTECTED]
> >
> > > From: On Behalf Of cgavin
> > > Sent: Sunday, May 14, 2000 12:19 AM
> > >
> > > I would be interested to know if there is a strong interest in
> > > maintaining a Mac version of Visual Tcl.
> > >
> > > I have spent a moderate amount of time to maintain Windows
> > > compatibility for such topics as long filename support and
> > > differences in the window manager commands. There is no question of
> > > dropping Windows support of course, but I don't know how large the
> > > Tcl/Tk
> > > programmer community is on Macintosh.
> > >
> > > I have tried version vTcl 1.2.1 on an IMac system 8.6 with Tcl/Tk 8.3
> > > and
> > > visual Tcl just didn't start. Worse, it didn't display any error
> > > message on the command console and Tcl/Tk quit without further notice.
> > > I didn't have more time to figure out what was happening.
> > >
> > > Since I don't have tons of opportunities of using an IMac I was
> > > wondering
> > > if someone would be willing to investigate the problems with 1.2.1 on
> > > Macintosh and send me patches. Also, there would be a need for an
> > > installer
> > > on Mac, because I don't know if there is a free tool to untar/gz files
> > > (StuffIt expander requires a Deluxe version for tar/gz files).
> > >
> > > Any comments welcome
> > >
> > > Christian Gavin ([EMAIL PROTECTED])
Eric Bresie
[EMAIL PROTECTED]
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user