Question:
I want to put grid control on a form, so I create such file (gsmarkup):
<window>
<vbox>
<vspace />
<label >Some text</label>
<vspace />
<hbox>
<hspace />
<box title="Data">
<grid>
<gridRow>
<view instanseof = "NSTableView" id = "SearchResultTable">
</gridRow>
</grid>
</box>
</hbox>
</vbox>
</window>
So I need to link table on the form and NSTableView* from source.
But I don`t know how.
This piece of source return only top level objects:
NSDictionary *table;
NSMutableArray *topLevelObjects = [NSMutableArray array];
table = [NSDictionary dictionaryWithObjectsAndKeys:
self, @"NSOwner",
topLevelObjects, @"NSTopLevelObjects",
nil];
[NSBundle : @"Window"
externalNameTable: table
withZone: [self zone]];
Sorry for my bad english.
> Greetings.
> A have a question about using "Renaissance". I try to find answer
> over internet or documentation, but stuck with answer. If You give
> me a link, piece of code or some other help that solve my problem -
> I will be much grateful.
>
> Question: [...]
>
> So I need to link table on the form and NSTableView* from source.
Check
Renaissance/Examples/Classes/TableView/
it contains a full example of creating an NSTableView and linking it
to the NSOwner. :-)
Fundamentally, the idea is that you create the NSTableView using
<tableView ...>
and tell it that the data source is NSOwner (which can be any object
you want; you can specify when you load the markup file) --
<tableView dataSource="#NSOwner" ...>
then, you can implement the data source methods (see NSTableView
documentation) to supply data to the table. :-)
Thanks
PS: For more information on NSOwner, and linking objects in your
program to objects created by the gsmarkup files, check the
Renaissance documentation
(Renaissance/Documentation/Pregenerated/)