Examples of removeObserver()


Examples of com.webobjects.foundation.NSNotificationCenter.removeObserver()

     *
     * When this happens, the ec throws an exception. To prevent this, the ec
     * is removed here as an observer for notifications when it is serialized.
     */
    NSNotificationCenter nc = NSNotificationCenter.defaultCenter();
    nc.removeObserver(this);
  }
}
View Full Code Here

Examples of ns.foundation.NSNotificationCenter.removeObserver()

  public void testRemoveObserverObject() {
    NSNotificationCenter nc = NSNotificationCenter.defaultCenter();
    TestObserver observer = new TestObserver();
    nc.addObserver(observer, new NSSelector<Void>("invoked", new Class[] { NSNotification.class }), "test", null);
    nc.removeObserver(observer);
    nc.postNotification("test", this);
    assertFalse(observer.invoked);
  }

  public void testRemoveObserverObjectStringObject() {
View Full Code Here

Examples of ns.foundation.NSNotificationCenter.removeObserver()

    NSNotificationCenter nc = NSNotificationCenter.defaultCenter();
    TestObserver observer1 = new TestObserver();
    TestObserver observer2 = new TestObserver();
    nc.addObserver(observer1, new NSSelector<Void>("invoked", new Class[] { NSNotification.class }), "test", null);
    nc.addObserver(observer2, new NSSelector<Void>("invoked", new Class[] { NSNotification.class }), "test", null);
    nc.removeObserver(observer2, "test", null);
    nc.postNotification("test", this);
    assertTrue(observer1.invoked);
    assertFalse(observer2.invoked);
  }
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

            eventBus.addObserver(GotPersonJoinedGroupsResponseEvent.class,
                    new Observer<GotPersonJoinedGroupsResponseEvent>()
                    {
                        public void update(final GotPersonJoinedGroupsResponseEvent event)
                        {
                            eventBus.removeObserver(event, this);

                            groups = event.getResponse();
                            if (subscribedGroupIds != null)
                            {
                                populate();
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

            eventBus.addObserver(GotGroupActivitySubscriptionsResponseEvent.class,
                    new Observer<GotGroupActivitySubscriptionsResponseEvent>()
                    {
                        public void update(final GotGroupActivitySubscriptionsResponseEvent event)
                        {
                            eventBus.removeObserver(event, this);

                            subscribedGroupIds = event.getResponse();
                            if (groups != null)
                            {
                                populate();
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

    public void unwireEventHandlers()
    {
        if (eventsWired)
        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.removeObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.removeObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.removeObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.removeObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = false;
        }
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

    {
        if (eventsWired)
        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.removeObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.removeObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.removeObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.removeObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = false;
        }
    }
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

        if (eventsWired)
        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.removeObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.removeObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.removeObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.removeObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = false;
        }
    }
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.removeObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.removeObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.removeObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.removeObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = false;
        }
    }

    /**
 
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

    @Override
    protected void onDetach()
    {
        super.onDetach();
        final EventBus eventBus = EventBus.getInstance();
        eventBus.removeObserver(UpdatedNotificationFilterPreferencesResponseEvent.class, settingsSavedObserver);
        eventBus.removeObserver(GotNotificationFilterPreferencesResponseEvent.class, gotDataObserver);
    }

    /**
     * Gathers settings and sends to model to send to server.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.