Author Topic: Patch to update wxPropertyGrid to version 1.2.6 and current wxSmith testing  (Read 13847 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
FYI:

   NOTE: Patches Uploaded to http://www.savefile.com/projects/1039215
   NOTE: This patch needs tested by someone who knows how to use wxSmith
   NOTE: This patch needs tested by building with auto tools

Patch submitted to BerliOS to patch wxSmith in prep of wxPropertyGrid update.
   [ Patch #1903 ] wxSmith patch for wxW28 and wxPropertyGrid 1.2.x
   https://developer.berlios.de/patch/?func=detailpatch&patch_id=1903&group_id=5358

Download wxPropertyGrid from http://wxpropgrid.sourceforge.net
http://wxpropgrid.sourceforge.net/cgi-bin/index?page=download

save extracted folder wxpropgrid-1.2.6-src to toplevel SVN Directory. Code below copies files to needed locations.

Apply patch WXMAKINGLIB_PROPGRID-unix.patch

Tim S

Subset of my batch file: copy-wxpropgrid-1.2.6-src-files.bat

Code
xcopy /y wxpropgrid-1.2.6-src\contrib\include\wx\propgrid\*.h src\include\propgrid\include\wx\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\include\wx\propgrid\propgrid.doxygen src\sdk\propgrid\include\wx\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\include\wx\propgrid\propgrid.i src\sdk\propgrid\include\wx\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\* src\sdk\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\src\propgrid\* src\sdk\propgrid\src\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\build\propgrid\* src\sdk\propgrid\build\propgrid\


Status Report:
     I have downloaded the snapshot mentioned in next post; working on updating it.
  2006-12-05 12:50
     1.2.4 and 1.2.5(12/03 snapshot) causes wxSmith addDialog to crash.
     1.2.3 does NOT cause wxSmith addDialog to crash, looking at changes to fix if I can spot fix.
  2006-12-05 20:40
     I think the crashes is because wxModule use was added in version 1.2.4.
  2006-12-05 21:50
     Patch submitted to wxPropertyGrid
  2006-12-07 05:50
     Patch submitted to BerliOS to patch wxSmith (old) in prep of wxPropertyGrid update.
  2007-01-05 20:20
     Uploaded new wxpropgrid_1_2_6_prerelease-unix.patch to http://www.savefile.com/projects/1039215
  2007-01-30 19:00
     Uploaded new wxpropgrid_1_2_6_release-unix-patch.7z to http://www.savefile.com/projects/1039215
     Uploaded new wxpropgrid_1_2_6_release-unix.patch to http://www.savefile.com/projects/1039215
  2007-02-25 14:00
     Uploaded WXMAKINGLIB_PROPGRID-unix.patch to http://www.savefile.com/projects/1039215

Tim S
« Last Edit: March 01, 2007, 09:21:07 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Patch to update wxPropertyGrid to version 1.2.4
« Reply #1 on: December 04, 2006, 04:26:32 pm »
There is a bug in propgrid 1.2.4 which causes it to not paint at all on wxGTK if the extra style wxPG_EX_NATIVE_DOUBLE_BUFFERING is not used.

Either set that extra style, or use the 12-3-06 snapshot of the 1.2.5 source.

I just encountered that problem with wxFormBuilder.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patch to update wxPropertyGrid to version 1.2.4
« Reply #2 on: December 06, 2006, 12:05:14 pm »
In working on the patch to upgrade wxPropertyGrid to version 1.2.4, I have discovered an design issue that needs input from the CodeBlocks Team and the wxSmith developer Byo.

The classes used in wxPropertyGrid sample propgridsample.cpp/.h has been added to the wxPropertyGrid library advprops.cpp/.h. These classes are mainly wxAdvImageFilePropertyClass and wxAdvImageFileProperty.

I see three ways to proceed.

1. Keep the wxAdvImageFileProperty classes in the file advprops.cpp.

2. Since the only thing in CodeBlocks using wxAdvImageFileProperty classes is wxSmith (old version) move the wxAdvImageFileProperty classes to wxsadvimageproperty.cpp/.h files.

3. Move them to some other file in the wxPropertyGrid sub-folders

What do you think will be the best way to solve this design issue?

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Patch to update wxPropertyGrid to version 1.2.4
« Reply #3 on: December 06, 2006, 06:10:59 pm »
In working on the patch to upgrade wxPropertyGrid to version 1.2.4, I have discovered an design issue that needs input from the CodeBlocks Team and the wxSmith developer Byo.

The classes used in wxPropertyGrid sample propgridsample.cpp/.h has been added to the wxPropertyGrid library advprops.cpp/.h. These classes are mainly wxAdvImageFilePropertyClass and wxAdvImageFileProperty.

I see three ways to proceed.

1. Keep the wxAdvImageFileProperty classes in the file advprops.cpp.

2. Since the only thing in CodeBlocks using wxAdvImageFileProperty classes is wxSmith (old version) move the wxAdvImageFileProperty classes to wxsadvimageproperty.cpp/.h files.

3. Move them to some other file in the wxPropertyGrid sub-folders

What do you think will be the best way to solve this design issue?

Tim S

I think that the best is to leave wxPropGrid code as it was and adopt for new environment. It shouldn't be hard, updating one file in wxSmith should fix the problem with wxAdvImageProperty.

BTW. Could you send me some list of problems with wxSmith after changing to new wxPG ?

BYO

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patch to update wxPropertyGrid to version 1.2.4
« Reply #4 on: December 07, 2006, 03:13:58 am »
2. Since the only thing in CodeBlocks using wxAdvImageFileProperty classes is wxSmith (old version) move the wxAdvImageFileProperty classes to wxsadvimageproperty.cpp/.h files.

I am going to upload a patch for option two in the next day or so.

I am a beginner with wxSmith, so can you point me to the Wiki or posts that describe the way to use it.
Also, a post that describes the known issues with it.

Then, I can test the new wxPropertyGrid better under wxSmith use. I will add a list of problems testing old wxSmith to this thread.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
I am working on this patch again, I hope to get it uploaded this week using a snapshot of wxPropertyGrid 1.2.6.
Tim S
« Last Edit: January 02, 2007, 03:16:54 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
I have uploaded a new patch, it needs tested under Linux and Windows.
The main (the only plugin that I know of) plugin that uses wxPropertyGrid is wxSmith.
http://www.savefile.com/projects/1039215
wxpropgrid_1_2_6_prerelease-unix.patch


Tim S

Here's how I use it under windows.
Note: Both unix2dos and patch commands are from minGW/MSys

Code
unix2dos --newfile wxpropgrid_1_2_6_prerelease-unix.patch wxpropgrid_1_2_6_prerelease.patch
patch --unified --strip=0 --ignore-whitespace --forward --input=wxpropgrid_1_2_6_prerelease.patch


Meaning of defines added to project file:
WXMAKINGLIB_PROPGRID makes wxPropertyGrid into static library
wxPG_USE_WXMODULE=0 turns off the use of wxWidgets wxModule; the use wxModule was causing wxSmith to crash.
wxPG_COMPATIBILITY_1_0_0 turns on 1.0.0 compatibility mode; this should be removed and the errors fixed, but we can do that another day.

#defines needed in target wxPropertyGrid
WXMAKINGLIB_PROPGRID
wxPG_USE_WXMODULE=0
wxPG_COMPATIBILITY_1_0_0

#defines needed in project wxSmith
WXMAKINGLIB_PROPGRID
wxPG_COMPATIBILITY_1_0_0

« Last Edit: February 05, 2007, 12:38:55 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Download wxPropertyGrid from http://wxpropgrid.sourceforge.net
http://wxpropgrid.sourceforge.net/cgi-bin/index?page=download

save extracted folder wxpropgrid-1.2.6-src to toplevel SVN Directory. Code below copies files to needed locations.

Apply patch WXMAKINGLIB_PROPGRID-unix.patch

Tim S

Code
xcopy /y wxpropgrid-1.2.6-src\contrib\include\wx\propgrid\*.h src\include\propgrid\include\wx\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\include\wx\propgrid\propgrid.doxygen src\sdk\propgrid\include\wx\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\include\wx\propgrid\propgrid.i src\sdk\propgrid\include\wx\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\* src\sdk\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\src\propgrid\* src\sdk\propgrid\src\propgrid\
xcopy /y wxpropgrid-1.2.6-src\contrib\build\propgrid\* src\sdk\propgrid\build\propgrid\
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Have you tested how it works with wxSmith (for now only this part of C::B uses property grid). I think it may be a good time to switch to new property grid in svn trunk :)

BYO

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Have you tested how it works with wxSmith (for now only this part of C::B uses property grid). I think it may be a good time to switch to new property grid in svn trunk :)

BYO

Not lately, and I really have no idea on how to use wxSmith so I never really did much testing.
I just opened an wxSmith project and added an widget to it. This was how I found out that wxModule does NOT work with CodeBlocks. So, I submitted a patch to wxPropertyGrid to have an option to disable wxModule.

I am running out of time to maintain the patch, so the sooner you want to upgrade the better. Note, the apply of the patch to wxSmith can be done without upgrading to wxWidgets 2.8 or upgrading wxPropertyGrid to 1.2.6. The below patch is just to wxSmith project.

Patch submitted to BerliOS to patch wxSmith in prep of wxPropertyGrid update.
   [ Patch #1903 ] wxSmith patch for wxW28 and wxPropertyGrid 1.2.x
   https://developer.berlios.de/patch/?func=detailpatch&patch_id=1903&group_id=5358

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patch to update wxPropertyGrid to version 1.2.6 and current wxSmith testing
« Reply #10 on: February 26, 2007, 01:44:34 am »
FYI:

wxSmith patch for wxW28 and wxPropertyGrid 1.2.x summary

Change 1: WXWIN_COMPATIBILITY_2_4 is turn off by default under wxWidgets 2.8
Problem 1: This makes wxHIDE_READONLY undefined.
Solution 1: Added #if (WXWIN_COMPATIBILITY_2_4) blocks around wxHIDE_READONLY.

Change 2: wxFontEnumerator::GetFacenames returns wxArrayString instead of wxArrayString*

Solution 2: Added code
#if wxCHECK_VERSION(2, 8, 0)
wxArrayString faceNames = Enumer.GetFacenames();
#else
wxArrayString& faceNames = *Enumer.GetFacenames();
#endif

And use faceNames where GetFacenames was used.

Problem 3: wxWidgets 2.8 does NOT like WX_DEFINE_ARRAY(bool,wxArrayBool)
Solution 3: Replaced it with WX_DEFINE_ARRAY_INT(bool,wxArrayBool)

Change 4: OnCancel method removed from wxDialog.
Problem 4: wxsArrayStringEditorDlg was using it.
Solution 4: Created wxsArrayStringEditorDlg::OnCancel method,
     note I am not sure if my code in the OnCancel method is correct.

Change 5: wxListbook::HitTest in protected in wx/listbook.h, Fixed in wxW2.8.2
Problem 5: The file src/plugins/contrib/wxSmith/defwidgets/wxslistbook.cpp uses it.
Solution 5: Cast to wxBookCtrlBase

Change 6: Constants wxOPEN, wxFILE_MUST_EXIST, wxSAVE and wxOVERWRITE_PROMPT has been depreciated/obsoleted.
Solution 6: Changed Constants to new name in #if/else/endif block

Change 7A: Constants wxTHICK_FRAME and wxRESIZE_BOX has been depreciated/obsoleted.
Solution 7A: Replaced wxTHICK_FRAME with wxRESIZE_BORDER. Replaced wxRESIZE_BOX with wxMAXIMIZE_BOX.

Change 7B: Constants wxDIALOG_MODELESS, wxNO_3D and wxDIALOG_MODAL has been depreciated/obsoleted.
Solution 7B: Removed use of Constansts.

Change 8: Method wxBitmapButton::SetLabel has been depreciated/obsoleted.
Solution 8: Replaced with wxBitmapButton::SetBitmapLabel.

Change 9: propgrid macro WX_PG_IMPLEMENT_PROPERTY_CLASS has been changed.
Solution 9: used #if/else/endif block

Change 10: Structure wxPGChoiceInfo in header propgrid.h has changed
Solution 10: if wxPG_VERSION > 1099 use with m_choices.GetLabel(?) instead of m_constants->GetLabel(?)

Change 11: wxPropertyGrid 1.2.6 requires defines to compile and link right
Solution 11: Added defines for WXMAKINGLIB_PROPGRID and wxPG_COMPATIBILITY_1_0_0
Note 11: The main CB project needs an extra define of wxPG_USE_WXMODULE=0

Change 12: Constant wxTE_LINEWRAP has been depreciated/obsoleted.
Solution 12: Replaced wxTE_LINEWRAP with wxTE_CHARWRAP.

Change 13: Constants wxSP_FULLSASH and wxSP_SASH_AQUA has been depreciated/obsoleted.
Solution 13: Removed Constansts.

Change 14: Pre-compiled Headers issues.
Solution 14: Added more includes guarded by WX_PRECOMP

Tim S
« Last Edit: February 26, 2007, 02:14:56 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org