How can I register a flux view for just, lets say, a .html file?
I know the /etc/sys/ext2mime.prop file specifies a MIME type and that I can add an index prop for flux.view.mime.text but how about the text/html MIME type?
I see in the flux build.fan you've tried:
"flux.view.mime.text/html": "flux::HtmlView"
but that (the /) doesn't seem to work, neither for flux nor my add on.
brianWed 8 Aug 2012
The problem is that the mime type string is actually "text/html; charset=utf-8". So I fixed the Flux code to not use params for that check.
However, now it looks like SWT IE component crashes the VM (on Windows that is). So I disabled the HtmlView for now
SlimerDudeThu 9 Aug 2012
Hiya,
Yeah, I looked into the Flux code yesterday and saw it used MimeType.toStr as oppose to MimeType.subType (or $mainType/$subType) - I tried the full Str but it didn't seem to get picked up. I'll try again.
SWT IE component crashes the VM
I noticed that also when I configured The HtmlView to use MimeType text. It works if you switch to the HtmlView. It only crashes when the HtmlView is used as the default. Dunno why.
SlimerDude Wed 8 Aug 2012
How can I register a flux view for just, lets say, a
.htmlfile?I know the
/etc/sys/ext2mime.propfile specifies a MIME type and that I can add anindexprop forflux.view.mime.textbut how about thetext/htmlMIME type?I see in the flux build.fan you've tried:
but that (the
/) doesn't seem to work, neither for flux nor my add on.brian Wed 8 Aug 2012
The problem is that the mime type string is actually "text/html; charset=utf-8". So I fixed the Flux code to not use params for that check.
However, now it looks like SWT IE component crashes the VM (on Windows that is). So I disabled the HtmlView for now
SlimerDude Thu 9 Aug 2012
Hiya,
Yeah, I looked into the Flux code yesterday and saw it used
MimeType.toStras oppose toMimeType.subType(or$mainType/$subType) - I tried the full Str but it didn't seem to get picked up. I'll try again.I noticed that also when I configured The HtmlView to use MimeType
text. It works if you switch to the HtmlView. It only crashes when the HtmlView is used as the default. Dunno why.