Mailing Lists: Apple Mailing Lists

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

Re: Making new data source rows from Cocoa



On 12/3/03 2:12 AM, "Jeffrey Mattox" <email@hidden> wrote:

>
> Thank you very much for the ideas. I've been down most of those roads.
>
> To address your points:
>
> I want to make new data rows in Cocoa because AS is so slow. It
> takes a about 3 seconds to do 1,500 of those in AS. Using AS to add
> the data to the rows was slow, too.
>
> I played around with implementing my own data source in Cocoa (as you
> suggested), but I got lost when trying to do things like click on a
> column header and have it change the sort column or sort order. The
> AS code was unable to do that with my Cooca data source. So, I
> believe there are things in Cocoa that you cannot do in AS, and
> things in AS you cannot do in Cocoa. Perhaps I gave up too soon.

You did. I created Cocoa methods to do just that, with John Timmer's help.
That part wasn't hard at all, if you keep track of your Objective C
dictionary as a an instance variable, You re-sort that dictionary with
super-fast Cocoa methods and reload it.
>
> So far, I have reasonable results with leaving the data source in AS,
> using AS to make the new data rows (suffering the delay), using Cocoa
> to load the data source, and then doing column selection and sorting
> in AS.

Then you may have to stay where you are "so far". There are some things you
just can't do with Studio data sources. Fortunately call method does provide
a way to access custom data sources when you discover you need them.


--
Paul Berkowitz
_______________________________________________
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.

References: 
 >Re: Making new data source rows from Cocoa (From: Jeffrey Mattox <email@hidden>)



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.