Closed GoogleCodeExporter closed 9 years ago
The default attribute for all types is Clr mode - which means that the
generated code is ok. You can add assembly level JsType attribute and change
this behaviour. Although on interfaces you'll have to set Export=false to avoid
compiler error - since interfaces cannot be exported in Prototype mode.
Original comment by DanelK...@gmail.com
on 19 Aug 2012 at 7:25
I think this is conceptual conflict. Perhaps when you implement "Support native
javascript get/set properties", this conflict and all other get_ set_ conflict
with native filed will be solved automatically.
by the way in current version the following code generate wrong code.
public static void foo2(Iface obj1, MyClass obj2)
{
var msg1 = obj1.message;
var msg2 = obj2.message;
}
}
[JsType(JsMode.Prototype, Export = false)]
public interface Iface
{
JsString message { get; set; }
}
[JsType(JsMode.Prototype)]
public class MyClass : Iface
{
private JsString _message;
public JsString message
{
get { return _message; }
set { _message = value; }
}
}
Generate:
shetab.common.Test.foo2 = function(obj1,obj2)
{
var msg1=obj1.message; /* RunTime ERROR */
var msg2=obj2.get_message();
};
Original comment by Madnik7@gmail.com
on 19 Aug 2012 at 8:34
AutomaticPropertiesAsFields is now being solved.
Original comment by DanelK...@gmail.com
on 19 Aug 2012 at 1:33
Original issue reported on code.google.com by
Madnik7@gmail.com
on 16 Aug 2012 at 1:51