Text


When I look at some text in the Inspector, I sometimes see chunks of 16 bit characters. What format does Magic Cap use for these 16 bit characters?


The 16-bit characters are based on the Unicode standard. For more information on Unicode, checkout "The Unicode Standard", volumes 1 and 2, published by Addison-Wesley. The ISBN (in case you need it) are 0-201-56788-1 and 0-201-60845.


Validating objects complains about text fields having empty text defined in Objects.Def. Is there some reason why this is not a good thing to do? Are text fields suppose to allocate a text object when I call replace?


During runtime, Magic Cap will delete the text object referred to by a text field if the text object is empty, replacing the dataStore field in the text field to nilObject. If your base object in your Objects.Def file is not set this way, you'll have a shadowed TextField object laying around in your package when it doesn't have to be there. Class TextField will automatically allocate the text object when you add new text, so you don't have to do this yourself.