Exploring ScriptSharp

88 views
Skip to first unread message

Andrea Del Signore

unread,
Sep 22, 2011, 9:50:27 AM9/22/11
to Scriptsharp
Hello,

I'm a newbee that is just exploring the script# compiler.
I'm trying to bind some big framework like qooxdoo or sproutcore, but
I've some (expected) difficulties.

For example, given this sproutcore JS snippet

Todos.Todo = SC.Object.extend({
title: null,
isDone: false
});

how can I code a c# syntax that will produce this code block?

{
title: null,
isDone: false
}

I've also some more questions, but let start with this ;)

Thanks for your help.
Best regards,
Andrea

rekna

unread,
Sep 22, 2011, 10:57:15 AM9/22/11
to Scriptsharp
You can use Dictionary:
Dictionary tmp = new Dictionary("title",null,"isDone:false);
will produce
var tmp = { title:null, isDone:false };
beware, Dictionary only seems to accept constant values.

Andrea Del Signore

unread,
Sep 22, 2011, 11:04:19 AM9/22/11
to Scriptsharp
Oh thanks for the quick response!

Andrea
Reply all
Reply to author
Forward
0 new messages