If you read a chunk of data off disk and don't know beforehand what
it's type is,
Why don't you know what its "type" is?
you have to do some sort of test, either of a predefined code, or a
string or something saved with the data and dispatch it yourself.
Why do you "have" to do this? I would just make *all* my objects
respond to a *single* message and make it their responsibility to then
map that to whatever is appropriate for them. No need to encode
Originally I was hoping that SELs were fixed in size and value so that
it would be possible to save them as a sort of data prefix and read
them back at a later time something like this
You are aware of the fact that you can just archive SELs? Foundation
will do the right thing with them.
(Assume "data_chunk" has just been read from disk)
[self performSelector: *(SEL*) data_chunk ...];
Seemed like a pretty clean way to solve the problem but alas it was
not to be...
What's wrong with -encodeValueOfObjCType and the correspinding decode
Marcel Weiher Metaobject Software Technologies
The simplicity of power HOM, IDEAs, MetaAd etc.
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden