ImageViewManager


Inherits From:
LoadBroker
Declared In:
ImageViewManager.h


Class Description

Utility for managing NSImageView objects with their contents loaded from remote URLs.

BE SURE to invoke detachConsumer on this object before deallocating this in your class's release method.


Global Variables

Synopsis:

NSString *ImageViewManagerLoadSuccessNotification;
NSString *ImageViewManagerLoadErrorNotification;


Instance Variables

URLManager *mURLManager;

mURLManagerNo description.


Method Types

Initialization
- initWithDescriptor:progress:
- initWithDescriptor:
Background Loading
- loadURL:options:imageView:
Status and control
- stopLoading
- stopLoadingImageView:
- loadersRemaining
- status
- isDone

Instance Methods

initWithDescriptor:

- (id)initWithDescriptor:(NSString *)inDescriptor

Initialize the ImageViewManager as above but with no progress view


initWithDescriptor:progress:

- (id)initWithDescriptor:(NSString *)inDescriptor progress:(NSProgressIndicator *)inProgress

Initialize the ImageViewManager. It initializes as in [LoadBroker initWithDescriptor:consumer:success:cancelled:error:] and then sets up a URLManager to actually do the loading.


isDone

- (BOOL)isDone

Returns true if done loading; that is, no loaders remain.


loadURL:options:imageView:

- (void)loadURL:(NSString *)inURL options:(NSDictionary *)inOptions imageView:(NSImageView *)inImageView

Begin loading a page in the background. inParsingDict describes what to load and how to interpret it. inUserInputs is a dictionary of "dynamic" inputs to be added to the request. inOptions are passed to the URLLoader. inParam is any object that is passed back to the consumer when the load finishes so the consumer can recognize what finished loading; it might be a string, a dictionary, for example.


loadersRemaining

- (int)loadersRemaining

Return the number of concurrent loads remaining to be completed.


status

- (NSString *)status

Returns a status string; useful for debugging or displaying to the user to show how many items remain to be completed.


stopLoading

- (void)stopLoading

Stop loading all pending URLs. This might be done in response to a "Cancel All" button or some such.


stopLoadingImageView:

- (void)stopLoadingImageView:(NSImageView *)inImageView

Stop loading url for given image view


Version 1.1 Copyright ©2003 by Karelia Software, LLC. All Rights Reserved.