Author Topic: Added some of the missing controls to wxSmith  (Read 16505 times)

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #15 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)
Code: [Select]
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
« Last Edit: July 26, 2010, 10:45:08 pm by seb_seb0 »

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #16 on: August 06, 2010, 10:44:37 pm »

 Hi Guys,

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

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. ;-)

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.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.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #17 on: August 06, 2010, 10:48:00 pm »

 Hi,

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. ;-)

Do I need to build from source and apply the diff file myself?

Yes, sir.

(If I need to apply the patch, does 12 include all of the previous ones?)

No. That will be stated if it happens.

Cheers.


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #18 on: August 06, 2010, 10:48:52 pm »

BTW: I assume it_s tested under Linux? Because that'd be a problem for to do me ATM.

You betcha. Always. :-)


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #19 on: August 06, 2010, 10:53:17 pm »
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.

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.

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.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #20 on: August 06, 2010, 10:56:30 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.

    3 - I have many times the same warning regarding wxPropGrid:
Code: [Select]
..\..\..\sdk\wxpropgrid\include/wx/propgrid/propdev.h:18: warning: type attributes ignored after type is already definedWould 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.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #21 on: August 06, 2010, 10:58:42 pm »
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.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #22 on: August 06, 2010, 11:02:58 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)
Code: [Select]
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.