Referring to a view by its document label

II created a new project and In MainMenu.xib I got a window with an NSView in it .

In AppDelegate.applescript I created a property helloView missing: value and I dragged from Accessibility Referencing Outlets in Connection Inspector to the App Delegate blue cube. In the little black window I chose helloView (my property)

In applicationWillFinishLaunching_ I entered the following code

 on applicationWillFinishLaunching_(aNotification)
		-- Insert code here to initialize your application before any files are opened
        	set viewHeight to helloView's frame()'s |size|()'s height()
        	log viewHeight
 end applicationWillFinishLaunching_

I hit cmmd r and in the console I got:
2013-11-09 21:33:19.516 test defaults[5674:303] 360 – the correct height of my view

I would like to change the name of the View to myCustomViewName in code (just as if I entered it in the Identity Inspector Document Label field)
I then would also like to be able to check what that name is in code.

i.e.
set the xCode specific label of the view
get the text value of xCode specific label of the view

I have checked docs and searched web and forums but could not find any way of setting and getting the xCode specific label of the view.

Is this tricky to do?

It’s not so much tricky as impossible and pointless. It’s just a convenience for labeling things as you inspect them within Xcode itself.

I’m not clear what you’re trying to acheive.

Thanks Shane,
I was just hoping you could do everything you do manually in code. I am sad to hear it is not possible. It would have been nice to be able to change a view’s name and refer to it on the fly. Just a learning exercise.