Examples of NSMutableDictionary


Examples of com.webobjects.foundation.NSMutableDictionary

  //
  public NSArray itemSet1() {
    if (_itemSet1 == null) {
      NSArray keys = new NSArray(Arrays.asList("name", "value", "category"));
     
      NSMutableDictionary oneA = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(100), "01/2011")), keys);
      NSMutableDictionary oneB = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(150), "02/2011")), keys);
      NSMutableDictionary oneC = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(200), "03/2011")), keys);

      NSMutableDictionary twoA = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(200), "01/2011")), keys);
      NSMutableDictionary twoB = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(210), "02/2011")), keys);
      NSMutableDictionary twoC = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(215), "03/2011")), keys);

      NSMutableDictionary threeA = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(50), "01/2011")), keys);
      NSMutableDictionary threeB = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(55), "02/2011")), keys);
      NSMutableDictionary threeC = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(110), "03/2011")), keys);

      _itemSet1 = new NSArray(Arrays.asList(twoA, twoB, twoC, oneA, oneB, oneC, threeA, threeB, threeC));
    }
    //System.out.println("itemSet1 = "+_itemSet1);
    return _itemSet1;
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

  //
  public NSArray itemSet1a() {
    if (_itemSet1a == null) {
      NSArray keys = new NSArray(Arrays.asList("name", "value", "category"));
     
      NSMutableDictionary oneA = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(100), "01/2011")), keys);
      NSMutableDictionary oneB = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(150), "02/2011")), keys);
      NSMutableDictionary oneC = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(200), "03/2011")), keys);

      NSMutableDictionary twoA = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(200), "01/2011")), keys);
      NSMutableDictionary twoB = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(210), "02/2011")), keys);
      NSMutableDictionary twoC = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(215), "03/2011")), keys);

      NSMutableDictionary threeA = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(50), "01/2011")), keys);
      NSMutableDictionary threeB = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(55), "02/2011")), keys);
      NSMutableDictionary threeC = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(110), "03/2011")), keys);

      _itemSet1a = new NSArray(Arrays.asList(oneA, oneB, oneC, twoA, twoB, twoC, threeA, threeB, threeC));
    }
    //System.out.println("itemSet1a = "+_itemSet1a);
    return _itemSet1a;
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

 
  public NSArray itemSet2() {
    if (_itemSet2 == null) {
      NSArray keys = new NSArray(Arrays.asList("name", "value", "category"));
     
      NSMutableDictionary oneA = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(20), "01/2011")), keys);
      NSMutableDictionary oneB = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(25), "02/2011")), keys);
      NSMutableDictionary oneC = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(30), "03/2011")), keys);
      NSMutableDictionary oneD = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(75), "Total Q1")), keys);

      _itemSet2 = new NSArray(Arrays.asList(oneA, oneB, oneC, oneD));
    }
    //System.out.println("itemSet2 = "+_itemSet2);
    return _itemSet2;
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

    public void updateSourceObject(NSArray newValues) {

        // add new values to relationship, remove old values
        Object aSourceObject = _localSourceObject();
        boolean isDictionary = (aSourceObject instanceof NSMutableDictionary);
        NSMutableDictionary _dictionary = (isDictionary) ? (NSMutableDictionary) aSourceObject : null;
        EOEnterpriseObject _eo = (!isDictionary) ? (EOEnterpriseObject) aSourceObject : null;
        String masterKey = _localRelationshipKey();
        NSMutableArray currentValues = (NSMutableArray) NSKeyValueCoding.Utility.valueForKey(aSourceObject, masterKey);
        int count = currentValues.count();
        EOEnterpriseObject o;
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

        }
        if("list".equals(_context.task())) {
            _componentLevelKeys.addObject("propertyIsSortable");
            _componentLevelKeys.addObject("sortKeyForList");
        }
        _allKeys = new NSMutableDictionary();
        Configuration config = new Configuration();
        _allKeys.setObjectForKey(config.components(), "components");
        _allKeys.setObjectForKey(config.editors(), "editors");
    }
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

     * requiered, the componentName key is used to get the editors and supports.
     * @param propertyKey
     */
    protected NSDictionary componentLevelValuesForKey(String propertyKey) {
        _context.setPropertyKey(propertyKey);
        NSMutableDictionary dictionary = new NSMutableDictionary();
        for(Enumeration e = _componentLevelKeys.objectEnumerator(); e.hasMoreElements(); ) {
            String key = (String)e.nextElement();
            Object o = _context.valueForKey(key);
            if(o != null)
                dictionary.setObjectForKey(o, key);
        }
        String path = "components." + dictionary.objectForKey("componentName") + ".editors";
        NSArray keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
        }
        path = "components." + dictionary.objectForKey("componentName") + ".supports";
        keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
        }
        _context.setPropertyKey(null);
        return dictionary;
    }
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

        return dictionary;
    }

    public NSDictionary dictionary() {
      if(_dictionary == null) {
        _dictionary = new NSMutableDictionary();
        addPageLevelValues();
        NSArray displayPropertyKeys = (NSArray)_context.valueForKey("displayPropertyKeys");
        if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) {
          NSMutableDictionary componentLevelKeys = new NSMutableDictionary();
          addPropertyKeys(componentLevelKeys, displayPropertyKeys);
          _dictionary.setObjectForKey( componentLevelKeys, "componentLevelKeys");
        }
      }
      return _dictionary;
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary

  }

  public NSMutableDictionary configData() {
    if (configData == null) {
      NSData data = new NSData(application().resourceManager().bytesForResourceNamed("AjaxGridExampleConfiguration.plist", null, NSArray.EmptyArray));
      configData = new NSMutableDictionary((NSDictionary) NSPropertyListSerialization.propertyListFromData(data, CharEncoding.UTF_8));
    }

    return configData;
  }
View Full Code Here

Examples of org.robovm.cocoatouch.foundation.NSMutableDictionary

  public Preferences getPreferences (String name) {
    File libraryPath = new File(System.getenv("HOME"), "Library");
    String finalPath = new File(libraryPath, name + ".plist").getAbsolutePath();
   
    Gdx.app.debug("IOSApplication", "Loading NSDictionary from file " + finalPath);
    NSMutableDictionary nsDictionary = NSMutableDictionary.fromFile(finalPath);

    // if it fails to get an existing dictionary, create a new one.
    if (nsDictionary == null) {
      Gdx.app.debug("IOSApplication", "NSDictionary not found, creating a new one");
      nsDictionary = new NSMutableDictionary();
      boolean fileWritten = nsDictionary.writeToFile(finalPath, false);
      if (fileWritten)
        Gdx.app.debug("IOSApplication", "NSDictionary file written");
      else
        Gdx.app.debug("IOSApplication", "Failed to write NSDictionary to file " + finalPath);
    }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSMutableDictionary

//                NSNumber.CLASS.numberWithBool(false),
//                NSString.CLASS.stringWithString(QTMovie.QTMovieOpenAsyncOKAttribute),
//
//                null);
       
        NSMutableDictionary attributes = NSMutableDictionary.CLASS.dictionaryWithCapacity(2);
        attributes.setValue_forKey(NSString.CLASS.stringWithString(filename),
                QTMovie.QTMovieFileNameAttribute);
        attributes.setValue_forKey(NSNumber.CLASS.numberWithBool(false),
                QTMovie.QTMovieOpenAsyncOKAttribute);
       
        QTMovie movie = QTMovie.movieWithAttributes_error(attributes, null);
       
        assertNotNull(movie);
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.