NSView: Get objects

Hello together,

I have some question to “NSView”:

When I replace the content view of a window with

[meinWindow setContentView];

I can easily get the objects with

set t to contents of text field "test" of window 1

Okay, that works well.

If I added a view with

[meinWindowView addSubview];

to the content view of window 1 I can’t access the “new” objects of the added view.
For example there is an object “text field”: How can I get thte content of it?

The “GUI-Path”:

set t to contents of text field "test2" of window 1

doesn’t work.

Thanks!

Hello again,

I tried very much. The documentation don’t gave me any ideas.

With Try&Error I solved it now:

Always we use:

set t to contents of text field "test" of window 1

But that is only the “short”-Version to get access to the embeded objects.

If you know this,

set t to contents of text field "test" of content view of window 1

it is not far away that you get the idea to this:

set t to contents of text field "test" of view "0001" of window 1

With this statement you can call every object, which is added by “addSubview”.

To this trivial code I took a lot of time!