Changeset 11944 for branches/ProgrammableProblem
- Timestamp:
- 02/06/15 14:09:26 (10 years ago)
- Location:
- branches/ProgrammableProblem
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/ProblemDefinitionScriptView.cs ¶
r11885 r11944 58 58 return true; 59 59 } 60 61 protected override void Content_CodeChanged(object sender, EventArgs e) { 62 base.Content_CodeChanged(sender, e); 63 UpdateInfoTextLabel("Code changed, compilation necessary!", Color.Red); 64 } 60 65 } 61 66 } -
TabularUnified branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs ¶
r11900 r11944 40 40 } 41 41 42 [Storable] 43 private bool codeChanged; 44 42 45 [StorableConstructor] 43 46 protected ProblemDefinitionScript(bool deserializing) : base(deserializing) { } … … 45 48 : base(original, cloner) { 46 49 variableStore = cloner.Clone(original.variableStore); 50 codeChanged = original.codeChanged; 47 51 } 48 52 protected ProblemDefinitionScript() … … 63 67 lock (compileLock) { 64 68 if (compiledProblemDefinition == null) { 69 if (codeChanged) throw new ProblemDefinitionScriptException("The code has been changed, but was not recompiled."); 65 70 Compile(false); 66 71 } … … 75 80 } 76 81 77 pr otected virtualAssembly Compile(bool fireChanged) {82 private Assembly Compile(bool fireChanged) { 78 83 var assembly = base.Compile(); 79 84 var types = assembly.GetTypes(); … … 107 112 } 108 113 114 codeChanged = false; 109 115 return assembly; 110 116 } … … 113 119 base.OnCodeChanged(); 114 120 compiledProblemDefinition = null; 121 codeChanged = true; 115 122 } 116 123
Note: See TracChangeset
for help on using the changeset viewer.