XRC dialog not closing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XRC dialog not closing

Tim Burgess-5

Hi,

 

I have a  number of dialogs defined in XRC format, all pass jing with no errors and all have the same structure and are loaded by the same code apart from the name of the dialog being loaded. Some of my dialogs work absolutely fine, whilst others refuse to close when either the close cross is clicked or when Alt+F4 is pressed. In an effort to troubleshoot this, I’ve stripped one of the offenders back to the following bare minimum:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">

<object class="wxDialog" name="step_sequencer_dialog">

<pos>-1,-1</pos>

<size>1250,400</size>

<style>wxDEFAULT_DIALOG_STYLE</style>

<title>Step Sequencer Settings</title>

</object>

</resource>

 

It is loaded as follows:

 

if (wxXmlResource::Get()->LoadDialog(this, parent, wxT("step_sequencer_dialog")))

       {

// Commented out for testing:

              // InitTrack1();

              // InitTrack2();

       }

       else

       {

              wxMessageBox("Could not load Step Sequencer dialog from XRC", wstrErrorTitle, wxOK | wxICON_ERROR);

              EndModal(false);

       }

      

The load operation succeeds, which also gives me confidence in my XML, but the dialog will still not close.

 

Any ideas, please?

 

Best wishes.

 

Tim Burgess

Raised Bar Ltd.

E: [hidden email]

M: +44 (0)7989 486976

 

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: XRC dialog not closing

oneeyeman
Hi, Tim,

On Thu, Oct 4, 2018 at 9:18 AM <[hidden email]> wrote:
>
> Hi,
>
>
>
> I have a  number of dialogs defined in XRC format, all pass jing with no errors and all have the same structure and are loaded by the same code apart from the name of the dialog being loaded. Some of my dialogs work absolutely fine, whilst others refuse to close when either the close cross is clicked or when Alt+F4 is pressed. In an effort to troubleshoot this, I’ve stripped one of the offenders back to the following bare minimum:

I presume the validation of this dialog succeeded?
What happens if you try this code with the xrc sample (just the xrc)?

Thank you.

>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
>
> <object class="wxDialog" name="step_sequencer_dialog">
>
> <pos>-1,-1</pos>
>
> <size>1250,400</size>
>
> <style>wxDEFAULT_DIALOG_STYLE</style>
>
> <title>Step Sequencer Settings</title>
>
> </object>
>
> </resource>
>
>
>
> It is loaded as follows:
>
>
>
> if (wxXmlResource::Get()->LoadDialog(this, parent, wxT("step_sequencer_dialog")))
>
>        {
>
> // Commented out for testing:
>
>               // InitTrack1();
>
>               // InitTrack2();
>
>        }
>
>        else
>
>        {
>
>               wxMessageBox("Could not load Step Sequencer dialog from XRC", wstrErrorTitle, wxOK | wxICON_ERROR);
>
>               EndModal(false);
>
>        }
>
>
>
> The load operation succeeds, which also gives me confidence in my XML, but the dialog will still not close.
>
>
>
> Any ideas, please?
>
>
>
> Best wishes.
>
>
>
> Tim Burgess
>
> Raised Bar Ltd.
>
> E: [hidden email]
>
> M: +44 (0)7989 486976
>
>
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

RE: XRC dialog not closing

Tim Burgess-5
Hi,

My validation did succeed. I've built the sample - do I just need to copy my .xrc file into c:\wxwidgets-3.1.0\samples\xrc\rc

I note that the sample loads all files in the specified folder, so do I need to remove the files that already live there? I assume that a successful test will be the sample code making it to its UI without error?

Best wishes.

Tim Burgess

-----Original Message-----
From: [hidden email] <[hidden email]> On Behalf Of Igor Korot
Sent: 04 October 2018 16:06
To: [hidden email]
Subject: Re: XRC dialog not closing

Hi, Tim,

On Thu, Oct 4, 2018 at 9:18 AM <[hidden email]> wrote:
>
> Hi,
>
>
>
> I have a  number of dialogs defined in XRC format, all pass jing with no errors and all have the same structure and are loaded by the same code apart from the name of the dialog being loaded. Some of my dialogs work absolutely fine, whilst others refuse to close when either the close cross is clicked or when Alt+F4 is pressed. In an effort to troubleshoot this, I’ve stripped one of the offenders back to the following bare minimum:

I presume the validation of this dialog succeeded?
What happens if you try this code with the xrc sample (just the xrc)?

Thank you.

>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
>
> <object class="wxDialog" name="step_sequencer_dialog">
>
> <pos>-1,-1</pos>
>
> <size>1250,400</size>
>
> <style>wxDEFAULT_DIALOG_STYLE</style>
>
> <title>Step Sequencer Settings</title>
>
> </object>
>
> </resource>
>
>
>
> It is loaded as follows:
>
>
>
> if (wxXmlResource::Get()->LoadDialog(this, parent, wxT("step_sequencer_dialog")))
>
>        {
>
> // Commented out for testing:
>
>               // InitTrack1();
>
>               // InitTrack2();
>
>        }
>
>        else
>
>        {
>
>               wxMessageBox("Could not load Step Sequencer dialog from XRC", wstrErrorTitle, wxOK | wxICON_ERROR);
>
>               EndModal(false);
>
>        }
>
>
>
> The load operation succeeds, which also gives me confidence in my XML, but the dialog will still not close.
>
>
>
> Any ideas, please?
>
>
>
> Best wishes.
>
>
>
> Tim Burgess
>
> Raised Bar Ltd.
>
> E: [hidden email]
>
> M: +44 (0)7989 486976
>
>
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users