Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!rochester!cornell!blandy From: blandy@lakshmi.cs.cornell.edu (Jim Blandy) Newsgroups: comp.sys.amiga.tech Subject: Re: Resources, Take 3 Message-ID: <18138@cornell.UUCP> Date: 8 Jun 88 19:20:18 GMT References: <8806052331.AA28897@cory.Berkeley.EDU> Sender: nobody@cornell.UUCP Reply-To: blandy@lakshmi (Jim Blandy) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 45 In article <8806052331.AA28897@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: > > As you all know, My big project right now is the implementation >of resources ... > The *right* way to do it is to essentially have a relatively >simple storage format, and then make the entire system object oriented. >So here is my *new* idea on the subject: [ ... description of standard code resources which convert one type of resource to another ... ] That is a completely fantastic idea, Matt. I'd steal your brain in a second, if I could use it. It's similar to the way 'make' can assume how to get a .o file from a .c file without being specific to C or whatever. >(1) What if I want to implement a system-default window? ... [ ... stuff on shared resources and things, looking a bit like a solicitation of suggestions :-) ...] > -Matt The way I see it, the conversion resources take a resource of one type and make a new resource of the asked-for type. So if this converter makes a Window out of a shared NewWindow, the Window so created is shared too; it's a genuine resource, just like anything else. You're maintaining a "shared resources currently in memory" list, so put this new Window resource on the list; the next person that asks for it finds the already-opened window. In the general case: if a shared wombat_description is turned into a wombat by some conversion resource (called wombat_description.wombat), then that new wombat is also a shared resource, to be added to the "shared resources in memory" list; other programs calling GetResource() for that same wombat will be given the same value the first one did. (PS - where can I get a copy of MDE, and the Fred Fish listings?) Jim Blandy - blandy@crnlcs.bitnet "insects were insects when man was just a burbling whatsit." - archie