opensubscriber
   Find in this group all groups
 
Unknown more information…

a : applescript-studio@lists.apple.com 7 January 2006 • 11:18PM -0500

Re: Using CoreData with AppleScript Studio
by Kiel

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi Takaaki,

Many thanks for supplying a solution.
The funny thing is, that I just wrote (a minute ago) some emails to  
some of my customers that I haven't found a solution to combine ASS  
and Core Data within one of my apps.
I will try that code immediately.

Regards
Andreas Kiel


On 07.01.2006, at 13:21, Takaaki Naganoya wrote:

> We can make core data app with AppleScript Studio. The app can  
> access to
> selected row. I'll show the way. Attached file is the sample project.
>
> step1: Make "Core Data Application"
> step2: Add "AppleScript kit" framework to the project
> step3: Rewrite main.m like this....
>
> <code>
> #import <Cocoa/Cocoa.h>
> #import <mach-o/dyld.h>
>
> extern int NSApplicationMain(int argc, const char *argv[]);
>
> int main(int argc, const char *argv[])
> {
>     if (NSIsSymbolNameDefined("_ASKInitialize"))
>     {
>         NSSymbol *symbol = NSLookupAndBindSymbol("_ASKInitialize");
>         if (symbol)
>         {
>             void (*initializeASKFunc)(void) = NSAddressOfSymbol
> (symbol);
>             if (initializeASKFunc)
>             {
>                 initializeASKFunc();
>             }
>         }
>     }
>
>     return NSApplicationMain(argc, argv);
> }
> </code>
>
> step4: Add "AppleScript text file"
> step5: Add "AppleScript Build phase" to target
> step6: Regist AppleScript file(step4) to AppleScript Build phase
> (step5)
> step7: Make some CoreData model
> step8: Drop entity from Xcode to IB
> step9: Do ASS work as usual....
>
> That's all. We may be able to access whole data by using OSAX such as
> SQLiteAddOns. If we can get the sample Objective-C code to access  
> data, the
> OSAX is not be needed.
>
>
> --SQLiteAddOns OSAX
> <http://sqlabs.net>
>
> --
> Takaaki Naganoya
> Piyomaru Software
> http://www.appleco.jp/piyomarusoft/
>
> On 05.7.9 5:36 AM, "Andreas Kiel" <kiel@sphe...> wrote:
>
>> Joel,
>>
>> I tried both the Apple core data example and the one from the
>> "cocoadevcentral", they both work and both together give a quite good
>> overview of what can be done with simple means, as well how a data
>> model could work or work not.
>> I tried to implement a data model into an ASS app, which
>> unfortunately did not work and I tried to implement AS into the Cocoa
>> app, where I did not succeed either. That's definitively my lack of
>> of knowledge, but I haven't found any docs on how to do.
>> While rebuilding the mentioned examples I was also quite disappointed
>> that the relations that can be defined are not that kind of relations
>> I'm used to for example from Filemaker (or other theoretical data
>> modeling) they seem to be some kind "just a connection" and also here
>> I did not find any docs which were more in depth. So for now I  
>> gave up.
>> If you are able to create a small Objective-C app that uses CoreData
>> it should work - I think. But I wouldn't expect too much from it from
>> that what I've seen. But that's only an opinion of somebody who knows
>> too little.
>>
>> Regards
>> Andreas
>>
>>
>> On 08.07.2005, at 20:22, Joel List natividad wrote:
>>
>>> Andreas,
>>> Thanks for taking the time to answer my query.  How did you try
>>> exactly?
>>>
>>> I was thinking of using SQL with my AppleScript app and CoreData
>>> seemed to fit the bill.  Should I explore bundling MySQL/PostgreSQL
>>> instead?
>>>
>>> Could I possibly create a small Objective-C app that uses CoreData
>>> and send my SQL commands thru it instead?
>>>
>>> Thanks in advance,
>>> Joel
>>>
>>> On Jul 8, 2005, at 8:49 AM, Andreas Kiel wrote:
>>>
>>>
>>>> I tried and didn't succeed. But maybe I missed something.
>>>>
>>>> Andreas
>>>>
>>>> On 08.07.2005, at 14:29, JoelList Natividad wrote:
>>>>
>>>>
>>>>
>>>>> Folks,
>>>>> Another noob question, but is it possible to use CoreData from an
>>>>> AppleScript Studio application?
>>>>>
>>>>> I browsed the documentation high and low and I couldn't find
>>>>> anything
>>>>> on the combination.
>>>>>
>>>>> Thanks in advance,
>>>>> Joel
>>>>>  _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Applescript-studio mailing list      (Applescript-
>>>>> studio@list...)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> http://lists.apple.com/mailman/options/applescript-studio/kiel%
>>>>> 40spherico.com
>>>>>
>>>>> This email sent to kiel@sphe...
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Applescript-studio mailing list      (Applescript-
>> studio@list...)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/applescript-studio/maro%40b-
>> mark.nu
>>
>> This email sent to maro@b-ma...
>>
>
> <coreDataAndAS.zip>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (Applescript-studio@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/subscriber%40opensubscriber.com

This email sent to subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.