Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tcl_platform as problems on MacOS X

Closed / Invalid634642ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-11-06 20:29:40
I don't seem to be able to use tcl_platform to distinguish between two important cases on MacOS X:
- tcl and Tk built for aqua (using the macosx directories)
- tcl and Tk built for regular unix and an X server (using the unix directories)
I've only tested the former case, but for it tcl_platform(platform) is "unix" (sure this is also true for tcl/tk built for regular unix) and tcl_platform(os) is "Darwin" (again I'm assuming, though less sure, that this remains true when built for regular unix).

The reason these cases are so important to me is due to a bug I just reported that lines are drawn offset relative to each other in these two cases. The nice way to work around that bug is to test for the platform and introduce the appropriate offset. Unfortunately, I've not been able to figure out how to do this for MacOS X.

I agree that "unix" is a good choice for platform when tcl/tk is built as regular unix (i.e. built to use an X server instead of to use native aqua), but I think "Macintosh" is more suitable when built for native aqua. Still, anything that will allow me to distinguish would be fine.
dasplain2002-11-07 11:29:30
Logged In: YES 
user_id=90580

the issue is that the distinction between aqua and x11 is not at 
the Tcl level but at the Tk level. The same Tcl can run with Tk 
built for aqua or withTk build for X11.
You can distinguish between the two via the new [tk 
windowingsystem] command, it returns "x11" for an X11 server, 
"aqua" for the native Mac OS X window manager, "win32" for 
Windows, and "classic" for Classic MacOS (c.f. TIP#108)
Log in (anonymous is fine) to add a comment.