> On Nov 5, 2015, at 1:51 PM, Jens Alfke wrote:
>
> Convert the position to local coords, then call -rowAtPoint:.
I woke up last night and thought exactly that which I have used before ... must
be dementia on the rise !
-rags
> On Nov 5, 2015, at 12:51 PM, Jens Alfke <j...@mooseyard.com> wrote:
>
>
>> On Nov 5, 2015, at 12:35 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote:
>>
>> In -rightMouseDown I call [self clickedRow] which always returns -1 in a row
>> or
> On Nov 5, 2015, at 2:35 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote:
>
> I subclass NSTableView to catch -rightMouseDown
>
> In -rightMouseDown I call [self clickedRow] which always returns -1 in a row
> or not in row
>
> What should I b
> On Nov 5, 2015, at 12:35 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote:
>
> In -rightMouseDown I call [self clickedRow] which always returns -1 in a row
> or not in row
Yeah, you’re getting control before the base class has had a chance to set the
clickedRow propert
I subclass NSTableView to catch -rightMouseDown
In -rightMouseDown I call [self clickedRow] which always returns -1 in a row or
not in row
What should I be doing to get the clicked row?
-rags
___
Cocoa-dev mailing list (Cocoa-dev
Hi
Thought I would post something I see as reoccurring problem.
Basically, having an NSTableView (wrapped in a custom NSView) setup with
bindings works fine. Then,
trying to get the double-action/target in IB working has strange behaviour
when it comes to fetching clickedRow.
*Referring to my
On 8/9/12 12:58 AM, Graham Cox wrote:
NSCell apparently uses NSCopyObject() to make a copy of itself, and
NSTableView copies cells at times, e.g. for hit testing. If you have a custom
cell subclass that supports copying, DO NOT use [super copyWithZone:]
followed by your custom copy stuff. Since
On 8/9/12 8:14 AM, Markus Spoettl wrote:
On 8/9/12 12:58 AM, Graham Cox wrote:
NSCell apparently uses NSCopyObject() to make a copy of itself, and
NSTableView copies cells at times, e.g. for hit testing. If you have a custom
cell subclass that supports copying, DO NOT use [super copyWithZone:]
On 09/08/2012, at 4:14 PM, Markus Spoettl ms_li...@shiftoption.com wrote:
Not calling super sounds like a bad idea.
Yep, I realise that now.
So call super, but you need to know whether it's going to call through your
-init method or not (for cells, it does not).
--Graham
On Aug 9, 2012, at 00:04 , Graham Cox graham@bigpond.com wrote:
So call super, but you need to know whether it's going to call through your
-init method or not (for cells, it does not).
Except that you do sort-of know (I think). If it does, all your instance
variables are 0. If you have
On 09/08/2012, at 5:31 PM, Quincey Morris quinceymor...@rivergatesoftware.com
wrote:
So call super, but you need to know whether it's going to call through your
-init method or not (for cells, it does not).
Except that you do sort-of know (I think). If it does, all your instance
-menuForEvent: and don't
call super, you don't get the right values for -clickedRow: and
-clickedColumn:, and you don't get the right-click menu highlighting.
As I mentioned, I already filed the first; the second is now filed as
rdar://problem/12067701 (NSTableView won't show right-click highlight
.
Please see the DragNDropOutlineView demo application for an example of how
to properly do contextual menus with a TableView.
The key thing to note is that clickedRow and clickedColumn will now both be
valid when a contextual menu is popped up. In addition, one can dynamically
set
better contextual menu support.
Please see the DragNDropOutlineView demo application for an example of how
to properly do contextual menus with a TableView.
The key thing to note is that clickedRow and clickedColumn will now both be
valid when a contextual menu is popped up. In addition, one
decision, since it
essentially forces you to use a menu delegate to build your menu rather
than just handing back the correct NSMenu instance from -menuForEvent:.
Is there a reason that I shouldn't file a bug asking for clickedRow to
be set as soon as the row is clicked?
--Kyle Sluder
to do this.
I've always thought this was an extremely odd design decision, since it
essentially forces you to use a menu delegate to build your menu rather
than just handing back the correct NSMenu instance from -menuForEvent:.
Is there a reason that I shouldn't file a bug asking for clickedRow
On Wed, Aug 8, 2012, at 01:21 PM, Corbin Dunn wrote:
On Aug 8, 2012, at 11:38 AM, Kyle Sluder k...@ksluder.com wrote:
Is there a reason that I shouldn't file a bug asking for clickedRow to
be set as soon as the row is clicked?
I just hadn't thought that people would have needed
On Aug 8, 2012, at 2:05 PM, Kyle Sluder k...@ksluder.com wrote:
On Wed, Aug 8, 2012, at 01:21 PM, Corbin Dunn wrote:
On Aug 8, 2012, at 11:38 AM, Kyle Sluder k...@ksluder.com wrote:
Is there a reason that I shouldn't file a bug asking for clickedRow to
be set as soon as the row is clicked
On 09/08/2012, at 3:38 AM, Corbin Dunn corb...@apple.com wrote:
No it hasn't changed, but the clicked row is set *after* you return a menu.
That way your menu validation code can use it. I think the
DragNDropOutlineView demo shows how to do this.
OKaaay
I can figure it from the cell
On Wed, Aug 8, 2012, at 02:48 PM, Corbin Dunn wrote:
Cool; note that with View Based TableViews these types of things are
easier to do, since one can just do normal view stuff, and easily query
for what row they are in (via rowForView:)
It does make it easier for subviews that want to perform
application for an example of how to
properly do contextual menus with a TableView.
The key thing to note is that clickedRow and clickedColumn will now both be
valid when a contextual menu is popped up. In addition, one can dynamically
set the popup menu for a particular cell/column
/action message using setTarget: and
setDoubleAction:, everything works fine and I can get clickedRow to
tell me the row.
If I use bindings in IB3 and bind Double Click Target, I get the
action message, but clickedRow is always -1.
So, is this a bug? If so, I'll radar it. But I wanted
22 matches
Mail list logo