Re: IKImageBrowserView with NSArrayController bindings
On 13 Nov 2008, at 11:25, Florian Soenens wrote: NSLog([[arrayController selectionIndexes] description]); Not related to your problem, but this style of NSLog has a potential pitfall if the description method were to return a string with any of the supported formatting sequences in it. It would be expecting other parameters to fill in the details. The usual and simpler version would be: NSLog(@"%@", [arrayController selectionIndexes]); (The %@ get replaced by the result of the supplied object's description method) Matt Gough ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: IKImageBrowserView with NSArrayController bindings
One more thing on this, if i bind an nstableview to my NSArrayController (to just display the path to the image object) the arrayController does reflect the changes, like so: - (void)tableViewSelectionDidChange:(NSNotification *)aNotification { NSLog([[arrayController selectionIndexes] description]); } The log displays different indexes like it should, so i assume that IKImageBrowserView could have a bug in it's bindings. PS: is it enough to just bind the IKImageBrowserView to Controller Key @"arrangedObject" without a Model Key Path? On 13 Nov 2008, at 10:29, Florian Soenens wrote: Hi list, i have an IKImageBrwoserView bound to an NSArrayController of objects. The objects all conform to the IKImagebrowserItem protocol. When running my application, all the images display correctly in the browser view, this al works fine, BUT: In the IKImageBrowserDelegate, i implemented imageBrowserSelectionDidChange like this for testing purposes: (I also have an IBOutlet to my NSArrayController) - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { NSLog([[arrayController selectedIndex] description]); } The problem is that the NSArrayController always logs the same index, no mather what item i select in de BrowserView. I assumed that it would always reflect the currently selected index. I can fix it by doing this but i am not sure if this is the right way to go, or is it just a bug in IKImageBrowserView? - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { [arrayController setSelectionIndexes:[aBrower selectionIndexes]]; NSLog([[arrayController selectedIndex] description]); } Help would be much appreciated. Thanks, Florian. Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/florian.soenens%40nss.be This email sent to [EMAIL PROTECTED] Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: IKImageBrowserView with NSArrayController bindings
I'm sorry, i was typing this out of my head in mail. Here's what i did: - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { [arrayController setSelectionIndexes:[aBrower selectionIndexes]]; NSLog([[arrayController selectionIndexes] description]); } Any ideas? On 13 Nov 2008, at 11:10, Quincey Morris wrote: On Nov 13, 2008, at 01:29, Florian Soenens wrote: - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { NSLog([[arrayController selectedIndex] description]); } The problem is that the NSArrayController always logs the same index, no mather what item i select in de BrowserView. I assumed that it would always reflect the currently selected index. NSArrayController doesn't respond to 'selectedIndex' -- I think you mean 'selectionIndex'. You should have got a compilation error for this. IAC, the index is an integer, not an object, so you couldn't have usefully sent a 'description' message to it either. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/florian.soenens%40nss.be This email sent to [EMAIL PROTECTED] Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: IKImageBrowserView with NSArrayController bindings
On Nov 13, 2008, at 01:29, Florian Soenens wrote: - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { NSLog([[arrayController selectedIndex] description]); } The problem is that the NSArrayController always logs the same index, no mather what item i select in de BrowserView. I assumed that it would always reflect the currently selected index. NSArrayController doesn't respond to 'selectedIndex' -- I think you mean 'selectionIndex'. You should have got a compilation error for this. IAC, the index is an integer, not an object, so you couldn't have usefully sent a 'description' message to it either. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
IKImageBrowserView with NSArrayController bindings
Hi list, i have an IKImageBrwoserView bound to an NSArrayController of objects. The objects all conform to the IKImagebrowserItem protocol. When running my application, all the images display correctly in the browser view, this al works fine, BUT: In the IKImageBrowserDelegate, i implemented imageBrowserSelectionDidChange like this for testing purposes: (I also have an IBOutlet to my NSArrayController) - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { NSLog([[arrayController selectedIndex] description]); } The problem is that the NSArrayController always logs the same index, no mather what item i select in de BrowserView. I assumed that it would always reflect the currently selected index. I can fix it by doing this but i am not sure if this is the right way to go, or is it just a bug in IKImageBrowserView? - (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser { [arrayController setSelectionIndexes:[aBrower selectionIndexes]]; NSLog([[arrayController selectedIndex] description]); } Help would be much appreciated. Thanks, Florian. Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]