Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I output FourCharCode variable as text?



On 11/27/03 10:08 AM, Camillo Lugaresi wrote:
> Of course, that's not the case with most instances of FourCharCodes
> in Mac applications (ie, for use with OS-defined types), but if your
> code is only meant to be used on your app's internal types, then it
> can be sufficient.

Actually, in Mac applications, all instances of FourCharCodes should contain
only non-control characters. It's been that way since the beginning of Mac
programming. It's one of those things that was so obvious they didn't have
to document it. All of the examples clearly use only printing characters
(including blank), and everyone followed the examples. It also was supported
that way in Rez, ResEdit, MacsBug, and so on. It's easy to do it right, just
type in the identifier between single quotes.

It's the application's internal types that are more likely to confuse
four-character and numeric codes. I would recommend against that, or at
least use a custom type so it's clear the application is not following the
Apple convention.

Regards,

Tom


--
Tom Becker "Within C++, there is a much smaller and
Object-Oriented Propeller Head cleaner language struggling to get out."
<email@hidden> -- Bjarne Stroustrup
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How do I output FourCharCode variable as text? (From: Camillo Lugaresi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.