Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Sorting an object based on one field.

From: louisaturk::eudoramail::com at: 12-Jan-2002 17:00

Hi rebols, How do you sort objects based on one field within the object. I keep running into situations where this would really be helpful. For instance, below I want to sort a directory based on date. The following code doesn't work, but I give it so you pros can see what I'm trying to do. dir: [] foreach file read %. [ info: info? file append dir make object! [date: info/date file_name: file] ] sort dir foreach di dir [ if not find di/file_name {/} [ print di/date ] ] Thanks, Louis