korn@ucbvax.BERKELEY.EDU (Peter "Arrgh" Korn) (11/06/85)
I have recently gotten an evaluation copy of TML Pascal, which, by the way, I think is a neat and useful product, with quite decent graphics speed (I haven't gotten around to running any of the standard speed tests, I just ported over the SpiroGraph program that comes with MacPascal, and ran it, and it ran pretty fast--don't tell you much, I know). Anyway, here's the problem: I'm trying to get this program of mine to run, and I need to use TextEdit. Trouble is, when I use the Lisa Pascal example code, or when I re-write friends' C code, the d*$n thing crashes (ID: 2, 3, 11, depending upon who's code I cribbed). Unfortunately, none of the example code that I got from TML included any TextEdit examples. Do any of you folks have any ideas (specifically those few of you who have used TML)? Below is an excerpt of the code: (the first 6 lines is how TML reads include files). {$i MemTypes.ipas} {$i QuickDraw.ipas} {$i OSIntf.ipas} {$i ToolIntf.ipas} {$i FixMath.ipas} {$i PackIntf.ipas} const Window_ID = 128 var theWindowRec : WindowRecord; theWindow, whichWindow : WindowPtr; dragRect, txRect : Rect; textH : TEHandle; . . . InitGraf(@thePort); . . TEinit; InitCursor; with screenBits.bounds do SetRect(dragRect, 4, 24, right-4, bottom-4); theWindow := GetNewWindow(window_ID, @theWindowRec, POINTER(-1)); SetPort(theWindow); txRect := thePort^.portRect; InsetRect(txRect, 4, 0); {--------bombs just after this next line-----} textH := TENew(txRect, txRect): Any ideas? Am I missing something? This code is taken DIRECTLY out of IM, road.map sample program. Also, in a (slightly) related issue, how do I get the apple symbol to appear w/out going to a resource menu? I can do it from C, but I'm of course, not programming in C? Also, I'm compiling a list of comments/suggestions/improvements I'm going to sent to TML. I'll be posting a copy of that here sometime this week, for those of you who are looking for a Pascal Compiler. I'll also hapily take any questions you have about it. --- --- /~^~\ /^^ || || --- Peter Korn |* *|----------\ /- ----- -/ = \ korn@Berkeley.LotsONets | | | | | | | | !ucbvax!korn ( = )_ ____ _/ \___________|\ /| \_/ || || ^^/ \___/ --- --- None of the above opinions/ideas/expressions/mannerisms/etc. are those of whoever I might supposedly be representing (except possibly myself, of course, and even then there's some room for doubt).