On Apr 17, 2012, at 11:53 PM, Sanjay Arora <saar...@quark.com> wrote:

> Hi I am a newbie on Cocoa application development and could not find any
> method in NSWindow which does the same job as SetWindowProperty used to
> do in Carbon,
> 
> Could some one point me to right direction.

Hi Sanjay,

I can think of two ways to do this:

- use the objc_setAssociatedObject API in objc/runtime.h
- create a subclass of NSWindow, add some custom properties to your class, and 
store your data in those properties

The latter is actually an approach that we would recommend in recent Carbon 
programming too; the equivalent Carbon technique would be creating an HIObject 
subclass of the WindowRef base class, and adding your own private data fields 
to your subclass.

-eric


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to