Author Topic: wxSmith development  (Read 127636 times)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Question
« Reply #120 on: August 26, 2005, 10:55:38 am »
If you notice in the XRC sourcecode, the handlers for the distinct classes do all the processing to create new objects. Why not use the xrc code in the first place (or at least copy from it)?

I usually base on xrc source when adding new widgets (hope cyberkoa do the same ;) ) but it's architecture is different from wxSmith's one. So it may be used to solve some incompatibility problems but unfortunately not as a base of source code :(

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Re: wxSmith development
« Reply #121 on: August 27, 2005, 05:20:23 am »
I have just successfully commit the changes to CVS :)

Basically, I have added in the following controls (including icons)

1. wxdatepickerctrl
2. wxradiobox
3. wxradiobutton
4. wxscrollbar
5. wxspinctrl
6. wxspinbutton
7. wxtreectrl

I refer to the xrc output of wxGlade to code most of the controls except those not in wxGlade.

And the styles , I refer to the Help file of wxwidgets-2.6.1 .


Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Re: wxSmith development
« Reply #122 on: September 07, 2005, 10:32:08 pm »
hi , byo , seems like our time could not meet in the IM  .. Just some update from my side

Initially I would like to try to do some enhancement on the widget editor such as Pop up menu , but I can see you are doing some major changes in the code , so I stop the research .

Instead , I try to see any additional new widget that I can add , and I am doing 1 of them , ie, wxStaticLine.

I manage to add it , however, there is a problem where when we try to add , it cannot be seen because it takes the default size (very size) , user can only select it from the TreeViewCtrl .

Therefore, I try to hard code a minimum size (wxSize(10,10))  in the creation code and it shows with a viewable size , but have one problem , it cannot be resized !? :shock:

I have looked into the code but I think it is better I do not alter the code of resizing because you are still doing major changes in the code of this layer.


 


Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Re: wxSmith development
« Reply #123 on: September 08, 2005, 07:13:42 am »
Quote
I manage to add it , however, there is a problem where when we try to add , it cannot be seen because it takes the default size (very size) , user can only select it from the TreeViewCtrl .

Therefore, I try to hard code a minimum size (wxSize(10,10))  in the creation code and it shows with a viewable size , but have one problem , it cannot be resized

I think I know the reason already :) , still checking where is the suitable place to initialize the size.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #124 on: September 08, 2005, 03:17:38 pm »
Hi, currently I can not help, I'll be inaccessible for one week.

About editor's updates: I've notices many bugs when running wxSmith on Linux. Most of changes were made to add cross-platform compatibility (there's no such thing like transparent window on wxGTK - or it doesn't work and there's no such thing like correct refresh order on wxMSW, and more and more... huh, weird things). And I guess it will change a little bit. But if You'll add something I'll keep it in source :) So any experiments are welcome :D

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #125 on: September 17, 2005, 12:06:34 am »
Small announcement:

wxSmith is able to handle colour and font properties for default widgets so it can produce more artistic resources ;)

Some screenshoots in attachments :)



[attachment deleted by admin]

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: wxSmith development
« Reply #126 on: September 20, 2005, 08:35:43 am »
Hi Byo, I want to compile wxSmith with Unicode support but that isn't possible...
I get the following error:
Code: [Select]
defwidgets\wxsspinctrl.cpp:23:1: pasting "LL" and "L"0"" does not give a valid preprocessing token
defwidgets\wxsspinctrl.cpp: In member function `virtual void wxsSpinCtrl::BuildExtVars()':
defwidgets\wxsspinctrl.cpp:23: error: `LL' undeclared (first use this function)
defwidgets\wxsspinctrl.cpp:23: error: (Each undeclared identifier is reported only once for each function it appears in.)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #127 on: September 20, 2005, 09:35:59 pm »
Hi Byo, I want to compile wxSmith with Unicode support but that isn't possible...

My mistake - I haven't compiled wxSmith with unicode support lately. Just wait a minute wand it will be fixed ;)

EDIT: Fixeed version is in CVS :)
« Last Edit: September 20, 2005, 09:56:16 pm by byo »

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Re: wxSmith development
« Reply #128 on: September 20, 2005, 10:29:26 pm »
It seems like is my mistake , thx byo for fixing it :oops:
« Last Edit: September 20, 2005, 10:31:45 pm by cyberkoa »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxSmith development
« Reply #129 on: October 06, 2005, 05:13:48 pm »
i wanted to learn how to work with wxSmith and tried to make a dialog with buttons.
on Button Click a wxTextCtrl should be updated with a new text.

1.) typo in wxButton->SetToolTip
then i noticed, that when i want to set a Tooltip for the Button, there  is a typo.
It should insert a wxButton->SetToolTip() member function call,
but it inserts a wxButton->SetToolTop() instead,
which leads to a compiler error of course.

2.)  EVENT Handling
i tried to use an event handling function for my button,
everything looks fine, there is an  DECLARE_EVENT_TABLE() in the class definition
and an EVENT_TABLE in the implementation file. The app builds fine without errors
but the button-event handler function never gets called !?!

maybe you have an example and/or some documentation how this should work ?

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #130 on: October 06, 2005, 06:20:42 pm »
i wanted to learn how to work with wxSmith and tried to make a dialog with buttons.
on Button Click a wxTextCtrl should be updated with a new text.

1.) typo in wxButton->SetToolTip
then i noticed, that when i want to set a Tooltip for the Button, there  is a typo.
It should insert a wxButton->SetToolTip() member function call,
but it inserts a wxButton->SetToolTop() instead,
which leads to a compiler error of course.

2.)  EVENT Handling
i tried to use an event handling function for my button,
everything looks fine, there is an  DECLARE_EVENT_TABLE() in the class definition
and an EVENT_TABLE in the implementation file. The app builds fine without errors
but the button-event handler function never gets called !?!

maybe you have an example and/or some documentation how this should work ?

Heh, You've found two bugs. Huh, wxSmith doesn't recognize properly if dialog loads from xrc or not :/

I'll try to fix those bugs today :)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxSmith development
« Reply #131 on: October 06, 2005, 06:32:00 pm »
Quote from: byo
Heh, You've found two bugs. Huh, wxSmith doesn't recognize properly if dialog loads from xrc or not
8)

please
provide a some documentation
* which code does wxSmith generate and
* where does it update the code,
* where can i add my custom code
* ...
and a sample project in any case
so that a newbie can at least make a look how it *should* work,

thanks a lot, i'm shure wxSmith will be a great tool soon !

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #132 on: October 06, 2005, 11:28:16 pm »
please
provide a some documentation
* which code does wxSmith generate and
* where does it update the code,
* where can i add my custom code
* ...
and a sample project in any case
so that a newbie can at least make a look how it *should* work,

I'll write something in wiki but first some bugs are waiting ;)
And there will be wxSmith wizard so creating wxSmith apps will be created just in few clicks :)

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: wxSmith development
« Reply #133 on: October 07, 2005, 04:17:45 am »
Yeah, but I vote for the things that tiwag ask, before those wizards with some dogs or clips  :P

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxSmith development
« Reply #134 on: October 07, 2005, 03:16:43 pm »
Quote from: byo
...Heh, You've found two bugs ... I'll try to fix those bugs ...

fine, the event-handler is called now, thanks !

but now it crashes everytime, when i click on something of the created dialog-resource

Code: [Select]
-------------------

Error occured on Friday, October 7, 2005 at 15:03:46.

D:\Programme\CodeBlocks\codeblocks.exe caused an Access Violation at location 0153cef2 in module D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll Reading from location 00000020.

Registers:
eax=0147ad80 ebx=00b76848 ecx=01437f30 edx=00000020 esi=016120f0 edi=0022f2d8
eip=0153cef2 esp=0022f098 ebp=0022f140 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202

Call stack:
0153CEF2  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153CEF2  GetSDKVersionMinor
0153D2E5  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153D2E5  GetSDKVersionMinor
100A77A8  D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C  D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49  D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49  _ZN12wxEvtHandler12ProcessEventER7wxEvent
0152C086  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0152C086  GetSDKVersionMinor
100A77A8  D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C  D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49  D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49  _ZN12wxEvtHandler12ProcessEventER7wxEvent
01526297  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01526297
01523596  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523596
01523068  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523068
100A77A8  D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C  D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49  D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49  _ZN12wxEvtHandler12ProcessEventER7wxEvent
1010D7E6  D:\TOOLS\wxmsw26_gcc_cb.dll:1010D7E6  _ZN8wxWindow16HandleMouseEventEjiij
1010FF59  D:\TOOLS\wxmsw26_gcc_cb.dll:1010FF59  _ZN8wxWindow13MSWWindowProcEjjl
10108B20  D:\TOOLS\wxmsw26_gcc_cb.dll:10108B20  [email protected]
77D18734  C:\WINDOWS\system32\USER32.dll:77D18734  GetDC
77D18816  C:\WINDOWS\system32\USER32.dll:77D18816  GetDC
77D189CD  C:\WINDOWS\system32\USER32.dll:77D189CD  GetWindowLongW
77D18A10  C:\WINDOWS\system32\USER32.dll:77D18A10  DispatchMessageW
77D2E097  C:\WINDOWS\system32\USER32.dll:77D2E097  IsDialogMessageW
77D3C6AB  C:\WINDOWS\system32\USER32.dll:77D3C6AB  IsDialogMessageA
1010803E  D:\TOOLS\wxmsw26_gcc_cb.dll:1010803E  _ZN8wxWindow17MSWProcessMessageEP6tagMSG
100E85B4  D:\TOOLS\wxmsw26_gcc_cb.dll:100E85B4  _ZN11wxEventLoop17PreProcessMessageEP6tagMSG
100E84F9  D:\TOOLS\wxmsw26_gcc_cb.dll:100E84F9  _ZN11wxEventLoop14ProcessMessageEP6tagMSG
100E8AE4  D:\TOOLS\wxmsw26_gcc_cb.dll:100E8AE4  _ZN11wxEventLoop8DispatchEv
100E8880  D:\TOOLS\wxmsw26_gcc_cb.dll:100E8880  _ZN11wxEventLoop3RunEv
101823DE  D:\TOOLS\wxmsw26_gcc_cb.dll:101823DE  _ZN9wxAppBase8MainLoopEv
004039AC  D:\Programme\CodeBlocks\codeblocks.exe:004039AC
1004318F  D:\TOOLS\wxmsw26_gcc_cb.dll:1004318F  _Z14wxUninitializev
100B077C  D:\TOOLS\wxmsw26_gcc_cb.dll:100B077C  _Z7wxEntryP11HINSTANCE__S0_Pci
0040138A  D:\Programme\CodeBlocks\codeblocks.exe:0040138A
0044669A  D:\Programme\CodeBlocks\codeblocks.exe:0044669A
004011E7  D:\Programme\CodeBlocks\codeblocks.exe:004011E7
00401238  D:\Programme\CodeBlocks\codeblocks.exe:00401238
7C816D4F  C:\WINDOWS\system32\kernel32.dll:7C816D4F  RegisterWaitForInputIdle


-------------------

Error occured on Friday, October 7, 2005 at 15:09:01.

D:\Programme\CodeBlocks\codeblocks.exe caused an Access Violation at location 00000000 Reading from location 00000000.

Registers:
eax=00000000 ebx=00b76848 ecx=0148cf58 edx=0148a110 esi=016120f0 edi=0022f48c
eip=00000000 esp=0022f228 ebp=0022f244 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202

Call stack:
00000000
015B1989  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:015B1989  GetSDKVersionMinor
0153CEDB  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153CEDB  GetSDKVersionMinor
0153D2E5  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0153D2E5  GetSDKVersionMinor
100A77A8  D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C  D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49  D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49  _ZN12wxEvtHandler12ProcessEventER7wxEvent
0152C086  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:0152C086  GetSDKVersionMinor
100A77A8  D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C  D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49  D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49  _ZN12wxEvtHandler12ProcessEventER7wxEvent
01526297  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01526297
01523596  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523596
01523068  D:\Programme\CodeBlocks\share\codeblocks\plugins\wxsmith.dll:01523068
100A77A8  D:\TOOLS\wxmsw26_gcc_cb.dll:100A77A8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7B6C  D:\TOOLS\wxmsw26_gcc_cb.dll:100A7B6C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B49  D:\TOOLS\wxmsw26_gcc_cb.dll:100A8B49  _ZN12wxEvtHandler12ProcessEventER7wxEvent
1010D7E6  D:\TOOLS\wxmsw26_gcc_cb.dll:1010D7E6  _ZN8wxWindow16HandleMouseEventEjiij
1010FF59  D:\TOOLS\wxmsw26_gcc_cb.dll:1010FF59  _ZN8wxWindow13MSWWindowProcEjjl
10108B20  D:\TOOLS\wxmsw26_gcc_cb.dll:10108B20  [email protected]
77D18734  C:\WINDOWS\system32\USER32.dll:77D18734  GetDC
77D18816  C:\WINDOWS\system32\USER32.dll:77D18816  GetDC
77D189CD  C:\WINDOWS\system32\USER32.dll:77D189CD  GetWindowLongW
77D196C7  C:\WINDOWS\system32\USER32.dll:77D196C7  DispatchMessageA
100E8515  D:\TOOLS\wxmsw26_gcc_cb.dll:100E8515  _ZN11wxEventLoop14ProcessMessageEP6tagMSG
100E8AE4  D:\TOOLS\wxmsw26_gcc_cb.dll:100E8AE4  _ZN11wxEventLoop8DispatchEv
100E8880  D:\TOOLS\wxmsw26_gcc_cb.dll:100E8880  _ZN11wxEventLoop3RunEv
101823DE  D:\TOOLS\wxmsw26_gcc_cb.dll:101823DE  _ZN9wxAppBase8MainLoopEv
004039AC  D:\Programme\CodeBlocks\codeblocks.exe:004039AC
1004318F  D:\TOOLS\wxmsw26_gcc_cb.dll:1004318F  _Z14wxUninitializev
100B077C  D:\TOOLS\wxmsw26_gcc_cb.dll:100B077C  _Z7wxEntryP11HINSTANCE__S0_Pci
0040138A  D:\Programme\CodeBlocks\codeblocks.exe:0040138A
0044669A  D:\Programme\CodeBlocks\codeblocks.exe:0044669A
004011E7  D:\Programme\CodeBlocks\codeblocks.exe:004011E7
00401238  D:\Programme\CodeBlocks\codeblocks.exe:00401238
7C816D4F  C:\WINDOWS\system32\kernel32.dll:7C816D4F  RegisterWaitForInputIdle