VFP and .NET Interop
wwDotNetBridge/CommonMark
Gravatar is a globally recognized avatar based on your email address. wwDotNetBridge/CommonMark
  Todd Landrum
  All
  Mar 14, 2017 @ 02:56pm

I'm trying to recreate one of Rick's wwDotNetBridge demos from SWFox. Specifically, the call to CommonMark. When I run the code, I get an error message of "Method 'CommonMark.CommonMarkConverter.Convert' not found." as the loBridge.cErrorMsg.

I've got CommonMark.dll in my directory. The .LoadAssembly returns true. The code is straight from the demo. Any ideas?

LOCAL loBridge as wwDotNetBridge
loBridge = CreateObject("wwDotNetBridge","V4")

?loBridge.LoadAssembly("CommonMark.dll")
PRIVATE  lcMarkDown
TEXT TO lcMarkdown NOSHOW
This is some sample Markdown text. This text is **bold** and *italic*.
* List Item 1
* List Item 2
* List Item 3
Great it works!
> ### @icon-info-circle Examples are great
> This is a block quote with a header
ENDTEXT

lcHtml = loBridge.InvokeStaticMethod("CommonMark.CommonMarkConverter","Convert",lcMarkdown,null)
?loBridge.cErrORMSG
? lcHtml

Gravatar is a globally recognized avatar based on your email address. re: wwDotNetBridge/CommonMark
  Rick Strahl
  Todd Landrum
  Mar 14, 2017 @ 03:52pm

I suggest you run the sample from the demo folder to double check. I just checked this again and it works for me.

If it doesn't work make sure the Commonmark.dll is available in the current folder.

This code works for me:

do wwDotNetBridge
LOCAL loBridge as wwDotNetBridge
loBridge = CreateObject("wwDotNetBridge","V4")


loBridge.LoadAssembly("CommonMark.dll")

TEXT TO lcMarkdown NOSHOW
RAW MARKDOWN WITH COMMONMARK - 
This is some sample Markdown text. This text is **bold** and *italic*.

* List Item 1
* List Item 2
* List Item 3

Great it works!

> ### @icon-info-circle Examples are great
> This is a block quote with a header
ENDTEXT

*
lcHtml = loBridge.InvokeStaticMethod("CommonMark.CommonMarkConverter","Convert",lcMarkdown,null)

? lcHtml
_cliptext = lcHtml
RETURN

+++ Rick ---

© 1996-2017