Talk About Network

Google




Programming > Applescript > Ouch...sort of.
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1506 of 1697
Post > Topic >>

Ouch...sort of.

by Joshua Whalen <joshuafwhalen@[EMAIL PROTECTED] > Sep 13, 2007 at 10:02 PM

Thanks, first of all, to everyone who answered my previous
posts. For better or worse, I have one more:

This is, first of all, an Applescript Studio question. 

I have the following code, which appears in several parts of my app:

      set MyShowData to a reference to my PickAShow()
      set thedatasource to data source of table view 1 of scroll view 1 
of window 1
      tell thedatasource --of table view 1 of scroll view 1 of window 1
         if (count data columns) = 0 then
            repeat 3 times
               make new data column at end of data columns
            end repeat
         end if
         set theNewRow to make new data row at end of data rows
         set contents of data cell 1 of theNewRow to (airtime of 
MyPickedShow)
         set contents of data cell 2 of theNewRow to (showname of 
MyPickedShow)
         set contents of data cell 3 of theNewRow to (runtime of 
MyPickedShow)
         
      end tell
   else if name of theObject = "reveal" then
      if (count data rows of data source of table view 1 of scroll view 
1 of window 1) is greater than 0 then
         set theSelectedRow to selected data row of table view 1 of 
scroll view 1 of window 1
         set thePath to contents of data cell 2 of theSelectedRow
         tell application "Finder" to reveal alias thePath
      end if


what I need to do is make this sortable. In fact, I need to make it sort 
itself, every time, by date.

Now, I have a formatter set for row 1. Row one uses a data formatter 
that has this format: %m/%d/%y - %I:%M

that works out to "9/13/07 - 10:00" which is just as I want it. 

I've tried a whole bunch of examples from the macscripter bbs, apple's 
developer website, et al. I guess I'm doing something wrong. Anyone got 
a clue?

thanks again, everyone.

Joshua
 




 1 Posts in Topic:
Ouch...sort of.
Joshua Whalen <joshuaf  2007-09-13 22:02:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Mon Jan 5 23:53:17 PST 2009.