Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Special sorting with data source



Hello everybody,

I am trying to sort a table connected to a data source in a AS Studio app. The data rows represent mails with their subject. I would like to sort these subjects alphabetically but with one exception: when the string starts with "Re:", then the sorting process forgets the "Re:" and sort the rows following the original subject. (like in Mail.app).
For example, if I have this rows: {"A subject","Other Subject","Re: A subject"} I would like to get : {"A subject","Re: A subject", "Other Subject"} when I sort it.
I have seen in the cocoa doc that you can make your own "selector" (like ascending, descending,...) and tell the data source to "sortUsingselector:". I didn't find any examples in the cocoa-dev list. I also have the impression that AS studio data sources and NSTableDataSource are not exactly the same object.
Does someone know how these selectors work in cocoa?
Can I create a selector to sort a data source in Cocoa and still use the data source in AS studio ?

Thanks for any answer.

Romain.

-----------------------

iList allows you to browse, search, display, organize and download messages from Apple Developers Mailing Lists.
<http://www.macupdate.com/dev.php?id=10807>
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.