addSubview

I have noticed when using lions applescript editor to compile a script that when entering the script

pWindow’s contentView’s addSubview_(tView)

compiles to

pWindow’s contentView’s addSubView_(tView) note capitalised View

as a result it will not run.

I get [NSView addSubView] unrecognised selector.

Is there a way around this problem?

Regards

Terry

I haven’t seen this problem. Did you type it in wrong first, then try to change it? Applescript hasn’t been letting you do this for some time (maybe forever). You can either put pipes around the word, or delete the “V” then close Xcode (not just your app), reopen then type in correctly. That should fix it.

Ric

Yes, that’s it.

I did what you suggested, alls OK now.

Thanks

Terry

Indeed forever. Each instance of AppleScript keeps an internal table of variable names, and once something is added, it’s format is set. I believe it’s something to do with actually using all-lowercase values under the hood.