FasctScript functions in FastCube

edited May 2011 in FastCube
Hello,
I'd like to add some utility functions in fastscript, which i'm using in fastcube.
I know how to add function and procedure calls stubs and bind them to the method dispatcher.
What i'm missing is how to create functions inside fastscript and make them available to fastcube formulas.

Any hint?
Thanks

Comments

  • edited 11:45AM
    Hi.

    You can add new functions in event TfcSlice.OnInterpreterCreated: TfcSliceInterpreterCreated

    TfcSliceInterpreterCreated = procedure(ASlice: TfcSlice; AInterpreter: TObject; ATypeInterpreter: TfcTypeInterpreter) of Object;
    TfcTypeInterpreter =
    (
    fcti_MeasureCalculation,
    fcti_MeasureFilter
    );

    Oleg Pryalkov
  • edited 11:45AM
    wrote: »
    Hi.

    You can add new functions in event TfcSlice.OnInterpreterCreated: TfcSliceInterpreterCreated

    TfcSliceInterpreterCreated = procedure(ASlice: TfcSlice; AInterpreter: TObject; ATypeInterpreter: TfcTypeInterpreter) of Object;
    TfcTypeInterpreter =
    (
    fcti_MeasureCalculation,
    fcti_MeasureFilter
    );

    Oleg Pryalkov


    What I meant is how do I define a function inside fastscript, and make it available to the formulas I add to the slice?
    Let's say I have a function I need to call often, and it's written in fastscript language. Where and how do I add it to the interpreter assigned to the slice to make it available to formulas i might add?

    Thanks
  • edited 11:45AM
    Hi.

    In event:
    TfcSlice.OnInterpreterCreated: TfcSliceInterpreterCreated

    Oleg Pryalkov

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.