Hi,

Given an IKImageBrowserView that is populated with valid IKImageBrowserItem, calling 'reloadData' on the image browser view does not actually reload the data for me. The documentation says that it "Marks the receiver as needing its data reloaded" but how and when does the reload actually take place?

My application is a Core Data application and I initially thought the problem was related to bindings and updating of the managed object behind the image views back, but then I came across the sample code at apple.dev and realized that the problem still existed:

http://developer.apple.com/samplecode/IKImageBrowserViewWithCoreData

So then I boiled it down to the most basic scenario I could think of and the problem still exists. I can trigger this "bug" with something as simple as an image view backed by data source that just returns IKImageBrowserItem, who's imageRepresentationType is IKImageBrowserPathRepresentationType and who's imageRepresentation is just a path on the local file system.

The following is reproducible for me. Hopefully I'm just missing something obvious. Comments are welcome.

1. Launch application
2. Populate image browser view with two items who return 'nil' when asked for their imageRepresentation. (ImageBrowser will correctly show the empty box for each.) 3. Click on a button that simply calls a method that assigns a valid path to each item. (The path represents an image on the disk.) 4. Call reloadData on the image browser and the empty boxes will correctly be replaced with the appropriate images. 5. Now, replace each items path with another valid path on the filesystem that points to a different photo.
6. Call reloadData.
7. This time, the images are not updated.

In fact, no matter what I seem to do, the only time I can actually get the image browser to reload the data is when the items don't return a valid imageRepresentation. All other times, the image browser view seems to ignore my requests for a reload, and doesn't even call any of the IKImageBrowserItem methods at all. (Though it does if the items are initially nill).

So, if the image browser view is already populated with valid items, the reload appears to fail for me. If the image browser view is populated with items that have an invalid imageRepresentation, the reload appears to work.

Thoughts?

Sincerely,
Kenny
_______________________________________________

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 arch...@mail-archive.com

Reply via email to