Home > Erlang > wxWidgets and Erlang

wxWidgets and Erlang

I’ve been playing around with the new wxWidgets bindings in Erlang. It’s cool stuff… but… there are problems. If I remember correctly the release notes for the wx application mention that is beta so I guess that is only to expect. Despite some of the problems I’ve had with it I think it is really cool to finally be able to do decent GUI’s in Erlang… it is long overdue but was worth the wait.

The biggest problem I have with it though is that I have to work in an OO:ed way in a functional environment. An example of this (which I don’t know if it is a bug or not) is that if I create a wxNotebook widget and a wxPanel widget and then assign the wxPanel as a page to the wxNotebook and then request to get it back I get a wxWindow object back. Well… instinctively I just thought that I will just type cast it back to wxPanel (wxPanel inherits from wxWindow, wxWindow is almost like Object in Java) but I realised 2ms after that that would obviously not work so I had to work around it instead and save the wxPanel in a state somewhere and the whole thing started getting messy.

Bah… I’m getting reminded of the horrors of desktop GUI programming when I was 18.

On a positive note though: It is extremely cool to have e.g. a wxNotebook with wxPanels that are their own processes because if one wxPanel crashes then guess what, just restart it. The rest of the stuff is untouched… this is just _screaming_ for efficient/reliable plug-in systems. I have already started working on a proof of concept… not to far into the future I hope to release it.

Categories: Erlang Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: