On 04/22/2014 11:46 AM, Steve Cookson - gmail wrote:
Hi Bruce,

On 18/04/14 19:17, Bruce Ravel wrote:

Any advice on how this can be made to work?

I tried your code and actually it crashed nicely for me (by nicely, I
mean with an error message).

Steve,

I'm sorry. My example runs without crashing for me on my linux computer. I made an effort (such as it was!) to provide a sensible example.

In any case, I suspect you are right that not everything is properly wrapped in wxperl. In the end, I did something with a normal Wx::Button, Wx::DirDialog, and a Wx::StaticText to display the currently selected directory. Works well enough.

Thanks for looking, though!
B


Firstly there are a few typos in your code, but this does not seem to be
why it crashed.

These two lines:

$hbox = Wx::BoxSizer->new(wxHORIZONTAL);
$box -> Add($hbox, 0, wxGROW); Appear at lines 13/14 and also at lines
21/22. This line (18):
$box -> Add($dpc, 0, wxALL|wxGROW, 5);

Probably should be

   $hbox       ->  Add($dpc,  0,  wxALL|wxGROW,  5);

But having fixed these, it still crashed.

But here are the error message(s) I got:

Gtk-CRITICAL **: gtk_tree_model_filter_get_value: assertion
'GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed
GLib-GObject-WARNING **:
/build/buildd/glib2.0-2.38.1/./gobject/gtype.c:4215: type id '0' is invalid
GLib-GObject-WARNING **: can't peek value table for type '<invalid>'
which is not currently referenced

But of course I may have missed the error.

I tried it without all the $style values and without cmd.

Wx::Demo is not installed on my machine, does it also crash in Wx::Demo?

I would guess either EVT_DIRPICKER_CHANGED is not wrapped for Wx::Perl,
or that it is a problem with wxWidgets.

Best of luck,

Regards

Steve.




--
 Bruce Ravel  ------------------------------------ bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 Homepage:    http://xafs.org/BruceRavel
 Software:    https://github.com/bruceravel

Reply via email to