Wed Oct 22 08:55:14 2014: Request 99607 was acted upon. Transaction: Correspondence added by pwnbusiness2...@centurylink.net Queue: Wx Subject: Re: [rt.cpan.org #99607] Issue using wxTextEntryBox Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: pwnbusiness2...@centurylink.net Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=99607 >
(repost) Just from a quick look over a few things, it looks like the only difference in them is that the wxSingleChoiceDialog XS(?) file handles client data or if client data is not present, an overloading situation exists. It may be a problem in wxWidgets itself and not in wxperl. ----- Original Message ----- From: "Patrick" <pwnbusiness2...@centurylink.net> To: bug...@rt.cpan.org Sent: Tuesday, October 21, 2014 4:15:57 PM Subject: Re: [rt.cpan.org #99607] Issue using wxTextEntryBox Thanks for the reply, Steve. I can see what you are saying. I have C and some slight C++ experience from years ago. It was just when OOP was starting to take off. I'd be glad to try to get oriented enough that I could make a little contribution, but right now I'm a little disoriented in the syntax and protocol of the open-source contribution system not to mention the wxperl contribution system. What file is the wxTextEntryDialog code in? I can see the wxSingleChoiceDialog that you are speaking of. ----- Original Message ----- From: "Steve Cookson via RT" <bug...@rt.cpan.org> To: pwnbusiness2...@centurylink.net Sent: Tuesday, October 21, 2014 3:43:42 PM Subject: Re: [rt.cpan.org #99607] Issue using wxTextEntryBox <URL: https://rt.cpan.org/Ticket/Display.html?id=99607 > Hi Patrick, On 21-10-2014 17:06, Patrick via RT wrote: > When I create a wxSingleChoiceDialog, that does show up as a child. Why is > the handling of these two different? Well, the implementation of the wxSingleChoiceDialog is much more complicated. You can look in wxPerl::XS. Here isTextEntryBox: wxTextEntryDialog::new( parent, message, caption = wxGetTextFromUserPromptStr, defaultValue = wxEmptyString, style = wxTextEntryDialogStyle, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString caption wxString defaultValue long style wxPoint pos and here is wxSingleChoiceDialog: wxSingleChoiceDialog::new( parent, message, caption, chs, dt = &PL_sv_undef, style = wxCHOICEDLG_STYLE, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString caption SV* chs SV* dt long style wxPoint pos PREINIT: wxString* choices; SV** data; int n, n2; CODE: n = wxPli_av_2_stringarray( aTHX_ chs, &choices ); if( !SvOK( dt ) ) { RETVAL = new wxPliSingleChoiceDialog( parent, message, caption, n, choices, 0, style, pos ); } else { n2 = wxPli_av_2_svarray( aTHX_ dt, &data ); if( n != n2 ) { delete[] choices; delete[] data; choices = 0; data = 0; n = 0; croak( "supplied arrays of different size" ); } RETVAL = new wxPliSingleChoiceDialog( parent, message, caption, n, choices, data, style, pos ); delete[] data; } delete[] choices; OUTPUT: RETVAL wxSingleChoiceDialog has a whole new .cpp function (wxPliSingleChoiceDialog) written within wxPerl. It also has a destructor there. It is one of only 7 .cpps. It's not clear to me how the destructor it is called, but the two functions are implemented very differently. It would be good to understand why they are different and bring them into line with each other. Regards, Steve.