This project is read-only.

Accessing inherited methods

Sep 22, 2009 at 8:29 PM

Thank you for an excellent method to interface .NET with Scheme.

I have a class, PICkitSE, that extends an inherited class, PICkitS, and noticed that I am not able to access the methods inherited from the base class through the extended class.  I found that I am able to do this using these classes in Visual Basic.NET.  When I try to access inherited methods through the extended class I get the following error:

Unhandled exception during evaluation:
&who: "clr-call"
&message: "member could not be resolved on type: PICkitSE.USART"
  form: ('PICkitSE.USART 'Retrieve_Data_Byte_Count '())
  subform: "Retrieve_Data_Byte_Count"
  [1] "IronScheme.Runtime.Builtins.SyntaxError(who, message, form, subform)"
  [2] "IronScheme.Compiler.ClrCallInternalGenerator.Generate(args, CodeBlock cb)"
  [3] "IronScheme.Compiler.Generator.GetAst(args, CodeBlock cb, Boolean istailposition)"
  [4] "IronScheme.Compiler.Generator.GetAstList(Cons c, CodeBlock cb, Boolean castdown)"
  [5] "IronScheme.Compiler.Generator.GetAst(args, CodeBlock cb, Boolean istailposition)"
  [6] "IronScheme.Compiler.Generator.FillBody(CodeBlock cb, List`1 stmts, Cons body, Boolean allowtailcall)"
  [7] "IronScheme.Compiler.LibraryLetrecStarGenerator.Generate(args, CodeBlock c)"
  [8] "IronScheme.Compiler.Generator.GetAst(args, CodeBlock cb, Boolean istailposition)"
  [9] "IronScheme.Compiler.Generator.FillBody(CodeBlock cb, List`1 stmts, Cons body, Boolean allowtailcall)"
  [10] "IronScheme.IronSchemeLanguageContext.Compile(CodeBlock cb, Cons expr)"
  [11] "IronScheme.IronSchemeLanguageContext.CompileExpr(Cons expr)"
  [12] "IronScheme.Runtime.Builtins.CompileCore(CodeContext cc, expr)"
  [13] "IronScheme.Runtime.Builtins.EvalCore(CodeContext cc, expr)"
  [14] "psyntax.library-manager::invoke-library(lib)"
  [15] "ironscheme.lists::for-each(f, arg1)"
  [16] "psyntax.expander::compile-r6rs-top-level#anon#1#2$2539(CodeContext $context)"
  [17] "IronScheme.Runtime.Builtins.DynamicWind(infunc, bodyfunc, outfunc)"
  [18] "IronScheme.Runtime.Builtins.DynamicWind(infunc, bodyfunc, outfunc)"
  [19] "psyntax.main::load(filename)"
  [20] "Microsoft.Scripting.ScriptCode.Run(CodeContext codeContext, Boolean tryEvaluate)"
  [21] "Microsoft.Scripting.ScriptCode.Run(ScriptModule module)"
  [22] "IronScheme.Runtime.Builtins.<>c__DisplayClass7.b__5()"
  [23] "IronScheme.Runtime.Builtins.EvalCore(CodeContext cc, expr)"
  [24] "IronScheme.Runtime.R6RS.Exceptions.WithExceptionHandler(handler, thunk)"
  [25] "IronScheme.Runtime.Builtins.CallWithCurrentContinuation(fc1)"
  [26] "Microsoft.Scripting.ScriptCode.Run(CodeContext codeContext, Boolean tryEvaluate)"
  [27] "Microsoft.Scripting.ScriptCode.Run(ScriptModule module)"
  [28] "Microsoft.Scripting.Hosting.CompiledCode.Evaluate(IScriptModule module)"
  [29] "Microsoft.Scripting.Hosting.ScriptEngine.ExecuteInteractiveCode(String code, IScriptModule module)"

the method exists in



Sep 22, 2009 at 8:41 PM

Thanks again :o)

Is USART a nested class?

If so, try specifying it as: PICkitS+USART

I have not really needed to use this, so I can't say for sure that it will work. (let me know)



Sep 22, 2009 at 9:21 PM

Hi leppie,

Thank you for your fast response!

What I have is a base Assembly, PICkitS, which has a number of classes of which USART is one.  I built a .NET assembly, PICkitSE, to extend the functionality of PICkitS which has a class, USART.  What I was hoping to do was to access all the USART functions through the PICKkitSE.USART rather than some through PICkitSE.USART and some through PICkitS.USART which I am doing now.  I tried to access the method 


which is implemented in PICkitS using

(clr-static-call PICkitSE.USART Retrieve_Data_Byte_Count)

which generated the above error. When I access it using the base class

(clr-static-call PICkitS.USART Retrieve_Data_Byte_Count)

I have no problems. I get the same error when I try it as

(clr-static-call PICkitSE+USART Retrieve_Data_Byte_Count)

I get the same error.

Thanks for your help.

Sep 23, 2009 at 9:06 AM

Hi Al

I think I see where it happens, and will look to see if I can somehow make the handling better.



Sep 23, 2009 at 9:10 AM

Added as workitem:

Sep 25, 2009 at 2:09 PM

Thank you.  I have been out for a couple of days.  I am looking forward to what you can find and pushing on with my IronScheme application.


Best regards,


Sep 25, 2009 at 5:12 PM

I think I got it now!

I never noticed it was a static method ;o)

Should be easy to fix.

Sep 25, 2009 at 5:19 PM
Edited Sep 25, 2009 at 5:19 PM

Well that was not hard at all!

Just 3 additional flags :o)

The fix has been checked in.



Sep 25, 2009 at 9:21 PM

This is very good.  I'll look forward to the next release.  Do you have any idea when that might be?

thanks for your help and a very good product,


Sep 25, 2009 at 9:33 PM

It will be in a week or two.

Building from source is very easy though, and should not pose any problems  :)

Give it a try!