• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OSAScriptView - documentation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OSAScriptView - documentation?


  • Subject: Re: OSAScriptView - documentation?
  • From: 2551 <email@hidden>
  • Date: Thu, 15 Aug 2013 22:15:53 +0700

Thank you. I will definitely look into that! :)


On 15 Aug 2013, at 20:50, Kaydell Leavitt <email@hidden> wrote:

Phil,

You might want to consider using the following three classes which are all Objective-C classes and can be used together.  The following three classes are all from the OSAKit:

1. OSAScriptView, The "view" of model-view-controller (MVC)
2. OSAScriptController, The "controller" of model-view-controller
and
3. OSAScript, The "model" of model-view-controller.

I agree with you that the documentation appears to be nonexistent.  If you  had to, you could sign up for the paid Mac Developer Program at Apple and get 2 tech-support incidences. 

It is possible to use either OSAScript or NSAppleScript as the model to compile and run AppleScript code in Cocoa without calling osascript in Unix, but here is a link to some Cocoa code that does call osascript to execute AppleScript code.  It's not done, but it is a good start:

https://gist.github.com/kaydell/6189741

The above link is in a "gist" on github.com, so if you improve it, by adding more error-handling, I would appreciate if if you would check your improvements back into the gist.

What I'm doing now is just using the OSAScript from the OSAKit in Objective-C, for my model, and using my own controller and using NSTextView for the view.

It isn't too bad this way.  It works fairly well with only a little bit of code, but I need to figure out how to hook things into the Document class so that the whole thing works together.    Things like the syntax-coloring are a feature of OSAScript, it will give you rich text back to put into the view, so that works.

-- Kaydell
email@hidden
Learn By Mac: http://learnbymac.com




Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
References: 
 >OSAScriptView - documentation? (From: 2551 <email@hidden>)
 >Re: OSAScriptView - documentation? (From: Kaydell Leavitt <email@hidden>)

  • Prev by Date: Re: OSAScriptView - documentation?
  • Next by Date: Re: OSAScriptView - documentation?
  • Previous by thread: Re: OSAScriptView - documentation?
  • Next by thread: Re: Recording AppleEvent Class Codes
  • Index(es):
    • Date
    • Thread