• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Current row/column string value...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current row/column string value...


  • Subject: Re: Current row/column string value...
  • From: David Remahl <email@hidden>
  • Date: Sun, 03 Mar 2002 14:19:29 +0100

> How to get a string value from current row/column...I want to get a path
> which is set in my current(selected) row in my Table View. I want to use
> this method:
>
> - (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex
> {
> [preview setImage:[[NSImage alloc] initWithContentsOfFile:***PATH
> (STRING VALUE) FROM MY ROW HERE!];
> [preview setImageAlignment:NSImageAlignCenter];
> [preview setImageScaling:NSScaleProportionally];
> [preview setImageFrameStyle:NSImageFrameNone];
> [preview setNeedsDisplay:YES];
> }
>
> I have 4 coulmns in my table...one is called "path" - my path to file -> i
> want to use it's value to set my image in another view..
> TIA for any help!
>
> Lukasz

You provide the information that is show in the table. The table view
requests row/col values when it is about to show them. Therefore, you should
retreive the correct item from your internal storage, as the table view
doesn't keep track of what it is showing.

/ david
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Current row/column string value... (From: Lukasz Kuczborski <email@hidden>)

  • Prev by Date: Re: How to identify a menu item?
  • Next by Date: Re: Drawing into an NSImage?
  • Previous by thread: Current row/column string value...
  • Next by thread: Re: NSControl with NSCells
  • Index(es):
    • Date
    • Thread