At 10:55 AM -0500 3/9/03, you wrote:
Hi all,

I have two unrelated queries.  Both of them I have come up with workable
solutions, but both seem cumbersome.  There must be a better way!

1.  When using DirectMediaXtra, it does not support a negative movieRate.
Has anyone written a behavior that rewinds an MPEG1 file somewhat smoothly?
(I don't have the option of running the MPEG file in a QT shell.)


2. Assuming I have a list as such:


[["apple",2003], ["about",2000], ["avocado",2003], ["apple",1998],
["angle",2000], ["atrocity", 2003]]

I need to first sort the list by year (most recent first) and then
alphabetize the first item within each year, giving the following result:

-- [["apple",2003], ["atrocity", 2003], ["avocado",2003], ["about",2000],
["angle",2000], ["apple",1998]]

Is there a simple way of doing this that I am missing.  Please point me in
the right direction...

If you want your primary sort to be on the years, then I'd make a temporary pList with the years as the props & sort that & then strip it back to what you want.


here's what I mean:

on sortIt origList
  tempList = []
  tot = origList.count
  repeat with i = 1 to tot
    tempList[i] = [string(origList[i][2]), origList[i]]
  end repeat
  tempList.sort()
  newList = []
  repeat with i = 1 to tot
    newList[i] = tempList[i][2]
  end repeat
  put newList
end

so from the message window ...

sortIt ([["apple",2003], ["atrocity", 2003], ["aatrocity", 2003], ["about",2000], ["avocado",2003], ["apple",1998], ["angle",2000], ["xtrocity", 2003], ["aatrocity", 1998]])

-- [["aatrocity", 1998], ["apple", 1998], ["about", 2000], ["angle", 2000], ["aatrocity", 2003], ["apple", 2003], ["atrocity", 2003], ["avocado", 2003], ["xtrocity", 2003]]

hth
-Buzz



Thanks, -_Craig


Craig Taylor Renegade Digital Media Inc. E: [EMAIL PROTECTED]


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to