Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/08 15:00:06 (17 years ago)
Author:
gkronber
Message:

fixing #98 by compiling the method in the programmable operator lazily in the apply() method. as suggested by pspitzli

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Programmable/ProgrammableOperator.cs

    r77 r116  
    5858
    5959      AddVariableInfo(new VariableInfo("Result", "A computed variable", typeof(BoolData), VariableKind.New | VariableKind.Out));
    60       Compile();
     60      executeMethod = null;
    6161    }
    6262
     
    147147
    148148    public override IOperation Apply(IScope scope) {
    149       if (executeMethod == null)
    150         throw new InvalidOperationException("No compiled code available.");
     149      if (executeMethod == null) {
     150        Compile();
     151      }
    151152
    152153      // collect parameters
Note: See TracChangeset for help on using the changeset viewer.