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

[REBOL] sort compare function with refinement?

From: raimund:swol at: 23-Feb-2001 21:55

Hi, I try to sort a block of objects using a compare function with refinements to select the member of the object I want to sort after. But I always get an error if I use a refinement? How do I have to do this? I tried the following: sort/compare book-db :compare-book/title This resulted in the following error: ** Script Error: compare-book expected A argument of type: object. ** Where: sort/compare book-db :compare-book/title If I do sort/compare book-db :compare-book the result is as expected but I have to write a separate function for every member of the object (the object is a book having the members title/author/info). Calling the function directly does work though:
>> compare-book/title book-db/3 book-db/4
== true Raimund