Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

wxDP_DROPDOWN constant autoload issue

by schnell18 (Novice)
on Sep 22, 2012 at 14:39 UTC ( [id://995103]=perlquestion: print w/replies, xml ) Need Help??

schnell18 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I have problem to get the Wx::DatePickerCtrl work properly. When I don't use "use Wx qw/:allclasses/;", then I will get error like "Error while autoloading 'Wx::wxDP_DROPDOWN'" for the following code:
#!/usr/bin/perl -w use strict; package MyApp; #use Wx qw[:allclasses]; use Wx qw[:misc :frame :datepicker]; use Wx::DateTime; use base qw(Wx::App); sub OnInit { my $self = @_; my $frame = Wx::Frame->new( undef, -1, 'A wxPerl App', wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE | wxMAXIMIZE_BOX | wxCLOSE_BOX ); Wx::DatePickerCtrl->new($frame, -1, new Wx::DateTime(), wxDefaultP +osition, wxDefaultSize, wxDP_DROPDOWN); $frame->Center(); $frame->Show(); } MyApp->new()->MainLoop();
However, I don't want "use Wx qw/:allclasses/" as it will load too many controls than necessary. Please help figure out how to fix this problem. Thank you very much!

Replies are listed 'Best First'.
Re: wxDP_DROPDOWN constant autoload issue
by Anonymous Monk on Sep 22, 2012 at 21:22 UTC
Re: wxDP_DROPDOWN constant autoload issue
by stefbv (Curate) on Sep 22, 2012 at 19:07 UTC

    Use Wx::Calendar instead of Wx::DateTime and will work.

    Regards Ştefan.

      Thank you very much! It works as you said.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://995103]
Approved by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-18 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found