Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a sample of how to use immarkdown #331

Open
ptxmac opened this issue Sep 24, 2024 · 3 comments
Open

Add a sample of how to use immarkdown #331

ptxmac opened this issue Sep 24, 2024 · 3 comments
Labels
enhancement New feature or request investigating Searching for origins of the issue.

Comments

@ptxmac
Copy link
Contributor

ptxmac commented Sep 24, 2024

I've been trying to use immarkdown, but something seems missing.
the Markdown method needs a MarkdownConfig object, but there's no way to create one correctly and the program just fails with a nil access

If it's supposed to work as is, please add a small sample demonstrating how

@gucio321
Copy link
Collaborator

Unfortunately as I said in release notes immarkdown is not fully functional as it misses callbacks impl for now.
Turns out that imgui_markdown doesn't provide NewMarkdownConfig function.
Maybe cmd/codegen/gengo_typedefs.go should also generate CreateEmptyXXX for all types?

func CreateEmptyXXX() XXX {
   return XXX{
      CData: new(C.XXX),
   }
}

@AllenDang what do you think about it?

Anyway, this will not work even if we add such a functions because then it'll panic for some reason. I suppose it needs to have FormatCallback set.

@AllenDang
Copy link
Owner

@gucio321 I don't have experience about immarkdown, so I cannot give an useful comment here...

@gucio321
Copy link
Collaborator

well, I think that overall, such a function would be useful.

@gucio321 gucio321 added enhancement New feature or request investigating Searching for origins of the issue. labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request investigating Searching for origins of the issue.
Projects
None yet
Development

No branches or pull requests

3 participants