AccessEngine :: AEChooser :: AEChooser :: Class AEChooser
[hide private]
[frames] | no frames]

Class AEChooser

source code

                     object --+    
                              |    
AEUserInterface.AEUserInterface --+
                                  |
                                 AEChooser

Most abstract base class for all AEChooser dialogs.

This class is abstract as most of its methods raise NotImplementedError and need to be overriden in subclasses.

Instance Methods [hide private]
 
__init__(self)
Initializes the aid variable to None and sets the block_signals flag to False.
source code
 
__call__(self, aid)
Stores a reference the AEEventManager that will be notified by _signal and a reference to the AETier in which the AEScript associated with this AEChooser is loaded.
source code
 
init(self, **kwargs)
Initializes the chooser.
source code
 
activate(self, **kwargs)
Activates the chooser.
source code
 
close(self)
Closes the chooser.
source code
 
update(self, **kwargs)
Does an update of some aspect of the AEChooser.
source code
string
_getResource(self, name)
Gets the absolute path to a file located in the same directory as this AEChooser.
source code
 
_signal(self, kind, **kwargs)
Posts an AEEvent.ChooserChange event to the AEEventManager.
source code

Inherited from AEUserInterface.AEUserInterface: getClassName, getDescription, getName, getPath

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
boolean GLOBAL_SINGLETON = False
Allow only one instance of a chooser to exist at a time globally? This flag should be overriden by a subclass to indicate whether the chooser is a global singleton or not.
boolean APP_SINGLETON = False
Allow only one instance of a chooser to exist at a time for a given application? This flag should be overriden by a subclass to indicate whether the chooser is an application singleton or not.
integer CANCEL = -1000
Indicates the chooser is canceling and its options should be ignored
integer APPLY = -1001
Indicates the chooser options should be applied immediately with no changes to its state
integer OK = -1002
Indicates the chooser is completing and its options should be applied
Instance Variables [hide private]
opaque aid
Unique identifier for the application AETier with which the AEChooser that fired this event is associated
boolean block_signals
Blocks future signals from being sent by the _signal method after a OK or CANCEL signal is sent
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initializes the aid variable to None and sets the block_signals flag to False.
Overrides: object.__init__

__call__(self, aid)
(Call operator)

source code 
Stores a reference the AEEventManager that will be notified by _signal and a reference to the AETier in which the AEScript associated with this AEChooser is loaded.
Parameters:
  • aid (AETier) - Unique identifier for the application AETier with which the AEChooser that fired this event is associated
Raises:
  • ValueError - When the GLOBAL_SINGLETON flag is set to True and a singleton already exists or APP_SINGLETON flag is set to True and a chooser for the application already exists.

init(self, **kwargs)

source code 
Initializes the chooser. Should enable the chooser for interaction with the user.
Raises:
  • NotImplementedError - When not overridden by a subclass

activate(self, **kwargs)

source code 
Activates the chooser. Called when a singleton instance of the chooser already exists, but an attempt was just made to create another. Does nothing by default. Could be used to, for instance, raise a window to the foreground.

close(self)

source code 
Closes the chooser. Should prevent further chooser interaction with the user.
Raises:
  • NotImplementedError - When not overridden by a subclass

update(self, **kwargs)

source code 
Does an update of some aspect of the AEChooser. A subclass can override this method to support updates from observers of AEEvent.ChooserChange events.
Parameters:
  • kwargs (dictionary) - Arbitrary data given by the observer. The AEChooser implementor should strong-name keyword params of interest.

_getResource(self, name)

source code 
Gets the absolute path to a file located in the same directory as this AEChooser. Useful for locating resources like glade files.
Returns: string
Path to a resource file in the same directory as the chooser

_signal(self, kind, **kwargs)

source code 

Posts an AEEvent.ChooserChange event to the AEEventManager. Chooser change events should have an arbitrary kind or one of the special OK, APPLY, CANCEL valus. Any keyword arguments will be delivered to the observer. The event will also include a reference to this AEChooser such that an observer can call the update method on it. The event is delivered only to the AEScript responsible for managing this chooser.

After one cancel or one OK signal is fired, no more signals are sent.
Parameters:
  • kind (integer) - Kind of signal, one of OK, APPLY, CANCEL or a chooser defined integer constant
  • kwargs (dictionary) - Arbitrary data to be delivered with the event

Class Variable Details [hide private]

APP_SINGLETON

Allow only one instance of a chooser to exist at a time for a given application? This flag should be overriden by a subclass to indicate whether the chooser is an application singleton or not. Meaningless if GLOBAL_SINGLETON is set.
Type:
boolean
Value:
False