F# and GIMP#December 2, 2007 at 10:04 pm | Posted in GIMP, Programming | 4 Comments
I almost got my first F# plug-in running on GIMP#. It took me some time to get used to the syntax even with a background in functional languages like Lisp and Scheme. Only thing left to figure out is how I can override a C# function that returns an IEnumerable. What I’ve got sofar is:
override x.ListProcedures() : seq<Procedure> =
let procedure = new Procedure()
procedure.MenuPath <- “<Image>/Filters/Generic”
// And now what?
The C# signature of this routine is
protected abstract IEnumerable<Procedure> ListProcedures() ;
Hope to find an answer pretty soon.
Update 3 December 2007: seems that returning an IEnumerable is quite easy (many thanks to Robert Pickering):
[procedure] :> seq<Procedure>