'incompatible types in initialization' when using NSTableColumn width float

  • if I use this inside a NSTableView Category

    NSTableColumn *col = [[self tableColumns]objectAtIndex:0];
    or
    NSTableColumn *col = [self tableColumnWithIdentifier:@"order"];
    float offsetLeftColumn = [col width];

    I get in xCode 'incompatible types in initialization'

    The docs says

    width
    Returns the width of the receiver.

    - (float)width

    if I use int then I get a huge number back, even the debugger says
    for NSTableView > NSTableColumn > _width 40

    I use for now for testing

    float offsetLeftCol = [self frameOfCellAtColumn:0 row:1].size.width;

    but in reality I have to search for a column with a specific identifier.

    Does anyone knows a solution?

    Thanks
  • Op 18-okt-2006, om 20:43 heeft René van Amerongen het volgende
    geschreven:

    > if I use this inside a NSTableView Category
    >
    > NSTableColumn *col = [[self tableColumns]objectAtIndex:0];
    > or
    > NSTableColumn *col = [self tableColumnWithIdentifier:@"order"];
    > float offsetLeftColumn = [col width];
    >
    > I get in xCode 'incompatible types in initialization'
    >

    Somewhere in my header route I did unintentionally type, #include
    <AppKit/NSTableColumn.h> instead of #import. Anyway it works now. _______________________________________________
    Do not post admin requests to the list. They will be ignored.
    Cocoa-dev mailing list      (<Cocoa-dev...>)
    Help/Unsubscribe/Update your Subscription:
    http://lists.apple.com/mailman/options/cocoa-dev/<cocoa...>

    This email sent to <cocoa...>
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today