def subscribe( event, handler )

      @events = %w{ onSendRequest onProcessResponse onSetActiveTable
                    onRequestSucceeded onRequestFailed onSetActiveRecord
                    onSetActiveField } if @events.nil?

      if @events.include?( event )
         if handler and handler.is_a?( EventHandler )
            if @eventSubscribers.nil?
               @eventSubscribers = {}
            end
            if not @eventSubscribers.include?( event )
               @eventSubscribers[ event ] = []
            end
            if not @eventSubscribers[ event ].include?( handler )
               @eventSubscribers[ event ] << handler
            end
         else
            raise "subscribe: 'handler' must be a class derived from QuickBase::EventHandler."
         end
      else
         raise "subscribe: invalid event '#{event}'.  Valid events are #{@events.sort.join( ', ' )}."
      end
   end
def subscribe( event, handler )

      @events = %w{ onSendRequest onProcessResponse onSetActiveTable
                    onRequestSucceeded onRequestFailed onSetActiveRecord
                    onSetActiveField } if @events.nil?

      if @events.include?( event )
         if handler and handler.is_a?( EventHandler )
            if @eventSubscribers.nil?
               @eventSubscribers = {}
            end
            if not @eventSubscribers.include?( event )
               @eventSubscribers[ event ] = []
            end
            if not @eventSubscribers[ event ].include?( handler )
               @eventSubscribers[ event ] << handler
            end
         else
            raise "subscribe: 'handler' must be a class derived from QuickBase::EventHandler."
         end
      else
         raise "subscribe: invalid event '#{event}'.  Valid events are #{@events.sort.join( ', ' )}."
      end
   end
Subscribe to a specified event published by QuickBase::Client.