[comp.sys.amiga.tech] Disk "Resources": Cross-Post from BIX #2

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (05/13/88)

[ Urp! ]

	David Joiner (talin @ BIX) has some questions for Matt...

					Schwab
--------
amiga/other #329, from talin, 1389 chars, Thu May 12 01:45:09 1988
This is a comment to message 321.
--------------------------
   More comments to Matt Dillon, if Leo would be so kind...

   1. Can the 'generic structurre editing' be a seperate facility from
the actual resource/set tools? That is to say, If I write an editor
that knows what a Gadget structure looks like, and I don't care to look
at any other structure types, I don't need all the structure descriptions.
   In fact, my suggestion is to have a new resource type 'SDEF' (stands
for structure definition) which has a resource name equal to the type
of structure it is defining. (I would also want a 'XDEF' which might
contain an executable for initializing and handling said structures,
for example you load in an 'XDEF/Window', send it a 'New' message, and
it returns a fully-initialized window, even if your applicaiton doesn't
know how to build one). The SDEFs and XDEFs could be stored in either
the same file or a different one (For example, all the 'common'
structs would have SDEFs in the System.Set file.
   Personally I'm not all that interested in editing structures
generically, at least not at this point (That's what Patch Editor
Construction Set does, and it's a major bitch). Since the CONTENT
of any structure is, in my opinion, as important as the format, I
really don't see it as being useful for anything but the simplest
of structures, but I may be wrong. Specialized resource editors are more
what I am interested in writing.

dillon@CORY.BERKELEY.EDU (Matt Dillon) (05/15/88)

:[ Urp! ]
:
:	David Joiner (talin @ BIX) has some questions for Matt...
:
:					Schwab
:--------
:amiga/other #329, from talin, 1389 chars, Thu May 12 01:45:09 1988
:This is a comment to message 321.
:--------------------------
:   More comments to Matt Dillon, if Leo would be so kind...
:
:   1. Can the 'generic structurre editing' be a seperate facility from
:the actual resource/set tools? That is to say, If I write an editor
:that knows what a Gadget structure looks like, and I don't care to look
:at any other structure types, I don't need all the structure descriptions.

	Right.  But the resource system does need to know the structure
descriptions to be able to decode the resource (i.e. resolve pointers to
sub-structures and such).  The structure description itself would be 
extremely compact.  The fact that the structure description always exists
means the resource editor can edit/view *anybodys* resource in fine detail.

	The resource editor would be object oriented in the sense that 
anybody can tell it 'hey, I know how to edit a resource of type <Blah>'.
This also fits rather well into my developing scheme.  I've been talking
to several people... Most noteably, Jim Mackraz, who has suggested a 
more object-oriented approach.   Not only do you have resource structures,
but you have functions that are automatically applied to them.  So, for
instance, if you GetRes() a NewWindow structure a function would automatically
be called to OpenWindow() it and a Window structure pointer would be returned
instead!

>   Personally I'm not all that interested in editing structures
>generically, at least not at this point (That's what Patch Editor
>Construction Set does, and it's a major bitch). Since the CONTENT
>of any structure is, in my opinion, as important as the format, I
>really don't see it as being useful for anything but the simplest
>of structures, but I may be wrong. Specialized resource editors are more
>what I am interested in writing.

	I think it is a necessary part of my idea for a standard.  Also
the problem of naming structure types is pretty much solved ... use the
same names as structures defined in the Amiga includes.  Custom structures
defined by software companies are private to their executables, and if they
want to make them global (put them in a 'global' resource file), it is easy
to find a unique name since names are not limited to 4 characters.

	There might be some concern over the amount of space this all takes
up.  It really isn't that much.  An instance of a structure definition 
occurs exactly once.  Any references to that structure by resources or other
structure defs is solely with a two byte ID, and uninteresting entries can
be skipped (e.g. if you have a lot of non-pointer fields they can be 
defined in a lump instead of by a lot of references to 'integer' structures
or something like that).

P.S.  I've gone through several complete redesigns since my first posting!

					-Matt

doug-merritt@cup.portal.com (05/17/88)

"Patch editor construction set"??? What's that? Something that already
exists, an idea, in progress, or what?

Leo, interesting to see that you've become the worlds first Human
Network Gateway. :-) Perhaps this could be automated...

%AUTOTRANSFER TARGET:BIX
Test message from Usenet, 1, 2, 3...testing.
Anyone see this???
%ENDTRANSFER

:-) :-)
---
      Doug Merritt        ucbvax!sun.com!cup.portal.com!doug-merritt
                      or  ucbvax!eris!doug (doug@eris.berkeley.edu)
                      or  ucbvax!unisoft!certes!doug