The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Wx::Data::Control - Retrieving data asynchrounously for Wx control

DESCRIPTION

In your controls classes you can simply add Wx::Data::Control to the base classes, this will give your the opportunity, provided that you have already spawned the Wx::Data::Manager, to refresh_data from a data source.

The response will be sent to the Populate method of the control that you'll have to implement according to the response sent, which essentially depends on the engine that you selected (so no surprise, using the HTTP engine will provide you a Wx::Data::Engine::HTTP::Response object).

See the Wx::Data::Manager for detailled explanation on how to connect to a data source and what engines are supported yet.

SYNOPSYS

So in your controls you can do like this

   package Control;
   
   use base qw/Wx::Frame Wx::Data::Control/;
   
   sub Populate {
      my $self = shift;
      my ($response) = @_;
      
      # hmm .. now would be the good time
      # to implement this since data should
      # be there anytime soon
   }

And later in your code

   # that's very wxPerl'ish
   my $control = Control->new(undef, -1, 'test', [0,0], [10,10]);

   # will request the data source and send the result back to
   # our control instance by calling the Populate method.
   
   $control->refresh_data({
      my  => 'parameters'
   });

AUTHORS

Ed Heil <ed@donorware.com>, Mike Schroeder <mike@donorware.com>, Eriam Schaffter <eriam@cpan.org>

SEE ALSO

Wx::Data::Manager, Wx::Data::Engine::*