overriding a function
David Bovill
david at viral.academy
Wed Jun 24 05:04:59 EDT 2015
Nice
On Wed, 24 Jun 2015 at 09:51, Dick Kriesel <dick.kriesel at mail.com> wrote:
>
> > On Jun 23, 2015, at 10:39 PM, Monte Goulding <
> monte at sweattechnologies.com> wrote:
> >
> > Howdy folks
> >
> > I’m doing a bit of IDE hacking for a new plugin and I want to override a
> function in one of the libraries or rather add some lines to it’s results.
> The only way I can override is via a front script but ideally I would be
> able to get the result of the function being overridden, amend it and then
> return my amended result.
> ...
> > However I know I can’t do the above because I’d just end up with
> recursion in my front script… any ideas?
>
> Hi, Monte. Here’s a way to write the handler for your front script:
>
> function getLines
> if item 2 of line -2 of the executionContexts is "getLines" then
> pass getLines
> else
> return "Hello" & cr & getLines()
> end if
> end getLines
>
> It works for me. Does it work for you?
>
> — Dick
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list