Author Topic: wxSmith improvement  (Read 47317 times)

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: wxSmith improvement
« Reply #45 on: September 06, 2010, 09:45:22 pm »
Hello,

I do not know if you have seen my post here:
http://forums.codeblocks.org/index.php/topic,13243.msg89078.html#msg89078

I have sent a patch against SVN 6570 which solves the problem with wxsMyColourPropertyClass.
It is a 10 lines patches, and it solved the problem for the colour combobox in wxSmith.

Let me know if that helps you, or if I misunderstood completly the last posts.

Sebastien

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #46 on: September 07, 2010, 10:17:10 am »
Hello,

I do not know if you have seen my post here:
http://forums.codeblocks.org/index.php/topic,13243.msg89078.html#msg89078

I have sent a patch against SVN 6570 which solves the problem with wxsMyColourPropertyClass.
It is a 10 lines patches, and it solved the problem for the colour combobox in wxSmith.

Let me know if that helps you, or if I misunderstood completly the last posts.

Sebastien

It shows the colourboxes, but the rest is not working (can not chose a colour).
There seem to be api-changes, so some of the choices do not longer work.
For the coulours we can use the properties of wxPropGrid, I don't know if there is a need to still use the customcolourpropoerty.
I did not find a solution for the editors, but don't have much time to look into it (not at home the next two or three days).

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: wxSmith improvement
« Reply #47 on: September 07, 2010, 09:28:03 pm »
Hello,

I do not know if you have seen my post here:
http://forums.codeblocks.org/index.php/topic,13243.msg89078.html#msg89078

I have sent a patch against SVN 6570 which solves the problem with wxsMyColourPropertyClass.
It is a 10 lines patches, and it solved the problem for the colour combobox in wxSmith.

Let me know if that helps you, or if I misunderstood completly the last posts.

Sebastien

It shows the colourboxes, but the rest is not working (can not chose a colour).
There seem to be api-changes, so some of the choices do not longer work.
For the coulours we can use the properties of wxPropGrid, I don't know if there is a need to still use the customcolourpropoerty.
I did not find a solution for the editors, but don't have much time to look into it (not at home the next two or three days).

Unfortunately you are right.
If I find some time, I will try a bit deeper. I will let you know if I find something.

Sebastien

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith improvement
« Reply #48 on: September 08, 2010, 05:17:05 am »
Hello,

I do not know if you have seen my post here:
http://forums.codeblocks.org/index.php/topic,13243.msg89078.html#msg89078

I have sent a patch against SVN 6570 which solves the problem with wxsMyColourPropertyClass.
It is a 10 lines patches, and it solved the problem for the colour combobox in wxSmith.

Let me know if that helps you, or if I misunderstood completly the last posts.

Sebastien

Nice catch, thanks Seb. That's one step forward, at least. I'm still looking as well.


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith improvement
« Reply #49 on: September 09, 2010, 10:19:09 pm »

 Hi Guys,

Two things. I've done some more work on wxSmith's problems, specifically the colour property. The main problem seems to be that

Code
int type = wxEnumPropertyClass::DoGetValue().GetLong();

in wxsMyColourPropertyClass::OnEvent() usually returns 0. I would have said "always" except that during the last run I saw the value 33 a few times, for unknown reasons. Either way, it always ends up failing to match any of the conditionals and therefore, we get no action. I've been unable to trace why, other than that it falls through to wxPGProperty::DoGetValue(). I can't see how the value is set or why it's not getting the right value.

I also tried building a new property based on the 1.4 docs, but it behaves the same way as soon as I start using wxEnumPropertyClass.

I think we need to try to resurrect it if we can because it adds some features over the default wxSystemColourProperty, such as the "default" entry. One option might be to steal that and modify it.

There seems to be some sort of refresh problem, in general, that stops the text appearing for the other properties but, again, where and why is anyone's guess.

If whomever did the upgrade has a better knowledge of wxSmith's internals, perhaps it should go back to them to find out what didn't upgrade as intended?

The other thing is that I received a call 15 mins ago saying that I've finally got a real job. So, from Monday, I will have much less time to work on C::B. Reality bites, huh? ;-)
I'll still be around, though.

Cheers.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #50 on: September 17, 2010, 12:31:09 pm »
I attach a patch that seems to fix the issue for wxsColourProperty, it's not deeply tested (and not tested at all on windows and mac), but seems to work.

Please other devs (and users of course) please test and give feedback.

I will look into the other issues (wxListbox and others) later.

The patch is against trunk (r6595), but I think it works with all other branches too.

EDIT:
attachment removed, actual patch see http://forums.codeblocks.org/index.php/topic,12362.msg89758.html#msg89758
« Last Edit: September 19, 2010, 11:36:46 pm by jens »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #51 on: September 17, 2010, 09:02:23 pm »
After some testing, I found that the patch is just a starting point not a solution, it works for existing elements, but crashes if a new one with colourproperty is added.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #52 on: September 19, 2010, 12:50:11 pm »
After some testing, I found that the patch is just a starting point not a solution, it works for existing elements, but crashes if a new one with colourproperty is added.
New version (a little larger), but this time it seems to work correctly.

It's against trunk and not (yet) tested on windows.

Any feedback is welcome.

EDIT:
attachment removed, actual patch see http://forums.codeblocks.org/index.php/topic,12362.msg89758.html#msg89758
« Last Edit: September 19, 2010, 11:36:04 pm by jens »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith improvement
« Reply #53 on: September 19, 2010, 08:45:18 pm »
Any feedback is welcome.
I had applied the first one, too - no serious issues so far. I'll try this one, too. If you hear nothing all is fine. :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #54 on: September 19, 2010, 11:34:30 pm »
Small update to my previous patch (build/link-fix for windows):

either use the patch attached here or remove WXDLLIMPEXP_PG from class-declaration of wxsMyColourPropertyClass in wxscolourproperty.cpp:124.

I remove the older patches.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith improvement
« Reply #55 on: September 20, 2010, 12:44:29 am »
 [EDIT](nonsense removed)

My bad, the patch didn't, apparently. Ergh. It's working well, now.  :oops:

Win7 and SVN 6575.

Bye.
« Last Edit: September 20, 2010, 01:21:47 am by Cryogen »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #56 on: September 21, 2010, 12:08:46 am »
Just committed the fix for the colourproperty.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith improvement
« Reply #57 on: September 28, 2010, 07:37:40 am »
Just committed the fix for the colourproperty.
The other issues (related to wxCustomEditorProperty) should be fixed in trunk now (svn r6441) and will be fixed in cc- and dbg-branch afetr the next merge.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith improvement
« Reply #58 on: September 30, 2010, 02:58:30 am »

 Hey Jens,

The other issues (related to wxCustomEditorProperty) should be fixed in trunk now (svn r6441) and will be fixed in cc- and dbg-branch afetr the next merge.


Many thanks for fixing this. It's all working properly now, and better thanks to the enhancements you made. It also fixed another issue I was seeing that must have been related.

Cheers,

 G.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith improvement
« Reply #59 on: October 12, 2010, 05:36:31 am »

 Hi Guys,

I've added the rest of wxSmithImage's editors to wxSmith. Patch 21 in the patchorama. Details are here: http://forums.codeblocks.org/index.php/topic,13213.0.html.
I'll update the demo app over the next few days. I think the tree editor will allow me to complete the treebook control, now, as well, which is nice.

Ciao.