Examples of NSSelector


Examples of com.webobjects.foundation.NSSelector

    if (initialized) {
      return;
    }

    initialized = true;
    NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("modelAdded", NotificationClassArray),
        EOModelGroup.ModelAddedNotification, null);
    NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("modelRemoved", NotificationClassArray),
        EOModelGroup.ModelInvalidatedNotification, null);
    NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("storeCoordinatorAdded", NotificationClassArray),
        EOObjectStoreCoordinator.CooperatingObjectStoreWasAddedNotification, null);
    NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("storeCoordinatorRemoved", NotificationClassArray),
        EOObjectStoreCoordinator.CooperatingObjectStoreWasRemovedNotification, null);

    Class<?> ERXClass = _NSUtilities.classWithName("er.extensions.foundation.ERXUtilities");
    if (ERXClass != null) {
      try {
        _ERXEntityCache = ERXClass.getDeclaredField("_entityNameEntityCache");
        _ERXEntityCache.setAccessible(true);

        ERXClass = _NSUtilities.classWithName("er.extensions.eof.ERXEntityClassDescription");
        Method factory = ERXClass.getDeclaredMethod("factory");
        _ERXEntityClassDescriptionFactory = factory.invoke(null, new Object[0]);

        ERXClass = _NSUtilities.classWithName("er.extensions.eof.ERXEntityClassDescription$Factory");
        _ERXEntityClassDescriptionCacheReset = ERXClass.getDeclaredMethod("reset");
       
        NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("resetWonderEntityCache", NotificationClassArray), EO_ENTITY_CACHE_RESET, null);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
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.