Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Max on August 16, 2006, 09:38:29 pm

Title: Bug in the new "Virtual Target"
Post by: Max on August 16, 2006, 09:38:29 pm
Dear all,

I have downloaded the latest nightly build 2863 (Windows XP SP2). After the installation
I loadaded an old project. I saved the project to get the new file format and tested the
new virtual target window. I get a bad behaviour (bug). Do this

1) Open Project->Properties
2) Select Targets
3) click on Virtual Targets
4) I found my old "All" target. It is highlighted. Click on edit, then click on cancel (do not type
anything) The "All" disappers
5) click on close
6) re-open the virtual targets window. Now you can create a new targets called "All". The old virtual target
is simply disappered.

Hope this helps

Massimo

Title: Re: Bug in the new "Virtual Target"
Post by: mandrav on August 17, 2006, 09:21:39 am
Fixed, thanks.
Title: Re: Bug in the new "Virtual Target"
Post by: Indrekis on August 21, 2006, 12:57:48 am
I've encountered another bug of this type in build 2878 (Aug 19 2006) under Windows XP SP2.

When I press Edit on virtual target, do nothing (not change anything) and then press OK strange error message appears:

"A virtual build target with this name already exists in project"

P.S.
I've planned to post bugrepot, but for now have some troubles with Berlios SSL connection...
Title: Re: Bug in the new "Virtual Target"
Post by: Indrekis on August 26, 2006, 03:52:47 am
The bug with useless "A virtual build target with this name already exists in project" when one do not changed anything can be easily fixed by adding corresponding check.
I've posted the patch:
[url]https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1405&group_id=5358[\url]

In short:

src/sdk/virtualbuildtargetsdlg.cpp:

void VirtualBuildTargetsDlg::OnEditClick(wxCommandEvent& event)
   <skipped>
     if (targetName.IsEmpty())
         return;
 
+    if (lstAliases->GetStringSelection() == targetName)
+        return;
+
     if (lstAliases->FindString(targetName) != wxNOT_FOUND)
   <skipped>
Title: Re: Bug in the new "Virtual Target"
Post by: mandrav on August 26, 2006, 08:56:16 am
Ah, forgot about this. Fixed.