[MacRuby] #1044: Iteration of NSDictionary returns Array instead of NSDictionary

MacRuby ruby-noreply at macosforge.org
Tue Dec 14 18:37:07 PST 2010


#1044: Iteration of NSDictionary returns Array instead of NSDictionary
--------------------------------+-------------------------------------------
 Reporter:  ksandvik@…          |       Owner:  lsansonetti@…        
     Type:  defect              |      Status:  new                  
 Priority:  critical            |   Milestone:  MacRuby 0.8          
Component:  MacRuby             |    Keywords:  NSDictionary         
--------------------------------+-------------------------------------------
 See attached test case:


 framework 'Cocoa'
 puts "ApertureData.xml Master Image List Verifier, place the
 ApertureData.xml in same dir as this script"

 # Read in the ApertureData.xml file
 theFile = Dir.pwd + '/ApertureData.xml'
 puts theFile
 theDictionary = NSDictionary.alloc.initWithContentsOfFile(theFile)

 # Iterate through the keys and see if we have missing keys or missing
 entries. Only the Master Image section is investigated.
 masterImageDict = theDictionary['Master Image List']
 masterImageDict.each do |entry|
         puts entry.class
 end

 This should return NSDictionary entries, verified by inspecting the xml
 file with Property List editor. Instead NSArray entries are returned.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1044>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list