Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Scripting    F-Script Functions in Daylite
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Apprentice
Posted
I'm trying my darndest to figure out how to write a function using F-Script, but it doesn't work. An example from the F-Script blog:

>>>>>
Buddy : NSObject
{
firstName lastName

- initWithFirstName:first lastName:last
{
self := super init.
self == nil ifFalse:
[
firstName := first.
lastName := last
].
self
}

- description
{
'Hello, I am your buddy ' ++ firstName ++ ' ' ++ lastName
}
}

>>>>

That's actually a class. But it doesn't compile. However, it works fine in the F-script interpreter.

I've looked through the scripts in the Daylite Developer Kit and none of the F-Script scripts actually -use- functions. I'm finding myself having to do it the old awful way of copy and pasting code over and over again with different variables. This is no way to live!
 
Posts: 11 | Registered: November 19, 2007Reply With QuoteEdit or Delete MessageReport This Post
AJ
Marketcircle Team
Picture of AJ
Posted Hide Post
The version of FScript we use does not include class support unfortunately.

When F-Script 2.0 ships (which has class support), we'll look at upgrading to that version.
 
Posts: 890 | Location: Toronto | Registered: May 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
AJ
Marketcircle Team
Picture of AJ
Posted Hide Post
You could make an objc plugin, define your classes and methods there and then call those from f-script.
 
Posts: 890 | Location: Toronto | Registered: May 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Scripting    F-Script Functions in Daylite

© Copyright 2006 Marketcircle Inc. All rights reserved.