News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Added some of the missing controls to wxSmith

Started by Cryogen, July 19, 2010, 10:54:01 PM

Previous topic - Next topic

seb_seb0

#15
Hello,

I have a crash occuring with wxBitmapComboBox (on Windows Vista).
Insert a new wxBitmapComboBox in a wxPanel.
Modify the field "number of images" to a positive value in the property grid.

I have tried to debug, but the bug did not appear during debugging.
The bug *seems* to happen in the following lines (in function wxsBitmapComboBox::OnExtraPropertyChanged, in file wxsbitmapcombobox.cpp, start at line 228)

for(int i = m_iNumImages; i < iNewFields; i++) {
               m_arrBitmapIds[i] = Grid->GetGrid()->AppendIn(m_idImages, NEW_IN_WXPG14X wxImageFileProperty(wxString::Format(wxT("%s %d"), sImage.c_str(), i + 1), wxPG_LABEL));
           }

but I have no guarantees for that. Does anybody have an idea ?
If I find a solution, I will post it of course.

Sebastien

Cryogen


Hi Guys,

I'm way behind the discussion due to computer death. It's killing me. :-(

Quote from: seb_seb0 on July 20, 2010, 09:59:23 PM
Mea culpa.
I have double-checked, and I have noticed that I have copied the file to another directory.
It is corrected, and now it works (of course).

Sorry for the disturbance - mistake was on my side.

I know. ;-)

Quote from: seb_seb0 on July 20, 2010, 09:59:23 PM
Other topic:
 I am approaching the end of the XPMEditor plugin (hopefully). Once I have fixed the remaining bugs, I will gladly give a hand on wxSmith.
 The first thing I would like to see done is a better handling of images in wxSmith : typically your Patch 1 is a very good start.
 You might be aware that rcoll has done another plugin which can be interesting to merge with wxSmith: it is called wxSmithImage. See here: http://forums.next.codeblocks.org/index.php/topic,12362.0.html (reply #5)
 It already has code to handle:
   - images lists
   - embedded images in the main wxFrame / wxDialog / wxPanel code.

Let me know what you think.

Yes, I'm already well on the way to integrating parts of that into the mainline code as it adds things we need such as image list management. It's a nice piece of work. I was working on that when the machine died. After being messed about by a local hardware shop I'm now awaiting parts and a warranty repair. Until it's fixed I'm trying to set up CB portable but the box I'm using right now won't even let me run the installer without admin privileges, which of course I don't have. This is where Windows absolutely sucks. So, I'm trying other avenues.


Ciao.
DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]

Cryogen


Hi,

Quote from: western1 on July 20, 2010, 11:31:52 PM
I also noticed libwxsmith.so was built on May 27, which seems old enough to include cryo's patches up to #12 (thanks Cryo).
...
Thanks to all of you for your excellent contributions!!!


Any time. ;-)

Quote from: western1 on July 20, 2010, 11:31:52 PM
Do I need to build from source and apply the diff file myself?

Yes, sir.

Quote from: western1 on July 20, 2010, 11:31:52 PM
(If I need to apply the patch, does 12 include all of the previous ones?)

No. That will be stated if it happens.

Cheers.

DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]

Cryogen


Quote from: MortenMacFly on July 23, 2010, 07:09:30 AM
BTW: I assume it_s tested under Linux? Because that'd be a problem for to do me ATM.

You betcha. Always. :-)

DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]

Cryogen

Quote from: MortenMacFly on July 23, 2010, 09:09:24 PM
Quote from: MortenMacFly on July 23, 2010, 07:09:30 AM
Just for the record: I am currently testing the whole patch. If it works, I'll commit.
Lucky winner: Its accepted an committed to trunk. Some of the new controls I've even already used in other projects using earlier patches of yours. So I thought it's really time to provide your hard work to the community. :-)

Great, thanks.

Quote from: MortenMacFly on July 23, 2010, 09:09:24 PM
Could you please update the "patchorama" now to reflect the submission and make it easier for me to see what's left?

Yes but see my PM for more.

Quote from: MortenMacFly on July 23, 2010, 09:09:24 PM
BTW: The weight which you have applied to the different controls might be worth a discussion. But we will see whether there are complains on that issue after the next nightly.

Yes, as suggested some time back. It's currently purely alphabetical, which makes most sense to me although I understand that that moves apart some related controls. I think we probably need to add some tabs and group a few things that way.

Cheers.
DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]

Cryogen

Quote from: seb_seb0 on July 25, 2010, 09:12:09 PM
    2 - the wxSmithAUI cbp project file contains 2 targets : Windows & Unix. It leads to a warning message when recompiling the workspace. Is it possible to split the project in 2 files (1 for each target), and add only the Windows target to the workspace ? (and same for UNIX)

Yes, pleeeeeeeeease get rid of this. It's been like that for ages. ;-)
I think you'll find the same on Unix.

Quote from: seb_seb0 on July 25, 2010, 09:12:09 PM
    3 - I have many times the same warning regarding wxPropGrid:
..\..\..\sdk\wxpropgrid\include/wx/propgrid/propdev.h:18: warning: type attributes ignored after type is already defined
Would it be possible to remove it ? (probably a #define to do somewhere, or in the compilation line).

I wish. I can't find exactly what causes this. It happens in a few places around C::B. There is a compiler directive which fixes it but I can't get to my code to tell you what it is. Google it.

Bye.
DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]

Cryogen

Quote from: MortenMacFly on July 26, 2010, 08:44:24 AM
I actually like this idea of having just one project file very much, although it throws an error (actually it's a warning only). I think it's a nice "tech-demo" to explain the "platform" feature of C::B for project files. So I'd rather leave it like it is.

I see your point but it's another warning we shouldn't see and it's inconsistent with every other project in the system. Perhaps we need an option within C::B to turn off warnings for other platform projects?

Ciao.
DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]

Cryogen

Quote from: seb_seb0 on July 26, 2010, 10:42:02 PM
Hello,

I have a crash occuring with wxBitmapComboBox (on Windows Vista).
Insert a new wxBitmapComboBox in a wxPanel.
Modify the field "number of images" to a positive value in the property grid.

I have tried to debug, but the bug did not appear during debugging.
The bug *seems* to happen in the following lines (in function wxsBitmapComboBox::OnExtraPropertyChanged, in file wxsbitmapcombobox.cpp, start at line 228)

for(int i = m_iNumImages; i < iNewFields; i++) {
               m_arrBitmapIds[i] = Grid->GetGrid()->AppendIn(m_idImages, NEW_IN_WXPG14X wxImageFileProperty(wxString::Format(wxT("%s %d"), sImage.c_str(), i + 1), wxPG_LABEL));
           }

but I have no guarantees for that. Does anybody have an idea ?
If I find a solution, I will post it of course.

Sebastien

I'll check when I can (don't hold your breath) but this will change with the image manager, anyway. Do you have a number in that field and no path for the image? That might do it. The line you show inserts a path field for each image in iNumImages, which is the number in that "Number of images" field. It also assumes PropGrid 1.4, of course.

Cryo.
DoxyBlocks: Now in contrib. Cool, baby.
DoxyDocs: [url="http://wxsmithaddons.sourceforge.net/docs/doxyblocks/"]http://wxsmithaddons.sourceforge.net/docs/doxyblocks/[/url]
wxSmith Add-ons: [url="http://wxsmithaddons.sourceforge.net/"]http://wxsmithaddons.sourceforge.net/[/url]
Cryo's Patchorama: [url="http://forums.next.codeblocks.org/index.php/topic,12619.0.html"]http://forums.next.codeblocks.org/index.php/topic,12619.0.html[/url]