OK, well Skip seems to work out of the top dialog, because
the top level button is defined as an OK button, but when 
I drop down a level the button is defined as wxID_ADD.

But here the "$event->Skip;" doesn't cause the event handler
to drop through. I can change wxID_ADD to be wx_ID_OK, but 
that sort of defeats the purpose and means I will have 
multiple OK buttons.  Maybe 5 OK buttons.

So what does wx_ID_OK do that deletes the dialog box and
exits in a controlled way?

Regards

Steve

-----Original Message-----
From: Steve Cookson [mailto:steve.cook...@sca-uk.com] 
Sent: 19 August 2009 08:04
To: wxperl-users@perl.org
Subject: RE: Getting back out of a dialog box.

Hi Johan,

OK, that worked, I guess it depended on what $self was defined as.

I had:

            my ($self, $event) = @_; # The first line of the event handler
 
If I put in:
            $self->Skip;
I got:

"Can't locate object method "Skip" via package .... (etc)."

So then I tried:

            $event->Skip;

Which worked perfectly, so thanks for that.  Events are still quite new
for me, so things that should be intuitive are not yet intuitive even
though I've read all the doc I can lay my hands on.

Have a good day.

Regards

Steve




-----Original Message-----
From: Johan Vromans [mailto:jvrom...@squirrel.nl] 
Sent: 19 August 2009 05:05
To: wxperl-users@perl.org
Subject: Re: Getting back out of a dialog box.

"Steve Cookson" <steve.cook...@sca-uk.com> writes:

> If I put in and event filter to update the database, then OK doesn't close
> the Dialog box. If I don't put in an event then I can't update the DB.

With 'event filter' you mean you attach a handler to the OK button
with EVT_BUTTON?
If so, in this handler, did you use $self->Skip to allow the dialog
handler to kick in as well?

If not, please show some code.

-- Johan

Reply via email to