Path: utzoo!attcan!uunet!clyde.concordia.ca!altitude!pascal From: pascal@CAM.ORG (Pascal Gosselin) Newsgroups: comp.sys.mac.misc Subject: Re: NeXT Mach (was Re: UNIX is yuck (was Re: Next intro...) Message-ID: <1990Oct29.231127.3763@CAM.ORG> Date: 29 Oct 90 23:11:27 GMT References: <1990Oct6.172357.18366@smsc.sony.com> <1990Oct8.091751.3053@csc.anu.oz.au> <4b5vB5e00UhBA=gi8V@andrew.cmu.edu> <1990Oct15.224912.26056@eng.umd.edu> <21288@well.sf.ca.us> <1990Oct22.213553.20022@Neon.Stanford.EDU> <90301.081741KPURCELL@LIVERPOOL.AC.U Organization: None Lines: 90 KPURCELL@LIVERPOOL.AC.UK writes: >In article <1990Oct22.213553.20022@Neon.Stanford.EDU>, >philip@pescadero.Stanford.EDU (Philip Machanick) says: >> >>In article <21288@well.sf.ca.us>, loca@well.sf.ca.us (John Hoag) writes: >>|> > With Think C or MPW 2.02, it isn't hard at all. >>|> >>|> ...once you've written a few hundred lines of environment-handling code >>|> in preparation for printing "Hello World." >>The Mac may be a lot more difficult to program than it needs to be, but let's >>stick to the facts. I don't know about Think C or MPW, but this statement >>implies that there is no way of writing trivial programs on the Mac. In THINK >>Pascal, you can use ordinary ANSI-Pascal IO. Here's your "Hello World" >>program: >> >>program hello; >>begin >> showtext; >> writeln('hello world'); >>end. >> >>(you may want to add a readln to the end to stop the window disappearing until >>RETURN is typed). And you _do not_ have to write hundresd of lines to do the >>same in a dialog box. Of course, once you get into non-trivial programs, >>things >>aren't too pretty. >>-- >>Philip Machanick >>philip@pescadero.stanford.edu >Strange as it may seem I wrote almost this program this even to see if >I could still remeber how to do Pascal I/O on the Mac. Of course I >fluffed it and forgot the showtext() call. These macs they force >you to do all sorts of unatural things just to get stuff on the screen :-) >BTW (the serious bit) some folks have said use MacApp or Think Class >Libraries to 'object-orientate' your way around the difficulties with a >Mac. Well this doesn't work because you still have to know IM from >top to bottom and (in the case of TCL) you have to keep 4 different >hierarchies in you head at the same time (I still don't understand >that, and I ain't an idiot!). I know OOP ideas are worthwhile, but >trying to learn the Mac and a new system of programming at the same >time is just too much. >The simplest solution I've found is to use TransSkel (and TransEdit and >TransDisplay). They take all the donkey work out of building simiple >applications, you can write a 20 line application, to do Hello World >and it will automatically cope with the Apple menu and DAs and moving >windows and ....... You get the drift. >Availible for both THINK C and Pascal from indri.primate.wisc.edu. >Kevin Purcell | kpurcell@liverpool.ac.uk >Surface Science, | >Liverpool University | Programming the Macintosh is easy if you understand >Liverpool L69 3BX | how the Mac works and hard if you don't. -- Dan Allen I am presently writing ultra-simple front ends to 'standard' Pascal and C applications with the help of PROTOTYPER. Prototyper lets you design the Mac user interface, and it generates the code for you (the skeleton (event loop), one 'Unit' per window/dialog, etc... and all the resources too). I simply look at the code produced, add whatever I need to get the user's input into MY routines... Voila! Instant Mac applications !!! Now, this may sound easy, but it won't let you exactly write Mac Write II in a few hours.... It has (I have version 2.1) no code to handle scrolling, 'File' dialogs and (the biggest problem) no code to handle printing (another seemingly impossible thing to do on a Mac !!!). Of course, there's presently NO WAY you can sanely write a Mac application without Inside Macintosh I-III (bare minimum). And if you HAVE to use MPW (I don't have a choice, due to the need for shared libraries in the C code that I use), now that's another not-so-obvious package to learn ( THANK GOD FOR COMMANDO DIALOGS, I would have gotten nowhere without these!!!). Think C/Pascal users have it easy, trust me. The NeXT interface builder and associated dev. tools seem to be the real future when it come to developing "hybrid" apps. -- +----------------------------------------------------------------------------+ | Pascal Gosselin | Internet: Pascal@cam.org Applelink: CDA0585 | | Gest-Mac Inc. Apple VAR | Voice (514) 767-4444 Fax (514) 767-7337 | +----------------------------------------------------------------------------+