alex@cosmos.acs.calpoly.edu (Alex Raftis) (04/26/91)
I'm curious if I can do the following. I'd like to make a program that,
while running, loads objects off of disk to get things accomplished.
Basically, I'd like to make an object that reads and writes picture
format x, so that a generic open/save panel can be used to load a picture
off of disk. I don't want to write it so that each new module has to
be linked in, since this requires lots of programming work for me
everytime someone wants to write a new converter. Here's the ideal
situation:
1. User calls up open panel.
2. Open panel comes up and reads a config file saying what file
extensions it will recognize.
3. User pics a picture format to read, say gif.
4. open panel loads the "gif" object off of disk and using a standard
set of methods, this object reads the gif into a NXimage, which
the main program can then manipulate.
5. The NeXT time the user opens the open panel, he'd like to open a
tiff image. No problem, the "gif" object is replaced by the "tiff"
object, and they get their new picture.
6. At a later date, the user decides he needs to be able to load
pbm's, so he finds the correct object on the net, drops into the
right directory on the system, updates the config file, and the
every program using the above panels can read/write in pbm format.
With run-time binding this should be possible, but I'm not sure where to
start looking. I know how to write the basic open panel, etc..., but I've
never come accross anything detailing the above run time loading operation
in the NeXT manuals. I assume that I just haven't looked in the right
place, so can someone point me in the right direction?
BTW- I'm planning on writing a save and open panel based on a set protocol
that will allow any programmer to easily make his program handle just
about any graphic format extant, assuming someone wants to write a
translator to translate picture formats to NXImages, drawing formats
to PostScript, and maybe even sound to NeXT sounds, etc. The posssibil-
ities are endless, but I've got this one beginning stumbling block.
Thanks in advance,
Alex