discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSTableView setAction: raising an exception


From: Gregory John Casamento
Subject: Re: NSTableView setAction: raising an exception
Date: Fri, 12 Sep 2003 15:04:42 -0700 (PDT)

--- Yen-Ju Chen <address@hidden> wrote:
> 
> 
> 
> >From: James Pendergrass <address@hidden>
> >To: address@hidden
> >Subject: NSTableView setAction: raising an exception
> >Date: Fri, 12 Sep 2003 11:37:32 -0400 (EDT)
> >
> >Hello all,
> >I'm trying to build a gnustep application which relies on an NSTableView
> >to display some data.  When the user clicks (or double clicks) on rows in
> >the table view, I would like to do something, so in my UI controller's
> >awakeFromNib I have:
> >     [_theTableView setTarget:self];
> >     [_theTableView setDoubleAction:@selector(rowDoubleClicked:)];
> >     [_theTableView setAction:@selector(rowClicked:)];
> >Where _theTableView is an IBOutlet which is connected (using Gorm) to the
> >NSTableView instance.  (Gorm for some reason does not see the rowClicked:
> >and rowDoubleClicked IBActions which are defined in the UIController.h
> >file, which is why I'm doing this programmatically).

James,

You don't *need* to add these programmattically.  If the class parser, for
whatever reason, misses them when you load the file you can add the appropriate
actions using either the classes view editor or the class inspector.

> >The problem is that when I launch the app and it tries to load the .gorm
> >file, I get the exception:
> >     Exception occured while trying to load model: attempt to set an
> >action in an NSCell
> 
>   I guess that you might not connect _theTableView to the NSTableView,
>   but to a NSCell.
>   If you connect the outlet to NSTableView, in the Gorm Inspector,
>   under "connections", it should indicate that it connects to 
> "GormNSTableView".
>   Here is a screenshot which might help:

This is correct...
 
>
http://www.people.virginia.edu/~yc2w/GNUstep/Tutorial/en/ch13s02.html#id2976496.
> 
>   Hope it help.
>   Yen-Ju

Yen Ju, Thanks for maintaining the tutorial it's been a great thing to refer
people to when they have questions. :)

Thanks, GJC

=====
Gregory John Casamento
-- bheron on #gnustep, #linuxstep, & #gormtalk ----------------
Please sign the petition against software patents at:
http://www.petitiononline.com/pasp01/petition.html
Petition to make Lighthouse Application Suite Free Software at:
http://www.petitiononline.com/laafs/petition.html
--- Main Developer of Gorm (featured in April Linux Journal) ---

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




reply via email to

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