Questions tagged [script#]
Script# is a free tool that generates JavaScript by compiling C# source code.
192
questions
0
votes
0answers
15 views
Script# Performance Issues
I was wondering if there are any performance issues that are inherited to the way the compiler translates C# into Javascript.
I noticed that that way the compiler translates Object-Oriented Code (C#) ...
0
votes
1answer
32 views
How to make a drop down list populate options
I am setting up a Google Sheet that has a column for Make and a column for Model. I need to work so that when I choose a certain Make ONLY the particular Models will show up for that car.
function ...
0
votes
1answer
64 views
Script# - type or namespace name 'ScriptAssemblyAttribute' could not be found
I have a template project that uses Script# (downloaded from here: https://github.com/scottdurow/SparkleXrm). I've built and deployed this many times so not sure if this is an environmental issue or a ...
0
votes
1answer
47 views
ScriptSharp, Unable to Resolve Referenced Type
I am writing some custom objects for our business that requires I use script#. The documentation recommends these steps:
Create project of type C#>Script#>Class Library - Class Library is not listed ...
1
vote
1answer
41 views
Unable to install older version of scriptsharp
I am having the hardest time setting up script#. I am needing it for a platform at work that requires I specifically use version 0.7.2.
I was able to get the older version from GitHub and can build ...
0
votes
1answer
49 views
Script# Syntax for a Post Message Event Listener
Does anyone know how to write the following JavaScript in Script#? Without using the Script.Literal function.
window.addEventListener('message', function(e) { var message = e.data; alert(message); })
-1
votes
1answer
82 views
Script# create classes like class1.class2.class3
I have construction in JavaScript like
Class1 = {
Class2: {
Class3: {
someFunc: function(){
return 0;
}
}
}
}
How can I write this code similar on Script# ?
Because ...
0
votes
1answer
66 views
Unable to update Body of iFrame
I have the below issue:
EmailBodyIFrame = (IFrameElement)DomElement.GetElementById("descriptionEditIFrame", this.editContainer.Children[0]);
EmailBodyIFrame.SetAttribute("url", url.ToString()); //...
-2
votes
1answer
225 views
How to access html function from Script# code?
In Script# how do I access a function defined in the html on the page?
On the html page is this pre-existing function:
<script type='text/javascript'>
function makeStuffHappen(selector)
...
0
votes
2answers
477 views
Expect Script to Check and Change Firmware
Hello I am trying to create a expect script to check to see if a computer has a firmware password already in place, if it doesn't then allow for a password update. Any help would be much appreciated.
...
1
vote
1answer
108 views
scriptsharp pointer events/methods
I need to be able to call setPointerCapture(pointerId) and msPointerCapture(pointerId) in order to properly implement pinch zooming on the canvas for IE. ScriptSharp does not recognize these methods ...
-4
votes
1answer
70 views
In html , how to fix script code [closed]
I have a problem with the scripts I made an a program to make code in the internet but when i put the script command in the text box and submit it give an erros and I can submit any type of code but ...
0
votes
1answer
86 views
Use a Script# library (or module) in non Script# web applications
i'm a C# programmer.. more or less.. and would like to start a spare time project using Cordova for visual studio. Since this is a java-script/html/css framework i would like to code in C#, compile to ...
1
vote
3answers
652 views
How can I do console.log in scriptSharp?
I was trying to find how can I do a simple console.log() in script#. Strangely enough I was not able to find how to do this, so I was using alert() for this reason with Script.Alert().
Does anyone ...
0
votes
2answers
137 views
Script# Unit tests with DOM access
I am trying to write unit test which suppose to access DOM, something simple like check if element exists.
I have created separte Test project, added QUnit for ASP.net MVC from Nuget and Script# Unit ...
0
votes
1answer
170 views
Extending Element in ScriptSharp, unable to call Element's methods
I want to create custom control which will be able to reuse using Script#
public class HallView : Element
{
public int HallId;
public HallView(): base()
{
this.AddEventListener("...
1
vote
1answer
650 views
Adding a web service reference to a script# project
I'm trying to add a reference to a webservice that I have hosted in Microsoft Azure to a Script# project and I'm having a couple of issues with it.
At the moment I'm trying to do it as clean as ...
0
votes
1answer
127 views
How to unit test in ScriptSharp
We noticed that there was a unit testing project within the latest Script# 0.8 code on the Git repository, but there is no documentation as to how to actually use it, and the example files don't seem ...
0
votes
1answer
135 views
Script# and Google maps
Has anyone found how to integrate Google Maps and Script#?
I'm trying to tie the two together, most of the research ends in this GMapsSharp Project. However that project was compiled against an older ...
0
votes
1answer
299 views
Script# Call a Rest Service
I tried to use this code in SCript#
Uri uri = new Uri(string.Format(string.Concat("http://localhost:49175/GetProjects")));
WebRequest request = WebRequest.Create(uri);
request.Method = ...
4
votes
2answers
4k views
Disable autocorrect / autocompletion in content editable div
I m developing a cross-browser application in Script#.
I m using a contenteditable div, where user can add text. But i dont want the auto correct/ auto completion feature to change the user text.
...
0
votes
2answers
150 views
How to apply font size attribute to ul marker without afftecting list content's font size
I am using a contentEditable div to add my contents. i set the font size, color, face and bullets from my UI using javascript(script#).
I apply my own bullet style using css.
Here is one of my css
....
1
vote
1answer
716 views
Looking for tutorial Script# 0.8+ [closed]
Hi I have problem because i see a lot of out of date tutorials about Script#.
I am trying to learn this. But i cant make simple page. This is my script.
I dont knew how amd pattern. Works exactly but ...
3
votes
2answers
2k views
Is Script# working with Visual Studio 2013?
Hi I wanted to use script# with vs2013 but i cant install extension. Because my Vs is not supported.
0
votes
0answers
118 views
Using KineticJS with ScriptSharp
i am currently porting an Silverlight Project to HTML/Javascript.
After some research i decideed to use ScriptSharp instead of Javascript and using KineticJS as UI Layer.
But it seems ScriptSharp ...
0
votes
1answer
122 views
Dictionary as private field in Script# class
I have the following class in script# 0.7.5:
[ScriptNamespace("Scripts")]
public class MyClass
{
private Dictionary<string, string> stageMapping = new Dictionary<string, string>();
...
2
votes
1answer
148 views
Script# 0.8 not found via NuGet
This is an absolute beginner question. I cloned the Script# github repository (nikhilk/scriptsharp) and am attempting to build the sample KOWorld. When that project tries to restore NuGet packages, it ...
-1
votes
1answer
348 views
script# for beginners on vs2012
Any knockout.js example on vs2012? And how to setup the script# project to copy the script on asp.net mvc4 project.. adding as reference does not solve in my case and the sample on git does not ...
1
vote
1answer
54 views
Delete property from Object through Script#
Maybe a very simple question, but how can I call delete myObject[propName]; in Script#?
0
votes
1answer
253 views
Global methods in Script Sharp 0.8
I'm moving a solution from .Net 2 to 4.5 and upgrading to Script# 0.8.
The release notes for Script# 0.8 say:
GlobalMethodsAttribute is gone (no implicit generation of methods on to the global ...
0
votes
1answer
134 views
Business logic in script# which can be shared between JS and .NET, have MissingMethod exception issue
so I want really benefit from script# and get maximum from it. I understand that target of S# is JS but I definetely want to use it in .NET also, why? Check the scenario.
I have 3 projects - .NET dll,...
1
vote
1answer
322 views
Script# Wrap WebGL?
How would one go about wrapping WebGL in Script#.
I tried to add stuff to the source code but get compile errors I don't understand.
[ScriptIgnoreNamespace]
[ScriptImport]
[ScriptName("webGL"...
1
vote
1answer
368 views
Using jQuery.validation with Script#
I'm just trying to do something along those lines here with ScriptSharp:
$('#yourform').bind('change keyup', function() {
if($(this).validate().checkForm()) {
// do something
}
});
(...
1
vote
3answers
248 views
How to set BorderRadius property for div using Script#?
Something like this:
div.Style.BorderRadius = "50%";
There is no such property apparantly.
What is the alternative for this?
1
vote
1answer
565 views
ScriptSharp : Uncaught TypeError: Object #<HTMLInputElement> has no method 'apply'
I am new to Script#, and I wrote following sample code to learn event handling using Script#:
public class Class1
{
private bool ispressed;
private int startX;
private int startY;
...
1
vote
2answers
966 views
Using ScriptSharp with Knockout.Mapping through RequireJS
I'm struggling with all the Script# Dependency loading.
I have a Script# Project referencing the knockout library. Which I got to work after some time with RequireJS.
Now I'd like to use KnockoutJS ...
2
votes
2answers
534 views
Can ScriptSharp / TypeScript be used to write WinRT UI JavaScript
Can the frameworks like ScriptSharp / TypeScript be used to write WinRT UI JavaScript. If yes, How can this consume a WinRT C++/CX component (.winmd+dll)?
0
votes
1answer
151 views
Convert Script# Library to an Import reference assembly
Is there an easy way of converting a normal Script# library into an import library for use with other projects?
I currently have to keep my 2 projects in sync - and there must be an easier way!
So ...
0
votes
1answer
48 views
Script#: Support for custom exception classes
In Script#, is it possible to define your own exception classes? I cannot derive from Exception since it's sealed:
public class MyException : Exception {} // Cannot inherit from sealed class ...
2
votes
1answer
824 views
How to dynamically generate javascript using ScriptSharp?
I'm looking for a way to dynamically generate javascript. I didn't find any information on this by browsing through Script#'s documentation, so here are my questions:
1) Is it possible to generate ...
0
votes
1answer
228 views
Unable to find dllimport: The type could not found in Script#
Compile returned error CS0246: The type or namespace name 'DLLImport' could not be found...I have aacorlib in my reference. When I look at System.Runtime.InteropServices, I could not found ...
1
vote
1answer
841 views
TypeScript vs Script# - Serverside access?
Trying to decide between the two for an asp.net mvc single-page application. One thing I can't seem to find out about TypeScript is if can I reference a TypeScript class server side, for example in a ...
1
vote
1answer
145 views
ScriptSharp compilation with NAnt script
We've recently added the excellent script# to our project. Currently we have it so that our VS build simply copies the compiled .js file from the output directory to the scripts directory of our web ...
0
votes
1answer
335 views
Asm.js support in Script# [closed]
Would it be practical to add asm.js support to Script#?
Where would effort be required?
1
vote
1answer
900 views
ScriptSharp Class Methods not found
ScriptSharp's produced Javascript can't find my class method "LoadContent()". Where am I going wrong with this?
It seems to be putting the method into a prototype, but I'm not sure this is what I ...
1
vote
1answer
202 views
What is the recommended strategy for page specific scripts?
We are in the early stages of introducing Script# to our project and so far we like what we see. However, I am a little confused as to the best strategy for adding scripts to individual pages/views.
...
0
votes
1answer
329 views
Script# Wrapper for Prototypal Inheritance jQuery Plugin
I would like to create a Script# wrapper for existing jQuery plugin. The jQuery plugin implements the "Prototypal Inheritance With The DOM-To-Object Bridge Pattern" that can be found on this link
// ...
2
votes
1answer
480 views
When will ScriptSharp 0.8 be the official build?
We are looking at adopting ScriptSharp into our project. We don't want to take on 0.7.5 though if 0.8 is about to become the official version.
Can you give some indication on the likely timeline, i....
2
votes
1answer
4k views
ScriptSharp beginner set up
I've been reading for hours about Script#, and after watching the author's speech at MIX11 decided to give it a try. To be honest, I can't say it's a been pleasure.
1) First of all, when I create a ...
1
vote
1answer
253 views
Using Script# in an old project
I have an old project (written by someone else) that makes use of Script#. I've never used this tool before, so this question might seem rudimentary to some. Anyway, I tried to open the solution, ...