mneerach@inf.ethz.ch (Matthias Ulrich Neeracher) (07/05/90)
About two months ago, I had to write a module for an existing application to do mailings of one page maximum. I thought this was one problem where styled TextEdit would do the job. The only problem was that I needed tabs, but there was this new & improved Tech Note explaining all the hooks that TextEdit called to draw text, hit test it, measure text lengths. All I had to do was overriding these hooks. So I wrote the thing. No problem, until we tried to run it on my boss' new & improved Mac IIci (System 6.0.4). It looked *very* weird ! We found out that the ci ROM called the hooks with parameters that were not conforming to the documentation and to the other Mac's behaviour. But soon, there appeared a message saying Apple fixed TextEdit in their new & improved System 6.0.5. We installed 6.0.5 on our machines. It fixed the original problem, but Surprise!, 6.0.5 on some occasions doesn't call the necessary hooks at all, but figures widths out by itself and in our case, of course, wrong. And if Apple does a job, it does it well: This new bug appeared compatibly on all Macs. We reported this to DTS. One week later, we recieved a very nice reply which upset me deeply. I don't have this reply by hand, but it contained about the following: - We know about this problem (how comforting !) - We don't know whether we should fix it because: - There are too many places in our code that would have to be fixed (This gives rise to a new law: If a bug appears in Apple Code at more than n places, it shall be a feature) - Calling {Pixel2Char, TextWidth} directly is faster than hooking it out (Oooh ! Must be some pretty recent research result !) - TextEdit was never intended to do things like this (Now here, they probably have a point, but if it doesn't even work for such a tiny little application, what can STYLED TextEdit really be used for ?) - We will fix it if enough developers need it. So I have two problems: - Write to your elected DTS representative how important this fix is for you. Or don't write. It is not really the problem of these 4 hooks that bothers me, but if Apple doesn't care anymore to maintain compatibility to things that were documented not so long ago and once were implemented as documented, I wonder what they might do next. "As of System 6.0.6, the Resource Manager, a relict from 64K ROM days, isn't implemented anymore ?!" - For the aforementioned project, I need a replacement for TextEdit. I hope I don't post this on the wrong newsgroup. Requirements are: - About the same functionality as Styled TextEdit plus left-justified tabulators or the possibility to roll your own. Tabulators need to be set freely, not just regularly spaced (MacWrite, not MPW). - Source or object code form for MPW Pascal, Assembler of C(++). If you know of any such product, please let me know by email. I think this has been discussed not so long ago, but I missed it that time. Any help would be MUCH appreciated. Matthias P.S.: I didn't intend to insult anybody with this posting, especially not DTS.