Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!apple!well!svc From: svc@well.UUCP (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: Integer Size problem Summary: PLEASE DON'T DO THIS! Message-ID: <13271@well.UUCP> Date: 22 Aug 89 17:19:40 GMT References: <15141@dartvax.Dartmouth.EDU> Reply-To: svc@well.UUCP (Leonard Rosenthol) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 26 In article <15141@dartvax.Dartmouth.EDU> xxiaoye@eleazar.dartmouth.edu (Xiaoxia Ye) writes: >Would someone explain the following weirdness? > >the WIND resource' first 8 bytes are its positions on the screen: top, >left, bottom and right. I tried to save the window postions and so to >write to the first 8 bytes of the WIND resource. > > [ details of reading and writing the new data ] > PLEASE DON'T DO THIS! This is how Apple's DA's (Control Panel, etc.) save of their window position and it is BAD NEWS and Apple is setting another bad example for its developers!!! To begin with it will flag some/all of the virus detections utils, it also means that your application CAN NOT be used off of a locked volume (or protected server volume, etc.), it will also mod your appls mod date and when you ask your users for the date of the appls, they will not the correct date! I would suggest that your write the window position information either into a application level prefs file (either in the sytem folder or the same directory as the appls) or you have doc specific window prefs which get written into the document file (either data or res fork). -- +--------------------------------------------------+ Leonard Rosenthol | GEnie : MACgician Lazerware, inc. | MacNet: MACgician UUCP: svc@well.UUCP | ALink : D0025