Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!DKAUNI2.BITNET!UK4H From: UK4H@DKAUNI2.BITNET ("JAE") Newsgroups: comp.sys.amiga.tech Subject: User Extensions to System Structures Message-ID: <"90-01-04-21:33:00.95*UK4H"@DKAUNI2.BITNET> Date: 5 Jan 90 05:33:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 53 Hi usenet! (this is my first time here, but who cares...) The recent discussion about mutualExclude striked a chord in me. One thing that was said (I can't remeber who said it) was about those 'user' fields in various (all?) intuition/exec etc. structures. I agree with those who say that one should use these fileds for one's own purposes instead of using ANY fields in a system struct. Now: what if two programs (independend ones) want to share, say, a window. Both want to link some private information to the window. Unnecessary? Well, I can't think of an application right now, but I'm almost sure there is one. Anyway, what will happen. Both will user that 'userExt' field (I don't know real name now). Both will write something to it. Well, who's last is lucky in that case. What I'm thinkin' of is some standard userExtension struct. Just like struct userExtension { struct userExtension *nextExt; LONG id; } The id field must just be uniq. This would best be accomplished by providing a (system) function 'AddExtension'. Oh, give a C func head: BOOL AddUserExtension(root,userExt); struct userExtension **root; /*points to the field in struct*/ struct userExtension *userExt; /*points to node to add*/ Anyone who'd like to use this would define his own extension as s.th. like: struct myExt { struct userExtension extLink; /*my fields*/ } Hey, CBM (jim or anyone), are you listening? How about 1.5???? (Yeah, that version blues again...) Of course this userExt stuff could be a Node (would probably be the best...) I'd really like to hear any comments from anyone... bye, JAE Juergen A. Erhard eMail: uk4h@dkauni2.bitnet phone: (GERMANY) 0721/591602 "You know that it's monday when you wake up and it's tuesday." Garfield