dorba / blade Goto Github PK
View Code? Open in Web Editor NEWThe core tools for Blade rich client development.
The core tools for Blade rich client development.
I have a class with both a static and a regular constructor. The following error is thrown at build time:
"Constructor overloading is not supported. Consider using optional parameters instead."
You end up with something like: get_propertyName()++
I believe the signature of the extension method should be changed to
public static TOut[] map<T, TOut>(this T[] array, Func<T, int, T[], TOut> callback, object thisObj = null)
As it does not makes much sense to have the return type to be T[] if the mapping method returns TOut.
Consider the following:
class BaseClass
{
public virtual string[] Foo { get { return new[] { "Base" }; } }
public BaseClass()
{
console.log(Foo);
}
}
class ChildClass : BaseClass
{
private string[] _bar = new string[] { "Child" };
public override string[] Foo { get { return _bar; } }
public ChildClass()
: base()
{ }
}
The compiled JavaScript will actually initialize the array out of order, which is inconsistent with how c# works:
ChildClass = (function() {
Blade.derive(ChildClass, BaseClass);
var $base = BaseClass.prototype;
function ChildClass() {
$base.constructor.call(this);
this._bar = ['Child'];
}
var p = ChildClass.prototype;
p.get_Foo = function() {
return this._bar;
};
return ChildClass;
})();
It look like Roslyn is required. Roslyn requires the VsSDK. I tried to install that but then it asked for my VS install disk. I bailed at that point.
Is all that really required? I have VS 2010 Ultimate (and 2012 RC) installed.
Any help on the easiest route to get going would be great. I can't wait to dig in!
Dan
The following code fails to compile with the error: No translator was found to handle model of type Blade.Compiler.Models.Argument
public class TestClass
{
public TestClass(string someString)
{
}
}
public class TestSubClass : TestClass
{
public TestSubClass(string someString)
: base(someString)
{
}
}
Microsoft has now officially released Roslyn on Codeplex: http://roslyn.codeplex.com/
Blade has really high potential and I really like it's architecture. You should continue on it ;)
Floating point constants are generated with the current Windows culture. For example compiling the following:
public const double test = 0.2f;
when Windows is set for France settings, will output this:
BladeBug.Class1.test = 0,2;
Chrome has support for source maps in its set of developer tools for debugging javascript code. Source maps allow you to map the generated javascript to lines in the original source, so you can debug in the original source language. Would be nice to support this feature in a C# to javascript compiler by also generating source map files.
This project sounds awesome, and I'm psyched to try it out, but when I run the installer, I get this error message:
Could not access network location Extensions\Blade
Any idea why I'm seeing this?
I use a partial class in my project. there r two Constructors in this class.when i build it,the error is "Constructor overloading is not supported. Consider using optional parameters instead."
i want to know if this is a bug or not?
ps:when i commented one constructor,the error is gone.
Lamda expressions don't seem to return a value.
Eg) a => a + 1
compiles to
function(a) {
a + 1;
}
instead of
function(a) {
return a + 1;
}
hey guys,
could you please clarify which license you use and add the file to the root of the project ?
Thanks
Pavel
Is there support for Monodevelop / mono for *nix systems?
Hello,
I'm planning to use Blade in place of ScriptSharp, and would also like to contribute if possible. Some questions:
[ScriptJson???]
public class Dummy {
public int a;
public int b;
}
C# ---> var x = new Dummy() { a = 5, b = 4 } ;
JS ---> var x = { a: 5, b: 4 };
Managed to do something close by using ScriptName("Object") but it generates too verbose code with inline functions etc.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.