Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.hypercard Subject: Re: Problem running script with locked screen Message-ID: <8871@hoptoad.uucp> Date: 1 Nov 89 16:29:38 GMT References: <1649@gmdzi.UUCP> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 40 In article <1649@gmdzi.UUCP> roh@gmdzi.UUCP (Peter Rohleder) writes: >If the chunk of text exceeds the size of the rectangle of >the field the style should be set to scrolling - otherwise the style >of the field should be set to rectangle. > >My thought was to position the text selection behind the text, then to look >if the scroll of the field is unequal zero. This is a very clever idea. However, the right way to do it is to use the built-in textMaximum property of every text field. What's that? You missed that property? Well, that's probably because they didn't bother to put it in, despite the fact that HyperCard must and does keep track of this quantity internally. It's one of many places where HyperCard simply does not give you the information you need to do what you want. (And you can't compute it yourself from the number of lines, because that doesn't take wrapping into account.) If this were one of the few places where this happened, I wouldn't bother to bitch about it here. But it isn't. I doubt that many HyperTalk programmers would disagree with me that the most annoying thing about the language is the Rube Goldberg nature of so many non-trivial scripts. So often, you have to come up with something clever and contorted to do things that would be perfectly straightforward if HyperTalk were a little more fleshed out. It's like going halfway around the world and back just to run down to the corner market. In this way, I think C programming is easier; while it's sometimes obscure even to those of us who've been doing it for many years, at least you can just do what you need to do, rather than running into language limitations all over the place. And I don't feel that adding the maybe twenty to forty necessary new properties and commands to HyperTalk would make it as obscure as C. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "I've got troubles of my own, and you can't help me out. So take your meditations and your preparations and ram it up yer snout!" - Frank Zappa, "Kozmik Debris"