From: Daniel A. S. <st...@ic...> - 2001-08-20 15:56:24
|
At 0:26 -0400 on 18/8/01, Roger & Michelle Scheen wrote: >Has anyone seriously looked at carbonizing wish? I presume there's >some way you could link in the Tcl 8.3 dynamic lib that's already a >part of MacOS X. Carbonizing Tk is in the works, I can't say much more for reasons that I can't go into publicly; no release date is available at this time. AquaTk will indeed link to the native MachO Tcl, that's the source of a number of highly nontrivial problems btw, the event loop interaction is completely different from MacTcl, look in the wiki for infos on Tcl event loop and win2k embedding for some hints on the kind of problems involved. you have to realize that unix tcl is very different from mac tcl in places, this introduces interesting problems e.g. where Tk source uses Carbon for file access and Tcl source uses POSIX api's for the same files... > Just out of curiosity, I ran Carbon Dater on Wish, and this is the >high-level summary (best viewed with courier font): > >Test Number > Analysis of Imports: >Supported API 242 >Supported with Modifications 5 >Supported But Not Recommended 22 >Unsupported API 50 > >To me, that doesn't sound too bad--the vast majority (75.9%) of the >calls are supported, and at most less than 25% will need >modification. the problem is first of all that 25% of all api calls is a LOT... furthermore the 25% only counts what API routines are ever called, not the number of actual calls made to these routines, it could very well be that 80% of all API calls have to be changed. Carbon Dater is not a terribly useful tool (and it's old, the latest version 1.3 was released in Jan 2000, Carbon has changed a LOT since then), trying to compile Tk with TARGET_API_MAC_CARBON turned on would give you a better idea about the number of problems involved. Tk mac code is sometimes crufty to say the least and rather old in a lot of places; classic macos code needs to use modern APIs to carbonize well, older code really should be modernized first before carbonizing... also a lot of the Tk widget/menu code plays interesting tricks e.g. with control drawing in offscreen bitmaps etc. that are difficult to reproduce with the new carbon control/menu managers (think e.g. throbbing buttons) Carbonizing non-trivial code like Tk that interacts with a large part of the system and its various API layers is really a lot harder than Apple makes it sound in some early docs; note that over 50% of OS sessions at this year's WWDC were on Carbon and new&modified APIs introduced with it, so carbonizing is very far from the simple API search and replace one might suspect when reading the Carbon Dater report. > The carbon dater report goes into details of what calls to swap >for what. To me, it sounds like a project that could I could do in >a few weekends by myself (less with help). Is there something I'm >missing here? Perhaps carbon dater didn't pick up dynamically >loaded Tk library? IIRC carbon dater doesn't look at included libraries like Tcl.shlb or Tk.shlb, if you run it on those, the picture may be different... > If not, it looks like nearly cake to convert Wish to carbon. If >anyone is interested in the details, I can post the Carbon Dater >report on my web site. a lot of people want Tk on Aqua, so if it were that easy it would be here... Cheers, Daniel -- ** Daniel A. Steffen ** "And now to something completely ** Department of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |