|
From: | Fred Kiefer |
Subject: | Re: Keyed Archiving and MOSX compatibility... |
Date: | Thu, 25 Mar 2004 23:00:17 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821 |
Hi Nicola, Nicola Pero wrote:
The programmer can decide which information is essential and which is not, which is something a machine can't do.If you want to keep a fixed background color on all platforms, maybe because yours is a yellow post-it application and you want allwindows to have a yellow background, you can do it. If you just want to create a window with a standard background, you don't put the background color in the file.
...
Do you store the background color of windows ? If yes, you are storing a platform-specific detail in the file. If not, you are not giving to the programmer the possibility of forcing a special background color for his/her windows.
I just did snip out these two sections of your posting as they point to an interesting point in the Apple keyed encoding NIB files. The standard answer to your question would of course be to store the named colour system/windowbackground to handle this special case. But interestingly this is not what Apple does most of the times. They seem to have a clever algorithm to decide what to put into the NIB file and what to leave out. Fields that have their standard values are normally not encoded at all, so on a different target machine the default values there will be used. This concept works for a lot more things than just colours and fonts, which we could easyly handle specifically. If you look through an XML NIB file you will see that only a minimal set of attributes for each object are stored. This is of course still different from the Renaissance way of storing things and there is nothing in NIB to match the power of the autolayout classes of Renaissance. Still keyed archives are a lot cleverer than the GNUstep standard encoding/decoding, which just dumps out all the attribute values. That is also one of the reasons, why up to now I did not try to implement keyed coding :-)
Fred
[Prev in Thread] | Current Thread | [Next in Thread] |