Path: utzoo!attcan!uunet!snorkelwacker!apple!brutus.cs.uiuc.edu!rpi!image.soe.clarkson.edu!sunybcs!boulder!ewing From: ewing@boulder.Colorado.EDU (EWING DAVID JAMES) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C 4.0 questions Message-ID: <16455@boulder.Colorado.EDU> Date: 1 Feb 90 19:32:45 GMT References: <10682@bsu-cs.bsu.edu> Sender: news@boulder.Colorado.EDU Reply-To: ewing@boulder.Colorado.EDU (EWING DAVID JAMES) Organization: University of Colorado, boulder Lines: 47 In article <10682@bsu-cs.bsu.edu> mithomas@bsu-cs.bsu.edu (Michael Thomas Niehaus) writes: >I have several questions that I hope someone out there can answer: > >1. If you declare an array in an object class definition, is it safe to > use that array in a call to, say, an FSWrite routine? I have created > a 1K buffer and when it fills up I want to call FSWrite to write the > whole chunk out. Is this safe, or do I have to copy the whole array? > (Or can I lock it down?) I would declare a pointer in the class declaration and allocate it in your initialization method and DisposPtr() it in your Dispose method. This way you won't have to worry about locking it down. And, of course, the C syntax for accessing the data will be the same as if it were an array. >2. If you declare a superclass and then two or more subclasses, is it > possible to create an object of one subclass and assign it to an object > variable of the superclass? I would like to have an array of objects of > different types (but of similar structures). Yes, most certainly. This is the whole point of inheritance. Look at the CCluster class for an example. >3. What does the debugger look like? (My poor little 1MB SE has never seen > it.) The debugger is awesome! Go buy some memory! :-) >Totally unrelated: > >4. How would you change the font that is used in a dialog's buttons to > something other than Chicago? I simply use TextFont() and TextSize() routines imediatly after the window is created to change the window's standard font. Then create controls with a procID or'd with useWFont (8). See Inside Mac I-315 for details. >5. Does anyone have any source to convert BinHex->Mac files? I am basically > looking for a routine that will accept two file reference numbers and > do the work, and hacking the xbin source currently looks like a headache. I know its around somewhere. You can try the info-mac archives via ftp at sumex-aim.stanford.edu. Dave Ewing ewing@tramp.colorado.edu (128.138.238.33) ..!hplabs!boulder!onecom!tyvax!iftech!dave (My Mac IIx running uupc & MacOS!) AppleLink: D2408 (D2408@applelink.apple.com)