discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing tableview(GORM and PROJECTCENTER)


From: Germán Arias
Subject: Re: Implementing tableview(GORM and PROJECTCENTER)
Date: Thu, 09 Jul 2015 13:31:25 -0600

Make double click over the tableview until the title of Inspector show
NSTableView. Then make the connection with key "control" and drag. Keep
in mind that in unix-like systems, "Control" not necessarily is the key
Crtl in your keyboard. Use the app "SystemPreferences", section
"Modifier keys", to configure these. For example, in my laptop I use the
key "Super" as the "Control" GNUstep's key. Since I use the key Crtl, as
the "Command" GNUstep's key.

With code you can use:

[yourTable setDelegate: yourDelegate];
[yourTable setDataSource: yourDataSource];

Germán

El jue, 09-07-2015 a las 06:47 -0500, chandan bp escribió:
> Hi,
> 
>    Thanks for the reply. I got the mistake  I was doing. I should
> first connect the outlet and then create the class files, which I was
> doing the other way and hence tableView instance variable was not
> getting created in the header file.
> 
>              Apart from that I can see that I am not able to drag from
> nstableView to my controller object. When I select the tableview i see
> the 'S' icon, however when I press control and drag I see that nothing
> happens. Is there any other way for creating data source and delegate.
> 
> 
> Regards,
> 
> Chandan Parameswaraiah
> 
> 
> On Thu, Jul 9, 2015 at 3:03 AM, Germán Arias <address@hidden>
> wrote:
>         El mar, 07-07-2015 a las 12:03 +0100, David Chisnall escribió:
>         > On 7 Jul 2015, at 07:55, chandan bp <address@hidden>
>         wrote:
>         > >
>         > >                I am able to build and run the application,
>         however when I run the app using the project center, the table
>         is empty. In the GUI after app launch I get 'Data source
>         doesnt respond to numberOfRowsInTableView'. Can anyone tell me
>         where I am going wrong or what additional code I have to add
>         apart from the ones mentioned in the link provided.
>         >
>         > You have done one of two things wrong:
>         >
>         > - In GORM, you gave not correctly connected the NSTableView
>         datasource outlet to your data source object.
>         >
>         > - In your data source class, you have not implemented the
>         numberOfRowsInTableView: method.
>         >
>         > David
>         >
>         
>         
>         I guess your problem is because you set the NSOwner as the
>         delegate of
>         the TableView (as show the figure 4-42 in that tutorial). You
>         should
>         connect the instance of the class where you have the method
>         -numberOfRowsInTableView. Of course you should first add this
>         class at
>         Gorm and make an instance of this.
>         
>         Germán
>         
>         
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]