229 points · by yread · 7y ago · 80 comments
Common controls, especially shell controls, come in different versions of comctl32 etc. and have been versioned and dynamically selected in the basis of things like application manifests for backward compatibility reasons for a long time.
https://docs.microsoft.com/en-us/windows/desktop/controls/co...
API structures have different sizes so code usually needs to change to support later versions.
Seriously though, why were the fonts hard-coded to use ms sans serif instead of the OS default font (eg Segoe UI last time I checked?)
I may hate their practices but their dev tools have always been absolutely top-notch within their (locked down) garden. No company has ever come anywhere close to emulating that, closed garden or not.
Seriously I have tremendous respect for anybody who works on a project that massive, I just meant it in the sense of "there are two kinds of languages, the kind people complain about and the kind nobody uses".
Of course there were a lot of jagged edges in winforms (like the font thing) - I never used a GUI framework that didn't have any of those.
WinForms is the original and best... and I think the only widget kit from it's generation still around and maintained
Uncaught abort(20) at Error
at jsStackTrace (https://webassembly.z19.web.core.windows.net/Calculator/mono.js:1063:12)
at stackTrace (https://webassembly.z19.web.core.windows.net/Calculator/mono.js:1077:11)
at abort (https://webassembly.z19.web.core.windows.net/Calculator/mono.js:18097:43)
at nullFunc_ii (https://webassembly.z19.web.core.windows.net/Calculator/mono.js:14694:2)
at b20 (wasm-function[10723]:31)
at emterpret (wasm-function[922]:12351)
at _do_icall (wasm-function[8343]:63)
at emterpret (wasm-function[922]:7917)
at _interp_exec_method_full (wasm-function[7977]:65)
at emterpret (wasm-function[922]:7129)
Which is weird, because in the actual code[1], there's a division by zero check which should pop up a message box: case '/':
if (opr2 != 0)
{
result = (opr1 / opr2).ToString();
}
else
{
MessageBox.Show("Can't divide by zero");
}
break;
Given a closer look, I doubt this is a WasmWinforms bug, but rather mono-wasm (or somewhere else along the compilation pipeline).Edit: I'm wrong, it's a WasmWinforms bug.
[1] https://code.msdn.microsoft.com/windowsdesktop/Simple-Calcul...
dl_mapping_symbol MessageBox - proc name MessageBox not matched
So yep, MessageBox has no matched symbols so it crashes and burns.[1] https://github.com/roozbehid/WasmWinforms/blob/master/winfor...
var TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 1258291200;
That is, if the module doesn’t specify how much memory it wants (and it doesn’t), then it asks for around 1.25 GB.More seriously, looking forward to when CLR can compile down to web assembly directly rather than requiring a large runtime. Baby steps.
http://example.qt.io/qt-webassembly/widgets/richtext/textedi...
Yes I know it isn't the same XAML.
On a positive note, as I watch the assemblies load, Angular sites with 50k or so npm packages doesn't seem so heavy :-)
Solutions like this have already existed and still exist today. ASP.NET Webforms was basically the same attempt as this but with HTML5 base controls.
Running .NET on the browser was a great idea on paper for cross-platform application , but seing how much time it takes to load the entire .NET framework it’s just isn’t a suitable solutions for production.
Blazor is the official Microsoft project that uses a small .NET runtime with Razor components and is already smaller and faster than many JS bundles without any optimizations.
I don’t think this will ever replace javascript for common websites. But think intranet applications, online trading platforms or webmails, or mobile web apps.
Am I misunderstanding how web assembly works?
It doesn't show the source file because the browser is not actually aware of where the js on the page got the wasm its running from. From the browser's perspective it just fetched an opaque file and then separately got told to run some wasm.
You can see the actual source file for the wasm for one of the demos here, it still shows up in the network tab (but for example if the js on the page generated the wasm then it wouldn't). https://webassembly.z19.web.core.windows.net/mono.wasm
In any case, it's pretty insane what they do now but I sort of fail to see how W(eb) assembly is different from let's say a Java applet?
It is not native code is it?
It’s starting to feel quite left behind at this point.
Sooo, unity webgl may not work on iOS but that doesn’t mean wasm itself doesn’t work.
Edit: Trying it in Firefox desktop it fails too[1], so obviously this is not really fully cross-browser compatible yet.
[1] RangeError: bad Memory initial size mono.js:1181:26
<anonymous> https://webassembly.z19.web.core.windows.net/Calculator/mono...