From: Matthew W. <Mat...@bb...> - 2007-04-19 09:33:16
|
Scrap all that - I tested the same code with wxPerl 0.67 and wxWidgets 2.= 8.0 and have the same issue, so I guess it's a wxWidgets thing! /me files a bug report Cheers, Matt -- Matt Wilson Software Engineer Multiplatform, Innovation and Development Studio BBC Vision Room 2507 White City, London W12 7TS +44 (0) 20 8752 4561 =20 > -----Original Message----- > From: wxp...@li...=20 > [mailto:wxp...@li...] On Behalf=20 > Of Matthew Wilson > Sent: 18 April 2007 17:09 > To: wxp...@li... > Subject: [wxperl-users] Tree EditLabel weirdness >=20 > Hi again all, we're experiencing a strange issue with wxPerl=20 > 0.72 (w/wxWidgets 2.8.3) which we didn't have in v0.67=20 > (w/wxWidets 2.6.3). We have a Wx::TreeCtrl with a context=20 > menu, and some buttons in an adjacent panel. There's a=20 > context menu entry "Create folder" which calls=20 > onCreateFolder. The button also calls onCreateFolder.=20 > onCreateFolder adds a new item to the tree and then calls=20 > ->EditLabel which works fine when you click the button.=20 > However, when using the context menu the item is added but=20 > EditLabel acts as if it never happened, or happened but=20 > immediately ended. The code for adding is (basically -=20 > modified for brevity): >=20 > my $new_folder; > if ($tree->IsExpanded($item)) { > my $icon =3D $self->_iconlookup->{':folder:'}; > $new_folder =3D $tree->AppendItem($item, $name,=20 > $icon, $icon); > $tree->SetPlData($new_folder, $node); > $tree->SetItemHasChildren($new_folder, 1); > } else { > $tree->Expand($item); > ($new_folder) =3D=20 > $self->_get_child_by_name($item,$name) or die; > } >=20 > $tree->EnsureVisible($new_folder); > $tree->SetFocus; > $tree->SelectItem($new_folder); > $tree->EditLabel($new_folder); >=20 > I realise this may not be a bug in wxPerl but in wxWidgets -=20 > is there any way this /could/ be a wxPerl bug, seeing as=20 > wxPerl is just a set of bindings? If it's likely a wxWidgets=20 > bug then I'll see what I can do re: filing a bug with them instead. >=20 > Cheers, >=20 > Matt >=20 > -- > Matt Wilson > Software Engineer > Multiplatform, Innovation and Development Studio > BBC Vision > Room 2507 White City, London W12 7TS > +44 (0) 20 8752 4561 >=20 > http://www.bbc.co.uk/ > This e-mail (and any attachments) is confidential and may=20 > contain personal views which are not the views of the BBC=20 > unless specifically stated. > If you have received it in error, please delete it from your system. > Do not use, copy or disclose the information in any way nor=20 > act in reliance on it and notify the sender immediately. > Please note that the BBC monitors e-mails sent or received. > Further communication will signify your consent to this. > =09 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users >=20 http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain persona= l views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in relian= ce on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. =09 |