• 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: World Builder Type Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: World Builder Type Application


  • Subject: Re: World Builder Type Application
  • From: Sherm Pendley <email@hidden>
  • Date: Wed, 9 May 2007 16:54:26 -0400

On May 9, 2007, at 4:37 PM, Uli Kusterer wrote:

For your script language, a neat thing you could do with Cocoa would be to use NSScanner to break it up into lines and those into words. Define a very simple and strict syntax for now, something like:

<object> <action> <param>

Each object would get a name (one word), and then you'd just search the current scene for an object of that name, and use NSSelectorFromString() to turn the action into a SEL, and then use performSelector: on the object you looked up to call a method of that name and with that param, after checking whether the SEL is Nil or the object doesn't respondsToSelector:.

If you want a finished programming language, Lua might also be worth looking into, I think there's a Cocoa wrapper around that somewhere on the web. It's not a very pretty language, but easy to integrate into other applications. Well, IMNSHO it's an ugly language, but YMMV...

Or Perl, Ruby, Python, FScript, etc. Scripting options for Cocoa apps are plentiful.


sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >World Builder Type Application (From: Mike Burns <email@hidden>)
 >Re: World Builder Type Application (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Object Scope
  • Next by Date: Re: Object Scope
  • Previous by thread: Re: World Builder Type Application
  • Next by thread: Re: World Builder Type Application
  • Index(es):
    • Date
    • Thread