imagepy icon indicating copy to clipboard operation
imagepy copied to clipboard

Markdown not shown on Linux

Open CsatiZoltan opened this issue 5 years ago • 6 comments

Markdown files are not rendered on Linux. The title of the wxwidgets window is shown but not the content. No exception is thrown. I observed that both the LoadURL method https://github.com/Image-Py/imagepy/blob/c0804fa690d7f0a52acc948b9f17067f7b2c0397/imagepy/ui/mkdownwindow.py#L54 and the SetPage method https://github.com/Image-Py/imagepy/blob/c0804fa690d7f0a52acc948b9f17067f7b2c0397/imagepy/ui/mkdownwindow.py#L55 have no effect.


I am not sure whether it's related but clicking on the icons (Snap, Load, >>, and the user-defined buttons) in a Workflow has no effect, as if the callback was not called. However, the mouse-over works: the documentation box is updated.

CsatiZoltan avatar Feb 17 '20 13:02 CsatiZoltan

I confirm that both of these issues persist on Linux but not on Windows. This must be an issue with wxpython.

CsatiZoltan avatar Feb 17 '20 13:02 CsatiZoltan

I did not bind any event on "Snap, Load, >>" yet, [snap] is designed to snap the current status, and [load] to reload the status snapped befor.

about the markdown not show on linux. may be because the 'math supportting' befor, I found the js did not run withing the SetPage, So I write the html to a file (in imagepy/data/index.html, and delete it when form loaded). so does your path need a sudo?

yxdragon avatar Feb 17 '20 15:02 yxdragon

It's OK that there is no action for Snap, Load and >>, but there is also no effect (on Linux) when clicking on the button created via the .wf file.

Yes, I observed that you write into imagepy/data/index.html, but the file is successfully created -- I cheked. Also, my path is in /home, where no sudo is needed.

CsatiZoltan avatar Feb 17 '20 15:02 CsatiZoltan

I would have a look when I use linux next time.

yxdragon avatar Feb 18 '20 14:02 yxdragon

I test markdown works on Mac. did you install python-markdown-math? try this wxpython's webview demo if it is OK, tell me. and If this does not work, give an issue to the wxphoenix.

yxdragon avatar Feb 21 '20 01:02 yxdragon

Unfortunately, I couldn't try it because the demo file throws an error:

'WebView' has no attribute 'MSWSetEmulationLevel'

This is because I have wxPython version 4.0.7.post2, and MSWSetEmulationLevel requires version 4.1. at least: https://github.com/wxWidgets/Phoenix/issues/1434#issuecomment-552141450 No conda repository contains 4.1. and the existing wheels are not compatible with my system. Installing wyPython from the sources seems to be painful. What do you recommend?

CsatiZoltan avatar Feb 21 '20 09:02 CsatiZoltan