From: J. T. S. <mai...@ja...> - 2008-07-14 15:04:59
|
Hi Guys, BTW, if you want to discuss TCL/TK Cocoa Ports and related, feel free to use: sla...@at... (obviously remove the _NOSPAM) I have my Blackberry with me all the time, but not always at my computer to answer. Please just relevant TCL/TK Port items. Sometimes I dont check mailing lists for days. -Jason On Jul 14, 2008, at 7:54 AM, J. Todd Slack wrote: > Hi Guys, > > kevin is correct, things have been a little busy for me, but I am > making progress on the port. @ of my projects come to finish early > next week, so I will have a lot more time. . > > I am working on an xCode/IB set of plugins for creating TCL/TK apps > inside of XCode. It is a wizard type plugin that allows you to develop > inside of Apple's tools. It will setup everything you need and create > the build phases, targets, etc. I thought about xCode and IB and > ActiveState products like Komodo and TCL Dev kit and just thought the > effort is worth it to just use the tools Apple provides to develop > your apps. I live inside of XCode and IB and I guess at this point I > dont like other tools. They are slow and dont conform to the way I > expect an Apple Application to work. > > The port to Cocoa has gone slow as I had a few projects to finish, so > I start the plugins (easier to focus on when only having a few hours a > day). I will be able to focus more early next week. I made this > promise to complete this work and I have every intention of living up > to my promise. > > What I really need is a website. > > Does anyone have a nice attractive Website that I can start from? I > really like something like: http://madebysofa.com/ > It is clean and simple and I like when you click on the column what it > does. > > Can anyone help? It would make providing updates easier. > > -Jason > > > On Jul 10, 2008, at 8:19 AM, Kevin Walzer wrote: > >> Hi Torsten, >> >>> having not heard any progress on this front (Jason: how is it going? >>> Something to show already?), >> >> It's not clear what progress, if any, Jason has made. I know he's >> busy >> with a lot of projects (he's a self-employed developer) so perhaps he >> hasn't had time to get very far. Given the community's interest, >> however, some update would be most welcome. >> >>> I did a little research on this matter. >>> What would it need to build the most simple Cocoa application, that >>> is Tcl-enabled (has access to Tcl library functions and >>> interpreter). >>> I looked around and found this: >>> >>> #import <Cocoa/Cocoa.h> >>> #include <tcl.h> >>> >>> int main_simple(int argc, char *argv[]) { >>> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >>> >>> [NSApplication sharedApplication]; >>> int style = NSClosableWindowMask | NSResizableWindowMask | >>> NSTexturedBackgroundWindowMask | NSTitledWindowMask | >>> NSMiniaturizableWindowMask; >>> NSWindow *win = [[NSWindow alloc] initWithContentRect:NSMakeRect >>> (50, 50, 600, 400) >>> styleMask:style >>> backing:NSBackingStoreBuffered >>> defer:NO]; >>> [win makeKeyAndOrderFront:win]; >>> [NSApp run]; >>> >>> [pool release]; >>> } >>> >>> This can be put into a file named test.m and compiled with >>> >>> gcc test.m -o test -lobjc -Wno-import -framework Cocoa >>> >>> and then run with >>> >>> ./test >>> >>> from the command line. >> >> I couldn't get your sample to compile as presented: gcc complained >> about >> "undefined symbols: _main". I changed the function name from >> main_simple >> to main and it compiled and ran fine. >> >> >>> But the resulting application does not have a >>> menu bar and it is nearly impossible to interact with. This means, a >>> lot of the default behaviour supplied by making a simple program in >>> XCode, is missing here. And this brings me to the point. >>> >>> Until now, I have built Tcl/Tk for Aqua using the command 'make' as >>> described in the manual inside the Tcl/Tk distribution. Now it >>> seems, >>> that Cocoa is inherently tied to XCode, making it impossible to >>> build >>> a future TkCocoa from the command line. Is this correct? >> >> No, I don't think that's correct. What you have here is a simple >> function that draws a window, nothing more. There's no menu because >> you >> haven't specified any menu in the code above. And the window is hard >> to >> interact with because (I suspect) it isn't being run from inside an >> application bundle. >> >>> >>> If correct, this would imply, that TkCocoa is dependent on XCode, it >>> would no longer be a bunch of source code files readable and >>> understandable by anyone looking inside, but would require having >>> some NIB and other files and a lot of "under cover" logic and magic >>> done by XCode. >>> >>> Any insight on this? >> >> Xcode is just a Cocoa front end to gcc, gdb and other CLI tools, >> with a >> decent text editor and project-organizing tools wrapped within. >> Interface Builder (which designs the nib files/UI) just assembles >> pickled/serialized Cocoa/Objective-C objects in a visual fashion; >> these >> are "unarchived" at runtime by the compiled app. In other words, >> while >> the visual tools provide a lot of convenience, there is no magic to >> them. According to more seasoned Cocoa developers, anything that can >> be >> done in a nib file can also be done in code--it just requires a lot >> of >> code, since you are interacting with the Cocoa frameworks at a lower >> level. As a result, hardly any Cocoa developers work this way, and >> they >> are not encouraged to work at a low level; there isn't a lot of >> material >> out there showing how to do basic things like draw a window with a >> simple menu and a button that displays "hello world" dialog, in >> plain code. >> >> A Cocoa port of Tk, however, would need to specify nearly everything >> in >> code--all the C code that currently draws windows, menus, buttons, >> etc. >> using Carbon API's would have to be re-implemented as Objective-C >> code >> calling Cocoa API's. As Randall pointed out, this is how the Gtk-OSX >> developers are porting Gtk to run under Aqua; this is also how the Qt >> and wxWidgets developers are doing things (although they are probably >> using a lot of C++, which a Tk-Cocoa port wouldn't do). The Qt port >> to >> Cocoa does use a nib file in a basic way (see >> http://labs.trolltech.com/blogs/2008/03/03/qtmac-cocoa-port-alpha-released/) >> , >> but that's just a stub to hook into the windowing system and is >> tucked >> away inside the framework bundle--hence developers using Qt wouldn't >> need to worry about it. >> >> I appreciate the code sample you've assembled here: it's stimulated a >> lot of thought on my part. I'm in the process of learning Cocoa (and >> developing a Cocoa application), not so much to become a Cocoa >> developer, but to contribute in some way to the Tk-Cocoa port. I'm >> estimating about a six-month learning curve before I'd be prepared in >> any way to assist with the project, but once there, I'd be eager to >> help, either with Jason's project or a different undertaking if his >> project doesn't move forward. >> >> Is anyone else willing to pitch in with this? I'm sure Jason would be >> glad to have more folks contributing. This project is extremely >> important for the future of Tk on OS X--I for one do not want to be >> limited to using X11 Tk in a few years! Unfortunately, Daniel Steffen >> has already said he does not have the time to do more than consult on >> the port--so I really think it's up to the community. I know there's >> enough expertise here to make it work, and we can't just wait for one >> person to step forward and do the port. Let's see if we can get >> moving >> and get a port together in 12-18 months! >> >> Looking forward to others' viewpoints, >> Kevin >> >> -- >> Kevin Walzer >> Code by Kevin >> http://www.codebykevin.com >> >> ------------------------------------------------------------------------- >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >> Studies have shown that voting for your favorite open source project, >> along with a healthy diet, reduces your potential for chronic >> lameness >> and boredom. Vote Now at http://www.sourceforge.net/community/cca08 >> _______________________________________________ >> Tcl-mac mailing list >> tc...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-mac > > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Tcl-mac mailing list > tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac |