Search Results

Search found 4 results on 1 pages for 'nsimagecell'.

Page 1/1 | 1 

  • Core Data Image Won't Load Into NSTableView Image Cell

    - by jcady
    In my code I am storing an image into my Core Data model (works fine). If I set up my view to have an NSImageView and bind its Data to Controller Key: selection and modelKeyPath: myImagePath, it works. It will show each image for the selected row. I then create a new column in my NSTableView and drag an image cell onto the column. However, I cannot get my Core Data bindings to have the image show up in the cell. I have tried binding both value and data, but no luck. Since I am sure the image is stored properly, what am I doing wrong in my binding to prevent the image from showing up in the table cell? Thanks so much. (My background: new Cocoa developer who has recently gone through the entire Hillegass book.)

    Read the article

  • Trouble creating a button matrix in Interface Builder

    - by Jake
    Hi, I am trying to create a matrix of buttons in Interface Builder 3.2.1 but can not find anyway to do it. I read the question and answer posted here: http://stackoverflow.com/questions/1771835/how-to-create-a-nsmatrix-of-nsimagecell-in-interface-builder-in-10-6 But following Layout Embed Objects In, as suggested, I see only View and Scroll View as options, not Matrix. Have I missed something? Thanks.

    Read the article

  • Cocoa QuickLook initiated by NSTableView Cell

    - by Tristan Seifert
    I have an NSTableView that contains 2 different Columns - one is an NSImageCell that shows a file icon, and the second is a custom subclass of NSTextFieldCell that contains a quick look button on the right of the text. When I click the Quick Look button, the following code is invoked: [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil]; This does it's job and shows the blank Quick Look panel saying "No Items Selected." After I did a bit of research on the internet, I implemented a custom NSTableView subclass to be the Delegate and Data Source for the Quick Look panel. I get the notification that Quick Look asks if I want to be the delegate, and I respond with return YES. Even though I implement all methods in both QLPreviewPanelDataSource and QLPreviewPanelDelegate, at runtime I get this error on the console: 2010-12-24 15:32:17.235 BackMeUp[4763:80f] clicked: ~/Desktop/HUDTape.mov 2010-12-24 15:32:17.489 BackMeUp[4763:80f] [QL] QLError(): -[QLPreviewPanel setDelegate:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2010-12-24 15:32:17.490 BackMeUp[4763:80f] [QL] QLError(): -[QLPreviewPanel setDataSource:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2010-12-24 15:32:17.491 BackMeUp[4763:80f] We can now receive QL Events. 2010-12-24 15:32:18.291 BackMeUp[4763:80f] -[NSPathStore2 stringValue]: unrecognized selector sent to instance 0x5ecb10 2010-12-24 15:32:18.292 BackMeUp[4763:80f] -[NSPathStore2 stringValue]: unrecognized selector sent to instance 0x5ecb10 And the Quick Look panel does not show up, which I find rather odd. The first line above is just that I know the cell has been clicked. Anyways, here is the .m file of the custom table view subclass: // // BackupListTableView.m // BackMeUp // // Created by Tristan Seifert on 12/24/10. // Copyright 2010 24/7 Server. All rights reserved. // #import "BackupListTableView.h" @implementation BackupListTableView - (void) awakeFromNib { } // Quick Look Delegates - (BOOL)acceptsPreviewPanelControl:(QLPreviewPanel *)panel; { [QLPreviewPanel sharedPreviewPanel].delegate = self; [QLPreviewPanel sharedPreviewPanel].dataSource = self; NSLog(@"We can now receive QL Events."); return YES; } - (void)beginPreviewPanelControl:(QLPreviewPanel *)panel { // This document is now responsible of the preview panel // It is allowed to set the delegate, data source and refresh panel. [QLPreviewPanel sharedPreviewPanel].delegate = self; [QLPreviewPanel sharedPreviewPanel].dataSource = self; } - (void)endPreviewPanelControl:(QLPreviewPanel *)panel { // This document loses its responsisibility on the preview panel // Until the next call to -beginPreviewPanelControl: it must not // change the panel's delegate, data source or refresh it. return; } // Quick Look panel data source - (NSInteger)numberOfPreviewItemsInPreviewPanel:(QLPreviewPanel *)panel { return 1; } - (id <QLPreviewItem>)previewPanel:(QLPreviewPanel *)panel previewItemAtIndex:(NSInteger)index { int selectedRow = [self selectedRow]; return [NSURL URLWithString:[[[self dataSource] tableView:self objectValueForTableColumn:fileColumn row:selectedRow] stringValue]]; } // Quick Look panel delegate - (BOOL)previewPanel:(QLPreviewPanel *)panel handleEvent:(NSEvent *)event { // redirect all key down events to the table view return NO; } // This delegate method provides the rect on screen from which the panel will zoom. - (NSRect)previewPanel:(QLPreviewPanel *)panel sourceFrameOnScreenForPreviewItem:(id <QLPreviewItem>)item { NSRect iconRect = [self rectOfColumn:1]; /* // check that the icon rect is visible on screen NSRect visibleRect = [self visibleRect]; // convert icon rect to screen coordinates iconRect = [self convertRectToBase:iconRect]; iconRect.origin = [[self window] convertBaseToScreen:iconRect.origin]; */ return iconRect; } // This delegate method provides a transition image between the table view and the preview panel - (id)previewPanel:(QLPreviewPanel *)panel transitionImageForPreviewItem:(id <QLPreviewItem>)item contentRect:(NSRect *)contentRect { int selectedRow = [self selectedRow]; NSImage *fileIcon = [[NSWorkspace sharedWorkspace] iconForFile:[[[self dataSource] tableView:self objectValueForTableColumn:fileColumn row:selectedRow] stringValue]]; return fileIcon; } @end Thanks for any help.

    Read the article

1