Re: NS Keywords
Re: NS Keywords
- Subject: Re: NS Keywords
- From: Neil Faiman <email@hidden>
- Date: Sat, 14 Jan 2017 14:19:33 -0500
- X_cmae_category: , ,
What are all these NS keywords (?) that I keep seeing in people’s scripts?
These scripts are using Apple’s Cocoa framework. Cocoa was originally an Objective C library. The Objective C language (like C, which it is based on) does not have any sort of namespace feature, so by convention, all global names in a library or framework are prefixed with a (hopefully) unique prefix of 2-4 upper case letters.
OS X was a direct descendant of NeXT Software’s NeXTSTEP operating system. Thus, the prefix for global names in the NeXTSTEP framework was NS. Cocoa was such a direct descendant of the NeXTSTEP framework that it still used the same names. Thus, the NS prefix for core OS framework class names in OS X.
Regards,
Neil Faiman |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden