NSObject(DRSetupPanelDelegate)

Extends Class:
Declared In:

Overview

This category defines a set of methods that delegates of the setup panels can implement to control the behavior of the panel.



Methods

-setupPanel:determineBestDeviceOfA:orB:

Allows the delegate to specify which device is its preferred.

-setupPanel:deviceContainsSuitableMedia:promptString:

This delegate method allows the delegate to determine if the media inserted in the device is suitable for whatever operation is to be performed.

-setupPanel:deviceCouldBeTarget:

Allows the delegate to determine if device can be used as a target.

-setupPanelDeviceSelectionChanged:

Sent by the default notification center when the device selection in the panel has changed.

-setupPanelShouldHandleMediaReservations:

This delegate method allows the delegate to control how media reservations are handled.


setupPanel:determineBestDeviceOfA:orB:


Allows the delegate to specify which device is its preferred.

- (DRDevice*) setupPanel:(DRSetupPanel*)aPanel 
        determineBestDeviceOfA:(DRDevice*)deviceA orB:(DRDevice*)device; 
Parameters
aPanel

The panel.

deviceA

A candidate device. May be nil.

deviceA

A candidate device. May be nil.

Return Value

One of the two device objects passed in.

Discussion

When the setup panel is first displayed and again, each time a new device appears, the setup panel will ask the delegate to compare two devices to determine which is most suitable for their content to burn.


setupPanel:deviceContainsSuitableMedia:promptString:


This delegate method allows the delegate to determine if the media inserted in the device is suitable for whatever operation is to be performed.

- (BOOL) setupPanel:(DRSetupPanel*)aPanel 
        deviceContainsSuitableMedia:(DRDevice*)device promptString:(NSString**)prompt; 
Parameters
aPanel

The setup panel sending the message.

device

The device that contains the media being asked about.

prompt

A pointer to storage for an NSString. Pass back an NSString object describing the media state.

Return Value

Return NO to disable the default button.


setupPanel:deviceCouldBeTarget:


Allows the delegate to determine if device can be used as a target.

- (BOOL) setupPanel:(DRSetupPanel*)aPanel 
        deviceCouldBeTarget:(DRDevice*)device; 
Parameters
aPanel

The panel.

device

The candidate device.

Return Value

YES if the device is acceptable, NO if not.

Discussion

This method is used to limit the menu to only those devices that you want to appear. For example, a DVD burning application might use this to limit the menu to only devices that are capable of writing DVD-Rs.


setupPanelDeviceSelectionChanged:


Sent by the default notification center when the device selection in the panel has changed.

- (void) setupPanelDeviceSelectionChanged:(NSNotification*)aNotification; 
Parameters
aNotification

Notification object. This is always DRSetupPanelDeviceSelectionChangedNotification . You can retrieve the DRSetupPanel object in question by sending object to aNotification. The userInfo dictionary contains the single key DRSetupPanelSelectedDeviceKey whose value is the DRDevice object that is currently selected.


setupPanelShouldHandleMediaReservations:


This delegate method allows the delegate to control how media reservations are handled.

- (BOOL) setupPanelShouldHandleMediaReservations:(DRSetupPanel*)aPanel; 
Parameters
aPanel

The setup panel sending the message.

Return Value

Return NO to indicate the delegate will handle media reservations. Return YES to indicate the setupPanel should handle media reservations itself.

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-08-13