Skip Menu |

This queue is for tickets about the Wx CPAN distribution.

Report information
The Basics
Id: 79006
Status: open
Priority: 0/
Queue: Wx

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: RichTextBuffer new() no args
Date: Thu, 16 Aug 2012 11:46:34 +1000
To: bug-Wx [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
If I read the wx docs correctly there's a "default constructor" to create a new RichTextBuffer (as well as a copy constructor to duplicate). It could be good if the default one was wrapped to allow my $buf = Wx::RichTextBuffer->new; which otherwise gives for me Usage: Wx::RichTextBuffer::new(CLASS, obj) at foo.pl line 3. -- "Even the white bits were black"
Subject: Re: [rt.cpan.org #79006] RichTextBuffer new() no args
Date: Thu, 16 Aug 2012 03:46:20 +0100
To: bug-Wx [...] rt.cpan.org
From: Mark Dootson <mark.dootson [...] znix.com>
Hi, I could not find any practical usage for the default Wx::RichTextBuffer->new(); constructor which I am fairly sure is really only for use within wxRichTextCtrl. As far as I can see from all the wxWidgets RichText code and the wxWidgets docs, there isn't a practical 'user' use for Wx::RichTextBuffer->new(). Note: it isn't quite as simple as just wrapping the method as generally in the wxWidgets code other classes control wxRichTextBuffer destruction - so we would need to track within Perl whether any wxRichTextBuffer instances created using Wx::RichTextBuffer->new() need to be deleted by Perl code, or have been assigned to some other class. We do this with many other classes, but as it seems to me impractical to do anything useful with Wx::RichTextBuffer->new(), I have not bothered wrapping it. If you have a practical use that I've missed, I'll add it to the 'todo' list. Regards Mark On 16/08/2012 02:46, Kevin Ryde via RT wrote: Show quoted text
> Wed Aug 15 21:46:48 2012: Request 79006 was acted upon. > Transaction: Ticket created by user42@zip.com.au > Queue: Wx > Subject: RichTextBuffer new() no args > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42@zip.com.au > Status: new > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=79006> > > > If I read the wx docs correctly there's a "default constructor" to > create a new RichTextBuffer (as well as a copy constructor to > duplicate). It could be good if the default one was wrapped to allow > > my $buf = Wx::RichTextBuffer->new; > > which otherwise gives for me > > Usage: Wx::RichTextBuffer::new(CLASS, obj) at foo.pl line 3. > > >
Subject: Re: [rt.cpan.org #79006] RichTextBuffer new() no args
Date: Fri, 17 Aug 2012 09:29:26 +0100 (BST)
To: wxperl-users [...] perl.org, bug-Wx [...] rt.cpan.org
From: "stephen.cookson [...] sca-uk.com" <stephen.cookson [...] sca-uk.com>
Hi Guys, Well I`m pretty sure I use that construct (although I can`t find it now). I do, or at least I believe I do: my $buffer=Wx::RichTextBuffer new(); $buffer->LoadFile($filepath); So that I can store and retrieve RTC buffers in order to work with them. On 16 August 2012 at 03:46 Mark Dootson via RT <bug-Wx@rt.cpan.org> wrote:> Wed Aug 15 22:46:35 2012: Request 79006 was acted upon. Show quoted text
> Transaction: Correspondence added by mark.dootson@znix.com > Queue: Wx > Subject: Re: [rt.cpan.org #79006] RichTextBuffer new() no args > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42@zip.com.au > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=79006 > > > > Hi, > > I could not find any practical usage for the default > Wx::RichTextBuffer->new(); constructor which I am fairly sure is really > only for use within wxRichTextCtrl. > > As far as I can see from all the wxWidgets RichText code and the > wxWidgets docs, there isn't a practical 'user' use for > Wx::RichTextBuffer->new(). > > Note: it isn't quite as simple as just wrapping the method as generally > in the wxWidgets code other classes control wxRichTextBuffer destruction > - so we would need to track within Perl whether any wxRichTextBuffer > instances created using Wx::RichTextBuffer->new() need to be deleted by > Perl code, or have been assigned to some other class. We do this with > many other classes, but as it seems to me impractical to do anything > useful with Wx::RichTextBuffer->new(), I have not bothered wrapping it. > > If you have a practical use that I've missed, I'll add it to the 'todo' > list. > > Regards > > Mark > > > On 16/08/2012 02:46, Kevin Ryde via RT wrote:
> > Wed Aug 15 21:46:48 2012: Request 79006 was acted upon. > > Transaction: Ticket created by user42@zip.com.au > > Queue: Wx > > Subject: RichTextBuffer new() no args > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: user42@zip.com.au > > Status: new > > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=79006> > > > > > > If I read the wx docs correctly there's a "default constructor" to > > create a new RichTextBuffer (as well as a copy constructor to > > duplicate). It could be good if the default one was wrapped to allow > > > > my $buf = Wx::RichTextBuffer->new; > > > > which otherwise gives for me > > > > Usage: Wx::RichTextBuffer::new(CLASS, obj) at foo.pl line 3. > > > > > >
> >
Subject: Re: [rt.cpan.org #79006] RichTextBuffer new() no args
Date: Wed, 22 Aug 2012 11:08:35 +1000
To: bug-Wx [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Mark Dootson via RT" <bug-Wx@rt.cpan.org> writes: Show quoted text
> > I could not find any practical usage for the default > Wx::RichTextBuffer->new(); constructor which I am fairly sure is really > only for use within wxRichTextCtrl.
Yes, perhaps. I was experimenting with a Wx::RichTextPrinting which takes a buffer to print out. But my actual code prints the buffer from a RichTextCtrl. Show quoted text
> Note: it isn't quite as simple as just wrapping the method as generally > in the wxWidgets code other classes control wxRichTextBuffer destruction
Ah, ok. I wasn't sure if that sort of thing was supposed to "just work" or if you have to be careful about keeping alive things passed down into the library code etc.