Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Renaissance_NSTable

9 views
Skip to first unread message

Иван Т

unread,
Aug 12, 2010, 5:14:41 PM8/12/10
to help-g...@gnu.org
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:

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.

Nicola Pero

unread,
Aug 12, 2010, 5:52:04 PM8/12/10
to Иван Т, help-g...@gnu.org

On 12 Aug 2010, at 22:14, Иван Т wrote:

> 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/)

Иван Т

unread,
Aug 13, 2010, 1:22:28 AM8/13/10
to Nicola Pero, help-g...@gnu.org
It`s what I need.
Thank You very much.


0 new messages