Loading ...
Sorry, an error occurred while loading the content.

Re: self-modifying clip

Expand Messages
  • ebbtidalflats
    Sheri, Using variable containing function names does NOT work - directly. A workaround exists, undocumented, where you assign the function name to a variable,
    Message 1 of 10 , Apr 27, 2010
    • 0 Attachment
      Sheri,

      Using variable containing function names does NOT work - directly.
      A workaround exists, undocumented, where you assign the function name to a variable, and pass it to a translator function.
      I would not rely on the workaround too much, as future versions of NoteTab may break it.

      Here is a SIMPLE example (2 clips):

      H="_UDF_Translator"
      ;UDF = User-defined function
      ^!Result ^$^&$

      H="DynamicFunctionNameCall"
      ;assign an (unknown-at-design-time function) to a variable
      ^!Set %var%=GetRow
      ;evaluate the unknown function (GetRow in this example)
      ^!Set %out%=^$UDF_Translator(GetRow)$
      ^!Info ^%out%


      This technique can of course be combined with the commandline variable technique. Now if NoteTab would only support _recursive_ clip calls <g>! Oh, and a Get and Set function for each and every configuration option NoteTab offers. Hey Eric ...


      Cheers,


      Eb


      --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
      >
      > --- In ntb-clips@yahoogroups.com, "ebbtidalflats" <ebbtidalflats@> wrote:
      > > ...
      >
      > I had problems doing that with an older versions, where there were functions in use as command parameters for the variable command. Even reported it at the time. But it does seem to be working now in a few simple tests. Maybe something has changed :D
      >
      > Regards,
      > Sheri
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.