Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/14 14:40:08 (10 years ago)
Author:
abeham
Message:

#2136:

  • Fixed drag-drop behavior in VariableStoreView
  • Added additional information to Script and changed setting name and description
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Scripting/3.3/Script.cs

    r10566 r10577  
    4545    private const string ExecuteMethodName = "Execute";
    4646    private const string CodeTemplate =
    47 @"// use 'vars' to access global variables in the variable store
     47@"// use 'vars' to access variables in the script's variable store
     48// vars has a Contains(string) method to check if a variable exists and implements IEnumerable
    4849
    4950using System;
     
    5960  }
    6061
    61   // further classes and methods
     62  // implement further classes and methods
    6263
    6364}";
     
    117118        compileErrors = new CompilerErrorCollection(original.compileErrors);
    118119    }
    119 
    120     public Script()
    121       : base("Script", "A HeuristicLab script.") {
     120    public Script() {
     121      name = ItemName;
     122      description = ItemDescription;
    122123      code = CodeTemplate;
    123124      variableStore = new VariableStore();
     125    }
     126    public Script(string code)
     127      : this() {
     128      this.code = code;
    124129    }
    125130
Note: See TracChangeset for help on using the changeset viewer.