My IKImageBrowserView bound to an ArrayController is now spitting out
this error when the program launches

--ImageKit Error: reloadData called in non main thread

When I unbind it the error goes away along with the content no longer
being displayed. Any idea what could cause this?

Adam


On Sat, Apr 5, 2008 at 11:16 AM, Adam Knight <[EMAIL PROTECTED]> wrote:
> I can second this approach as working.  I used an array of objects and then
> pointed the delegate and dataSource to the view controller that holds the
> array as well as bound the content to it.  While the methods are called
> (silly design) to get the count, etc. the view does update when the array is
> changed.
>
> I've come to the conclusion that this object isn't finished yet.  Please
> file bugs to duplicate the ones I've filed. :)  This object has a lot of
> potential, but like many other new Image Kit items, it's buggy as heck.
>
> Adam Knight
> Co-founder; CTO
> [EMAIL PROTECTED]
>
>
> On Apr 4, 2008, at 11:39 PM, Adam Gerson wrote:
>
>
> I know its a hybrid approach, but the upside is I did not have to call
> reloadData. As soon as I added an object to the arraycontroller it
> became available in the view.
>
> Adam
>
>
> On Sat, Apr 5, 2008 at 12:28 AM, Steve Weller <[EMAIL PROTECTED]> wrote:
>
>  On Apr 4, 2008, at 2:18 PM, Adam Gerson wrote:
>
>
> It does work. I have defined a core data entity that conforms to
>
> IKBrowerItem protocol and my IKImageBrowserView is working with
>
> bindings. I think you still need to point the delegate and data source
>
> outlets to an object that implements the datasource methods:
>
>
>
>  Are you doing the below plus bindings? That makes no sense to me.
>
>  The code below is using the array controller as its data source. That means
> you have to manually use reloadData I assume. My goal is to update a store
> of images that is KVO/KVC compliant and have the view update automatically
> as images are added and removed.
>
>
>
>
>
>
>
>
>
>
> //
> -------------------------------------------------------------------------
>
> //      numberOfItemsInImageBrowser:view
>
>
>
>
>
>
>
> //
> -------------------------------------------------------------------------
>
> - (int)numberOfItemsInImageBrowser:(IKImageBrowserView*)view
>
> {
>
>        // The item count to display is the datadsource item count.
>
>   return [[imageBrowserArrayController arrangedObjects] count];
>
> }
>
>
>
> //
> -------------------------------------------------------------------------
>
> //      imageBrowser:view:index:
>
> //
> -------------------------------------------------------------------------
>
> - (id)imageBrowser:(IKImageBrowserView *) view itemAtIndex:(int) index
>
> {
>
>   return [[imageBrowserArrayController arrangedObjects]
> objectAtIndex:index];
>
> }
>
>
>
>
>
> // Implement some optional methods of the image browser  datasource
>
> protocol to allow for removing and reodering items.
>
>
>
> //
> -------------------------------------------------------------------------
>
> //      removeItemsAtIndexes:
>
> //
>
> //      The user wants to delete images, so remove these entries from the
>
> data source.
>
> //
> -------------------------------------------------------------------------
>
> - (void)imageBrowser:(IKImageBrowserView*)view removeItemsAtIndexes:
>
> (NSIndexSet*)indexes
>
> {
>
>        [imageBrowserArrayController
> removeObjectsAtArrangedObjectIndexes:indexes];
>
> }
>
>
>
>
>
> On Fri, Apr 4, 2008 at 1:01 AM, Steve Weller <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> I am attempting to use bindings to supply an IKImageBrowserView with
> data.
>
> I have successfully used IKImageBrowserView with a data source, but
> cannot
>
> get bindings to work. Should it work with bindings?
>
>
>
> The array controller's contentArray is hooked up to an NSMutableArray
>
> called storedImages. That contains instances of storedImage. And those
> have
>
> a method browserObject that returns instances of an object that
> implements
>
> the IKBrowerItem protocol to fetch and display an image (uid, path,
> etc).
>
>
>
> The Image Kit browser is bound to the array controller's arranged
> objects
>
> with the model key path browserObject. It is set to automatically
> prepare
>
> content.
>
>
>
> I get no images displayed even though there are plenty in the
> storedImages
>
> array. I am telling the browser view to reload its data.
>
>
>
> If I set a breakpoint at browserObject, it is never hit. So it looks
> like
>
> the array controller is never attempting to read my model. I get no
> errors
>
> when loading my nib.
>
>
>
>
>
> --
>
> Blog:  http://www.bagelturf.com/   Photos: http://bagelturf.smugmug.com/
>
>
>
>
>
>
>
>
>
> _______________________________________________
>
>
>
> Cocoa-dev mailing list ([email protected])
>
>
>
> 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/agersonl%40gmail.com
>
>
>
> This email sent to [EMAIL PROTECTED]
>
>
>
>
>
>
>
>
>  --
>  Blog:  http://www.bagelturf.com/   Photos: http://bagelturf.smugmug.com/
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> 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/adam.knight%40bssware.com
>
> This email sent to [EMAIL PROTECTED]
>
>
_______________________________________________

Cocoa-dev mailing list ([email protected])

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]

Reply via email to