[erlang-questions] wxsplashscreen

18 views
Skip to first unread message

eigenfunction

unread,
Feb 25, 2012, 8:12:57 AM2/25/12
to erlang-q...@erlang.org
Been trying to set up a simple splashscreen with wxerlang. Here is a
code snippet:

Server = wx:new(),
%% Parent = wxWindow:new(),
BM = wxBitmap:new("Penguins.jpg",[{type,?wxBITMAP_TYPE_JPEG}]),
SC = wxSplashScreen:new(bitmap,
?wxSPLASH_CENTRE_ON_SCREEN,
2000,
Server,
100,
[
{pos,?wxDefaultPosition},
{size,?wxDefaultSize},
{style,?wxSTAY_ON_TOP}
]),


It fails with the following error:
exception error: no function clause matching
wxSplashScreen:new(bitmap,2,2000,
{wx_ref,0,wx,[]},
100,
[{pos,{-1,-1}},
{size,{-1,-1}},
{style,32768}]) (gen/
wxSplashScreen.erl, line 105)

Any Idea?
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Steve Davis

unread,
Feb 25, 2012, 9:31:39 AM2/25/12
to erlang-q...@erlang.org
Your first argument appears to be the atom 'bitmap'...

regs,
/s

> erlang-questi...@erlang.orghttp://erlang.org/mailman/listinfo/erlang-questions

eigenfunction

unread,
Feb 25, 2012, 10:02:29 AM2/25/12
to erlang-q...@erlang.org
I spent two hours on this thing and i could not figure out what was
wrong.

Thank you very much indeed.

Gianfranco Alongi

unread,
Feb 25, 2012, 10:57:52 AM2/25/12
to eigenfunction, erlang-q...@erlang.org
Just out of curiosity, did you not get a variable unused warning for BM?

eigenfunction

unread,
Feb 25, 2012, 11:43:14 AM2/25/12
to erlang-q...@erlang.org
Of course, i did. But this is just a snippet of a much bigger program
with many other unused variables, most of them
are functions arguments.
Anyway, lesson learned ;-)

On 25 Feb., 16:57, Gianfranco Alongi <gianfranco.alo...@gmail.com>
wrote:

> > erlang-questi...@erlang.org

Reply all
Reply to author
Forward
0 new messages