Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: byo on May 26, 2005, 02:38:44 am

Title: wxSmith development
Post by: byo on May 26, 2005, 02:38:44 am
I hope that we will discuss here things related to wxSmith :).

First of all I'll try to explain how wxSmith works :D

Waiting for any questions  (related to wxSmith of course :wink:)
Title: wxSmith development
Post by: cyberkoa on May 26, 2005, 05:15:07 am
I am interested but my still struggle to compile my codeblock properly. After I success the code::blocks ,compilation ,  I shall try to have a look on the code before asking question. Hope that you won't mind if it is  silly question .
Title: wxSmith development
Post by: DreadNot on May 26, 2005, 06:48:49 am
I'm onboard.  Successfully compiled C::B-wx2.6.0 and wxSmith.  As per my other posts, I'd like to see some kind of outline for the projects and items to tackle.  Also, to look at other RADs to form a common basis for implementation.

What problems is cyberkoa having with the compile?
Title: wxSmith development
Post by: David Perfors on May 26, 2005, 06:53:58 am
I think I missed it, but where could I download wxSmith?
Title: wxSmith development
Post by: DreadNot on May 26, 2005, 07:04:23 am
When you CVS checkout of C::B, make sure you get all revisions (if no matching revision, use most recent one).  The wxSmith project is in the ...\codeblocks\src\plugins\contrib\wxSmith dir.
Title: wxSmith development
Post by: David Perfors on May 26, 2005, 07:27:05 am
Thanks, I didn't see it :)
Title: wxSmith development
Post by: byo on May 26, 2005, 11:59:11 am
Ok, here are basics about wxSmith (I'll try to prepare some moredetailed doc, but need some time).

Main plugin's class is wxSmith - it's purpose is to: initialize and shutdown plugin (as all plugins shoud ;) ), process global events and signals inside plugin. These currently are: events from Code::Blocks and notifications from resource browser. I'll add other features (widget selection and event handler creation should also get thoiugh this I think). Other purpose of wxSmith class is to keep wxsProject class for each cbProject one. This association can be found using wxSmith::GetSmithProject and wxSmith::GetCBProject members. Currently it has also pointer to resource browser tree but it will be changed to singleton object soon.

Each cbProject has associated wxsProject class - associations are updated automatically so there's no need to care about that. wxsProject can be in three states - NotBinded (wxsProject has not been connected with cbPrject - it's set for a short time just after creation), NotWxsProject (set when there's no wxSmith configuration inside project) and Integrated (associated cbPrject use wxxSmith). Each wxsProject has list of different resources (currently only dialogs). These are automatically read from wxSmith's 'private' directory called of course 'wxsmith' - currently it must be located in same dir where C::B's .cbp file is found. wxSmith data is stored inside 'wxsmith/wxsmith.cfg' file - it's just a list of resources and files which handle them.

Resource is represented throughclass derived from wxsResource. I've decided to place these classes inside 'resources' directory. Currently there's one called wxsDialogRes. It can load and save xrc-like files.

Dialog is made of wxsWidget and wxsContainer classes (wxsContainer is derived from wxsWidget but adds abilities to handle child widgets). wxsWidget is the biggest class in wxSmith (maybe even too big but most of it's features can be just skipped in case of usual widgets). I'll deescribe each feature a little bit:
* Preview system - these are member functions operating on preview. MyCreatePreview() should create widget's preview and MyUpdate should update it's content, MyDeletePreview() should delete preview - but simple delete operator is enough. Currently change of any property value causes all dialog to be recreated (I tried to recreate or update separate widgets only but it didn't worked properly)
* Properties system - wxsWidget class has PropertiesObject (class: wxsProperties) - this object keeps list of all properties and manages them automatically. It is handling many default properties (like size, id etc) - this will be described later. If non-deefautl property should be added - this can be made by overriding wxsWidget::CreateObjectProperties function (wxample inside wxsButton class :) ).
* Default properties - all dedfautls are kept inside protected BaseParams variable (type: wxsWidgetBaseParams). Derived class can choose properties which are really used by passing pType param to constructor). It will mask properties shown inside properties window and all default values saved to and readeed from Xml.
* Xml saving / loading - XmlLoad loads whole tree structure for widget, XmlSave saves it. By deefault base params are laded and saved. To load/save other parametrs, MyXmlLoad and MyXmlSave can be overriden. Inside these funnctions XmlGetXXX and XmlSetXXX function can be used to read/save non-default properties.
* Code generation - currently not fully developed. GetProducingCode - this should produce code creating given widget, GetFinalizingCode - code add after creating children of this widget (may be usefull inside sizers etc) GetDeclarationCode - code declaring variable for this widget.
* Support for additional widget - I tried to add feature which would allow to use non-standard widgets. These could be supplied in library or even a source code for them could be given. It won't be developen now so should be considered as a dead code ;)

Each widget shoud have it's manager - such manager should be able to create and delete widget. There could be more managers currently loaded, but all shuold be registered insided wxsWidgetFactory class.
wxsWidgetFactory is a main clas producing and deleting widgets. All widget object MUST be created through it and MUST be deleted usind wxsWidgetFactory::Kill() function. wxsWidgetFactory is a singleton object.

Hope this will clarify a little bit how my plugin works. If You have any questions: just ask :)
Title: wxSmith development
Post by: cyberkoa on May 26, 2005, 04:48:40 pm
Quote from: DreadNot

What problems is cyberkoa having with the compile?


I manage to compile C::B using wxwidgets-2.4.2 but when I run from windows explorer , it give the common error "the program is causing error" and never able to run.

I try to run from C::B , then choose target "src" , it gives the same problem also .

I have try to reinstall MingW , reinstall wx-widgets2.4.2 , delete CVS and redownload again , recompile wxwidgets , then compile C::B . It give me the same problem ..  :cry:

Still do not hv idea what had happened bcos I try again to follow exactly the way in wiki to set up also give me the same problem.

I am not sure whether do I need to register the DLL file or not ?
Title: wxSmith development
Post by: rickg22 on May 26, 2005, 05:35:09 pm
cyberkoa: Remember that in TortoiseCVS you can "update special", and pick a specific TAG (C::B version) to use. It's better if you work on the 1.0beta-final, so at least we can be sure that it's not C::B source code that's causing the problems. (OH - and delete all the plugin dlls from both the devel and output subdirectories).
Title: wxSmith development
Post by: DreadNot on May 26, 2005, 10:36:50 pm
OK!  So now that I've got everything compiling (for now & until a new CVS), how do I make a really cool 8) screenshot of the C::B running the wxSmith plugin?  When I ran it, all I got was blank screens.
1. I created a wxWidgets project, but nothing shows (blank) in the Project tree (disturbing).
2. Nothing in Symbols and Watches.
3. I see the Resource tab with Property and Events tabs.  The top has "Resources->wxWidgets application".  Properties and Events are blank.
4. I see the Widgets tab at the bottom of the screen and it displays the basics.
Now what?
Title: wxSmith development
Post by: byo on May 26, 2005, 10:42:37 pm
Hi, there's one thing currently missing inside plugin - there's currently no abitily to automatically expand C::B project to use wxSmith. But You can open wxSmith - it got one dialog where You can test wxSmith :) (Just click on in inside resource tree on the left side)
Title: wxSmith development
Post by: DreadNot on May 26, 2005, 11:11:47 pm
I just made a semi-decently-looking-but-not-yet-way-cool screenshot:

(http://www.utdallas.edu/~atescomp/Images/wxSmith001.jpg)

How about that!  Now, give me an easy action item so I can get up to speed helping code this thing.
Title: wxSmith development
Post by: rickg22 on May 27, 2005, 12:41:00 am
OK how about fixing the scrollbar in the properties? We need an horizontal scrollbar there. And if you can fix the length of those input boxes, even better. Being sticked to the right doesn't look fine.

Second, you might try replacing the buttons on the widgets pane for actual iconized buttons :)
Title: wxSmith development
Post by: byo on May 27, 2005, 02:38:32 am
Quote from: rickg22
OK how about fixing the scrollbar in the properties? We need an horizontal scrollbar there. And if you can fix the length of those input boxes, even better.


Tried to fix that and I think I've made it. There were two problems with that: long names of styles - I have just cut them and put '...' at the end, but I think that it should be changed. Any Ideas ? :). Second problem was that properties panel has been stretching edit boxes changing their minimum size. Now it's fixed, should work fine.
If anybody has any idea how to improove properties panel I would be grateful :) (Maybe wxPropertiesPanel should be some solution but it currently works under wx 2.6 - not officially supporteed in C::B)

Quote from: rickg22
Second, you might try replacing the buttons on the widgets pane for actual iconized buttons :)


Someone could help here. I'm poor graphic designe so I'm waiting for Your arts (or maybe if You wanna some B&W child-style buttons I will do this  :wink: ). In fact each widget / sizer / dialog etc. should have two icons - first (big one about 32x32) for buttons inside widgets palette, second one - (small 16x16) inside resource tree. I've thought about these images before and wxSmith has currently structures which could hold a bit of art :).

I've also started working on easier widget definition system. Look at defwidgets/wxscheckbox.cpp and .h - I think that it should be something like this (It hasn't been finished so curently there's no ability to add wxChecckBox but I'll fix that soon)
Title: wxSmith development
Post by: rickg22 on May 27, 2005, 04:27:58 am
Quote from: byo


If anybody has any idea how to improove properties panel I would be grateful :) (Maybe wxPropertiesPanel should be some solution but it currently works under wx 2.6 - not officially supporteed in C::B)


Maybe we could try converting wxPropertiesPanel to 2.4.2 :D (hope it's not hard *gulp*)


Quote from: byo

Quote from: rickg22
Second, you might try replacing the buttons on the widgets pane for actual iconized buttons :)


Someone could help here. I'm poor graphic designe so I'm waiting for Your arts


Why not just grab upCase's? :wink:
Title: wxSmith development
Post by: cyberkoa on May 27, 2005, 04:33:33 am
Quote from: rickg22
cyberkoa: Remember that in TortoiseCVS you can "update special", and pick a specific TAG (C::B version) to use. It's better if you work on the 1.0beta-final, so at least we can be sure that it's not C::B source code that's causing the problems. (OH - and delete all the plugin dlls from both the devel and output subdirectories).

I already manage to compile in the my company's PC and run CB properly after getting the hints from madrav that need to run update.bat after finish compiling .

I am now trying at my Laptop .. hopefully everything is ok.
Title: wxSmith development
Post by: rickg22 on May 27, 2005, 04:42:18 am
Perhaps we should make a wiki article about compiling codeblocks for windows :)
Title: wxSmith development
Post by: tiwag on May 27, 2005, 07:47:00 am
i just compiled wxsmith using wxWidgets 2.6.0 dll's
and tried to run it with my build of C::B, which uses wxWidgets 2.4.2 dll's,
and C::B crashes during start, when i remove the wxsmith addin, C::B starts normal.

Can someone confirm this behaviour plz ?
i'm not shure, if it's necessary to build C::B using wx260 in order to run wxsmith ?

thanks,
tiwag
Title: wxSmith development
Post by: byo on May 27, 2005, 10:54:40 am
You must compile both C::B and wxSmith with same version of wxWidgets. Currently I'm using wx 2.4 and I don't know if it will work properly uunder wx 2.6
Title: wxSmith development
Post by: byo on May 27, 2005, 11:23:24 am
Got one question - If i've added new Event Handler through wxWindow::PushEventHandler function it is not deletet automatically when widget is. Tried to do it through EVT_CLOSE but this is not generated for widgets. Any idea how to do it automatically ? Maybe creating one global event handler for all widgets but in such case there woul be need to create mapping wxWindow -> wxsWidget ans I think it's not a good Idea. Additional handler can also be removed while deleting preview but it may cause some realy bad errors
Title: wxSmith development
Post by: mandrav on May 27, 2005, 12:18:11 pm
You may want to look at wxWindow::RemoveEventHandler() and use it in the widget's dtor...

Yiannis.
Title: wxSmith development
Post by: tiwag on May 27, 2005, 12:31:43 pm
Quote from: byo
You must compile both C::B and wxSmith with same version of wxWidgets. Currently I'm using wx 2.4 and I don't know if it will work properly uunder wx 2.6


Thanks for the info,
OK i'll try it with the newest cvs version to compile with wx242,
the one version i got from cvs a few days ago wasn't able to compile with wx242,
a few methods only available in wx260 had been used, if i remember correctly.

--tiwag

[edit]
to make a long story short:
fresh download from cvs,
built wxsmith with wx242,
updated codeblocks build,
it runs without issues,
now i have to find out how it works ... ;-)
Title: wxSmith development
Post by: mandrav on May 27, 2005, 02:51:47 pm
byo, just a note until I write a proper "developer's guide"  :oops:

When you 're using event handlers for C::B generated events (like EVT_PROJECT_OPEN, etc) always call event.Skip() on the event object. It seems that you don't do this now and when I load the wxSmith plugin, most event handlers in the event handling chain don't see those events.

Yiannis.
Title: wxSmith development
Post by: byo on May 27, 2005, 02:54:45 pm
Quote from: mandrav

When you 're using event handlers for C::B generated events (like EVT_PROJECT_OPEN, etc) always call event.Skip() on the event object.


 :oops: Didn't noticed that. Will fix soon (just need to fix incompatibilities with new eeditor system :) )
Title: wxSmith development
Post by: mandrav on May 27, 2005, 03:10:42 pm
No problem. It's my fault anyway:
Quote
just a note until I write a proper "developer's guide"


Quote
just need to fix incompatibilities with new eeditor system

Did you see it? Any comments?

Yiannis.
Title: wxSmith development
Post by: byo on May 27, 2005, 03:48:15 pm
Have currently some problems :( , will post everything on http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&t=375

:)
Title: wxSmith development
Post by: mandrav on May 27, 2005, 03:56:32 pm
You do that and will get them fixed ;)

Yiannis.
Title: wxSmith development
Post by: cyberkoa on May 27, 2005, 11:10:22 pm
Quote from: DreadNot
OK!  So now that I've got everything compiling (for now & until a new CVS), how do I make a really cool 8) screenshot of the C::B running the wxSmith plugin?  When I ran it, all I got was blank screens.
1. I created a wxWidgets project, but nothing shows (blank) in the Project tree (disturbing).
2. Nothing in Symbols and Watches.
3. I see the Resource tab with Property and Events tabs.  The top has "Resources->wxWidgets application".  Properties and Events are blank.
4. I see the Widgets tab at the bottom of the screen and it displays the basics.
Now what?


I also have the CB compiled and wxSmith compiled.

CB using   : 1.0 beta-final
CB source : from CVS (still in MDI interface , verson on 26May2005)
wxwidgets version : 2.4.2

When I run the compiled version CB , I have the same sympthon as Deadnot

As byo mentioned , there is still no function to create a new wxSmith project.

So , I open WxSmith.cbp , and I and get the same screenshot as Deadnot.

I have 1 question , under the Watch Tab , there is not symbols.
However, if I use the CB 1.0beta-final (the one I use to compile CB) , I open wxSmith.cbp . there are symbols under Watch .

Any idea ? Anyway , I just curious only.  I put more attention to the wxSmith source code study .
Title: wxSmith development
Post by: byo on May 27, 2005, 11:19:21 pm
Quote from: cyberkoa

I have 1 question , under the Watch Tab , there is not symbols.
However, if I use the CB 1.0beta-final (the one I use to compile CB) , I open wxSmith.cbp . there are symbols under Watch .

Any idea ? Anyway , I just curious only.  I put more attention to the wxSmith source code study .


Hmm, I don't have any watches. Can You post here their names ? Maybe I've addeed something to wrong tree ;)
Title: wxSmith development
Post by: byo on May 27, 2005, 11:19:59 pm
By the way - I've updated to wxNotebook interface - it should be available in anonymous cvs in few hours
Title: wxSmith development
Post by: byo on May 28, 2005, 12:03:34 am
I will get back to one of previous posts about iconized buttons in palette window
Quote from: rickg22
Why not just grab upCase's? :wink:

I don't se anywhere source for wxRapid, don't want to fetch from exe using some brute attempt ;).
But maybe anybody would like to help and create some nice-looking ones :D I would be grateful :D

I remember how actual C::B logo was created and I believe that there are some people here who could handle this work :D
Title: wxSmith development
Post by: cyberkoa on May 28, 2005, 12:42:18 am
Quote from: byo
Quote from: cyberkoa

I have 1 question , under the Watch Tab , there is not symbols.
However, if I use the CB 1.0beta-final (the one I use to compile CB) , I open wxSmith.cbp . there are symbols under Watch .

Any idea ? Anyway , I just curious only.  I put more attention to the wxSmith source code study .


Hmm, I don't have any watches. Can You post here their names ? Maybe I've addeed something to wrong tree ;)


sorry, I make mistake  :oops:  not the watches , but the symbols . Meaning , there is no symbols appear under tab "Symbol" (if I run in the developing version of CB)

no problem in CB final-beta-1.0

Quote from: byo
By the way - I've updated to wxNotebook interface - it should be available in anonymous cvs in few hours


I shall update later .
Title: wxSmith development
Post by: cyberkoa on May 28, 2005, 07:38:30 am
Hi ,byo.

I have tried to add more information in the resources tree for each node , I have added in

widget.cpp

void wxsWidget::BuildTree(wxTreeCtrl* Tree,wxTreeItemId Id,int Index)
{
      wxString Name = GetInfo().Name;

    Name = Name.Append(" - ");
    Name = Name.Append(GetBaseParams().VarNotStored?
GetBaseParams().VarName:GetBaseParams().IdName);

 ....
}
 
My intention is to add more detail for each resources rather than only showing the class name like "wxButton" etc .

My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.
In the source you mention "True if widget's variable won't be stored inside main window" , can you explain more on this, I thought it indicates whether the widget have variable name key in ? Sorry if this is a silly question because I just get to know wxwidgets 2 months ago...
Title: wxSmith development
Post by: byo on May 28, 2005, 08:17:28 am
Quote from: cyberkoa
void wxsWidget::BuildTree(wxTreeCtrl* Tree,wxTreeItemId Id,int Index)
{
      wxString Name = GetInfo().Name;

    Name = Name.Append(" - ");
    Name = Name.Append(GetBaseParams().VarNotStored?
GetBaseParams().VarName:GetBaseParams().IdName);

 ....
}



thx for advice - will updae soon :)

Quote from: cyberkoa

My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.


I would like wxSmith to create dialogs and other resources in two ways - first one is to create XRC file and then to automatically manage code loading / event handling etc. Second way is to manage code wchich would create dialog without loading xrc. In this way each widget must have it's variable (just pointer to it's class) - it could be stored as a member of dialog's class (VarNotStored=false) or could be created locally inside funnction building dialog (VarNotStored=true) - using first one means that You want to use widget somewhere in class - read it's content or change it so it's good for edit fields check boxes etc. Second one means that You don't want this widget to be stored inside edialog's class - good for static widgets which won't change (and won't mess dialog's declaration).
Hmm, I hope I've explained that  :oops: :)
Title: wxSmith development
Post by: mandrav on May 28, 2005, 09:29:41 am
Quote
Meaning , there is no symbols appear under tab "Symbol" (if I run in the developing version of CB)

This must have to do with some events processed by wxSmith plugin, not being skipped (event.Skip()) so that they can be processed by other plugins too.
I mentioned it before and byo said he would look into it.

Yiannis.
Title: wxSmith development
Post by: mandrav on May 28, 2005, 09:31:17 am
Hey byo,

Your thread already reached the third page. Maybe I should create a different forum for wxSmith? It seems like it's gonna be busy  :mrgreen:

Yiannis.
Title: wxSmith development
Post by: byo on May 28, 2005, 09:52:56 am
Quote from: mandrav
Your thread already reached the third page. Maybe I should create a different forum for wxSmith? It seems like it's gonna be busy  :mrgreen:


Hmm, I'm just wondering why RAD tool is such popular. New forum ? Maybe after reaching 4th or 5th page ;) will se how long it would take to reach that - if would be reached fast, this would mean that new forum is a must ;)

Quote
This must have to do with some events processed by wxSmith plugin, not being skipped (event.Skip()) so that they can be processed by other plugins too.
I mentioned it before and byo said he would look into it.


Yep, already fixed, in CVS but... i frorgot to add some files to repository  :oops: so You may not be able to compile :( Just wait a minute and it will be there
Title: wxSmith development
Post by: rickg22 on May 28, 2005, 04:18:35 pm
This ought to be in the readme. Whenever you create a new file, add it to CVS immediately ;-)
Title: wxSmith development
Post by: cyberkoa on May 28, 2005, 05:07:00 pm
Quote from: cyberkoa

My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.


I would like wxSmith to create dialogs and other resources in two ways - first one is to create XRC file and then to automatically manage code loading / event handling etc. Second way is to manage code wchich would create dialog without loading xrc. In this way each widget must have it's variable (just pointer to it's class) - it could be stored as a member of dialog's class (VarNotStored=false) or could be created locally inside funnction building dialog (VarNotStored=true) - using first one means that You want to use widget somewhere in class - read it's content or change it so it's good for edit fields check boxes etc. Second one means that You don't want this widget to be stored inside edialog's class - good for static widgets which won't change (and won't mess dialog's declaration).
Hmm, I hope I've explained that  :oops: :)[/quote]

Thx,understood.  The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.

Still studying the source code.. shall ask question when see something not understand ..  thx
Title: wxSmith development
Post by: cyberkoa on May 28, 2005, 05:07:44 pm
Quote
Quote from: cyberkoa
Quote from: cyberkoa

My question is ,what is the purpose of having the flag VarNotStored in the struct wxsWidgetBaseParams.


I would like wxSmith to create dialogs and other resources in two ways - first one is to create XRC file and then to automatically manage code loading / event handling etc. Second way is to manage code wchich would create dialog without loading xrc. In this way each widget must have it's variable (just pointer to it's class) - it could be stored as a member of dialog's class (VarNotStored=false) or could be created locally inside funnction building dialog (VarNotStored=true) - using first one means that You want to use widget somewhere in class - read it's content or change it so it's good for edit fields check boxes etc. Second one means that You don't want this widget to be stored inside edialog's class - good for static widgets which won't change (and won't mess dialog's declaration).
Hmm, I hope I've explained that  :oops: :)


Thx,understood.  The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.

Still studying the source code.. shall ask question when see something not understand ..  thx  :D
Title: Moved to separate forum
Post by: rickg22 on May 28, 2005, 05:10:32 pm
Okay guys, in case you didn't notice, I just created a new "RAD Plugins development" forum 8). You're free to expand your wxSmith questions in other threads. Just insert "Wxsmith: " before the specific question.
Title: wxSmith development
Post by: byo on May 28, 2005, 06:20:01 pm
Quote from: cyberkoa
Thx,understood.  The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.


Hmm, not exackly. The flag indicating whether dialgo uses XRC or should be inside dialog resource, not one widget.

Maybe will describe with a bit of code (example what would be generated from wxSmith;) ):

1). One widget with VarNotStored = false
Code: [Select]
class MyDialog: public wxDialog
{
  public:
    MyDialog(...)
    {
      Widget = new wxStaticText(this,-1,"Hello world");
    }
  protected:
    wxStaticText* Widget;
}


2). One widget with VarNotStoredd = true
Code: [Select]
class MyDialog: public wxDialog
{
  public:
    MyDialog(...)
    {
      wxStaticText* Widget;
      Widget = new wxStaticText(this,-1,"Hello world");
    }
}


So if VarNotStored == true, it means that Variable for this widget will be created locally inside function creating dialog, VarNotStored == false means that it will be a member of class and will be acessible from other members in this class.

Hope I've explained this now :)
Title: Re: Moved to separate forum
Post by: byo on May 28, 2005, 06:20:47 pm
Quote from: rickg22
Okay guys, in case you didn't notice, I just created a new "RAD Plugins development" forum 8). You're free to expand your wxSmith questions in other threads. Just insert "Wxsmith: " before the specific question.

Thx for new forum :) It should be easier to work now :D
Title: wxSmith development
Post by: rickg22 on May 28, 2005, 06:21:43 pm
Uh... shouldn't you change the name to IsMember or something?
Title: wxSmith development
Post by: byo on May 28, 2005, 06:23:10 pm
Quote from: rickg22
Uh... shouldn't you change the name to IsMember or something?

Thx for advice, should think more before coding ;)
Title: wxSmith development
Post by: cyberkoa on May 28, 2005, 07:13:10 pm
Quote from: byo
Quote from: cyberkoa
Thx,understood.  The flag indicate whether the widget is static widget (keep in xrc) or dynamics created using C++ code . Hmm ,this is important in code generation.


Hmm, not exackly. The flag indicating whether dialgo uses XRC or should be inside dialog resource, not one widget.

Maybe will describe with a bit of code (example what would be generated from wxSmith;) ):

1). One widget with VarNotStored = false
Code: [Select]
class MyDialog: public wxDialog
{
  public:
    MyDialog(...)
    {
      Widget = new wxStaticText(this,-1,"Hello world");
    }
  protected:
    wxStaticText* Widget;
}


2). One widget with VarNotStoredd = true
Code: [Select]
class MyDialog: public wxDialog
{
  public:
    MyDialog(...)
    {
      wxStaticText* Widget;
      Widget = new wxStaticText(this,-1,"Hello world");
    }
}


So if VarNotStored == true, it means that Variable for this widget will be created locally inside function creating dialog, VarNotStored == false means that it will be a member of class and will be acessible from other members in this class.

Hope I've explained this now :)


Ok, totally understand. I think the best language to communicate among programmers is computer language  :lol:   :lol:

Quote from: rickg22
Uh... shouldn't you change the name to IsMember or something?


A good recommentation, I think.
Title: wxSmith development
Post by: Anonymous on May 31, 2005, 07:34:40 pm
Quote
So if VarNotStored == true, it means that Variable for this widget will be created locally inside function creating dialog, VarNotStored == false means that it will be a member of class and will be acessible from other members in this class.

Isn't the local variable still available to other member functions due to the "this" linkup (just not as a member)?  Otherwise, the var would be an invalid memory location--as it is released at the end of the function automatically (scope, delete is implied)--and the active dialog would continue pointing to these released memory locations (it doesn't since the pointer's reference counter > 0).  Isn't there a mechanism to step throught the widgets of a window?  Or is "VarNotStored" simply a way to separate direct access to widgets from indirect access, so that the programmer can concentrate on the direct items?
I agree the "isMember" might be a better var name.
Title: wxSmith development
Post by: DreadNot on May 31, 2005, 07:36:51 pm
Above was mine.
Title: wxSmith development
Post by: byo on May 31, 2005, 10:09:22 pm
Quote from: Anonymous
Isn't the local variable still available to other member functions due to the "this" linkup (just not as a member)?  Otherwise, the var would be an invalid memory location--as it is released at the end of the function automatically (scope, delete is implied)--and the active dialog would continue pointing to these released memory locations (it doesn't since the pointer's reference counter > 0).  Isn't there a mechanism to step throught the widgets of a window?  Or is "VarNotStored" simply a way to separate direct access to widgets from indirect access, so that the programmer can concentrate on the direct items?
I agree the "isMember" might be a better var name.


Hmm these variables will be actually pointers to real widgets. And these widgets could be later found through FindWindow() or something like this.
Title: wxSmith development
Post by: byo on May 31, 2005, 10:13:19 pm
Hmm, and another thing.
I currently have hard times during my study (need to pass all these exams etc. etc. ) so wxSmith won't be updated regularly :(
Hope You  won't be angry  :oops:
Title: wxSmith development
Post by: rickg22 on June 01, 2005, 01:13:29 am
hehe lol :P Don't worry byo! School must always go first. Open source is a HOBBY (Blasphemy! :shock: lol :lol: )
Title: wxSmith development
Post by: upCASE on June 01, 2005, 08:24:17 am
Hi!
Quote from: byo
Hmm, and another thing.
I currently have hard times during my study (need to pass all these exams etc. etc. ) so wxSmith won't be updated regularly :(
Hope You  won't be angry  :oops:

Don't worry: It doesn't get any better -> Next there comes a job  :D
Anyway: Good luck for your exams!

BTW: About the icons I used in wxRapid, I have to confess I snatched them from wxGlade  :oops:
Title: wxSmith development
Post by: rickg22 on June 01, 2005, 06:44:03 pm
upCASE: Any copyrighting problem with those? Should we add a license regarding the icons or something?
Title: wxSmith development
Post by: David Perfors on June 01, 2005, 07:23:17 pm
I don;t think there is a copyright problem, because wxGlade is open source to. just mention the name some where in a file and you ar finished (I didn't look in the license of them yet.)
Title: wxSmith development
Post by: DreadNot on June 01, 2005, 10:16:08 pm
I'm git'n school'ed here too!
But, I believe this project is sooo very important as open source due to the lack of alternatives in other IDEs.
I'll be studying this project and hopefully be contributing over time.

Thanks for answering the question.  I made a mistake on the implied delete operator.  The delete is not implied at the end of the function--I was thinking "auto_ptr", which is not necessary. From the wxWidgets site, I understand how the memory is released for the widgets through the parent-child relationship and the close event handler.

Please excuse my ignorance if this is obvious to others as I'm new to wxWidget and unfamiliar with the specifics on memory allocation / deallocation on these object.
Title: wxSmith development
Post by: cyberkoa on June 02, 2005, 01:04:19 am
the student nowadays is very expert in C++ ! 8)

I am studing the wxSmith source code. byo , if you do not mind , I shall try to write some code on the defwidget for combobox , meaning add in additional widget option and submit those code to you for checking. If you feel that it is helpful , you may modify and commit to CVS . However, I have to mention earlier , I have just start using C++ a few months ago after 6 years never touching it until I  found the wxwidgets.
Title: wxSmith development
Post by: DreadNot on June 02, 2005, 09:33:48 am
I've review the latest wxSmith.  There was some question about the display for properties a while back.  Other than not emulating VC++, why not model the display on VC++ and use a row and column style display (wxGrid with wxGridCell... types) where row labels are the property name and the column displays the value(s) with an elipse button [don't know how to do] on items that expand to dialogs when more info is required or multiple selection are required (like style parameters), combobox selections for mutually exclusive items, and true/false combobox selections to replace checkboxes.  This could:
1) allow the user to size the rowlabel and value columns removing concern about long labels and
2) let us setup the parameter display using a single standard resource for all widget types (a constant boolean array for each widget type would specify the parameters to display and record, another array could represent default values for each parameter).
Title: wxSmith development
Post by: byo on June 02, 2005, 11:56:17 pm
Quote from: cyberkoa
the student nowadays is very expert in C++ ! 8)

I am studing the wxSmith source code. byo , if you do not mind , I shall try to write some code on the defwidget for combobox , meaning add in additional widget option and submit those code to you for checking. If you feel that it is helpful , you may modify and commit to CVS . However, I have to mention earlier , I have just start using C++ a few months ago after 6 years never touching it because I  found the wxwidgets.


Hmm, Waiting for Your job :). But must say that some parts of code are not finished yet (f.ex. events sytem) and update of this code will be needed soon :).

Thx for Your interesting. Hmm, One of my idedas was to create RAD tyool which could be easily extended with new sets of widgets :).
Title: wxSmith development
Post by: byo on June 03, 2005, 12:00:29 am
Quote from: DreadNot
I've review the latest wxSmith.  There was some question about the display for properties a while back.  Other than not emulating VC++, why not model the display on VC++ and use a row and column style display (wxGrid with wxGridCell... types) where row labels are the property name and the column displays the value(s) with an elipse button [don't know how to do] on items that expand to dialogs when more info is required or multiple selection are required (like style parameters), combobox selections for mutually exclusive items, and true/false combobox selections to replace checkboxes.  This could:
1) allow the user to size the rowlabel and value columns removing concern about long labels and
2) let us setup the parameter display using a single standard resource for all widget types (a constant boolean array for each widget type would specify the parameters to display and record, another array could represent default values for each parameter).


http://www.geocities.com/jmsalli/propertygrid/ - it has already been done i think :). But need to wait for compatibility with wx 2.6. Hmm, maybe it has already been done, haven't read forum for some time  :oops:
Title: wxSmith development
Post by: rickg22 on June 03, 2005, 12:44:09 am
Dunno, we need some brave warrior who dares compile C::B CVS with wx2.6. Thou shalt slay the red bug dragon! :P
Title: wxSmith development
Post by: tiwag on June 03, 2005, 04:43:28 am
Quote from: rickg22
Dunno, we need some brave warrior who dares compile C::B CVS with wx2.6. Thou shalt slay the red bug dragon! :P


hi rick,
do you want a compiled version of C::B using wx2.6 ?

i can upload it somewhere for you if you want.

but you also can easily build it yourself, following the readme-wx2.6.0,
i've done it and found no serious problems.
i'm using several installed versions of wx in parallel, and should finally update the wiki-section regarding this, as you requested from me.
sorry, but i didn't find time till now, but i promise it for the week-end.

-tiwag

[addendum]

i've just read:
Code: [Select]
wxWidgets v2.6.1 has been released
GUI drawing problems.[/list:u]http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?p=10367#10367
Title: wxSmith development
Post by: rickg22 on June 03, 2005, 06:31:42 am
YAY! :D 'Bout time! Well the problem is that my mingw directory tree has the wx2.4 files... i have to see how to adapt it to compile with wx2.6.1. Maybe this weekend i'll have time to test (ugh, more hours of meddling with the settings and compiling).
Title: wxSmith development
Post by: tiwag on June 03, 2005, 08:24:56 am
Quote from: rickg22
..Well the problem is that my mingw directory tree has the wx2.4 files...


i know that troubles, had the same in the past   :( .
That was the reason, why i figured out how to avoid this.  :D
i will prepare the description how you can easy have multiple wxwidgets-versions and/or several different setups in parallel  8)

if you want to have a quick solution, here
Build CodeBlocks wxmsw261 (http://tiwag.front.ru/codeblocks/cb_wxmsw261_build.zip)
you can download the wxwidgets-build-batchfile
and an updated codeblocks project file for wxmsw 2.6.1.
for this config i've used : set WXDIR=D:\wx261

steps:

Quote from: [edit]
for the unlikely case, that the above is too much for you,
you can download my binary version too
Quote
sorry, removed from web

enjoy
-tiwag
Title: wxSmith development
Post by: cyberkoa on June 06, 2005, 10:45:41 pm
Quote from: byo

Hmm, Waiting for Your job :). But must say that some parts of code are not finished yet (f.ex. events sytem) and update of this code will be needed soon :).

Thx for Your interesting. Hmm, One of my idedas was to create RAD tyool which could be easily extended with new sets of widgets :).


It is my pleasure, in fact I learned a lot from reading your code  :D .  I have to admit that I am not able to write it from scratch but I try my best to add in some codes with my weak C++.  

Quote from: byo

http://www.geocities.com/jmsalli/propertygrid/ - it has already been done i think :). But need to wait for compatibility with wx 2.6. Hmm, maybe it has already been done, haven't read forum for some time  :oops:

 Unfortunately, I tried to compile in wx-2.4.2 but failed. I did go in further to check the problem.


I already almost understand how to add in new code to support new widget , I shall start with
1. XML load
2. XML save


Still planning on writing the code for keeping the selection list for combobox.  Hope that I can at least load a combo box   :oops:
Title: wxSmith development
Post by: DreadNot on June 07, 2005, 03:54:25 am
I have also compiled with wx2.6 (actually, the only compile).  I have a separate project dir for wx outside mingw so that I can switch (if needed, as necessary).  The compile is much like tiwag describes. Updating to 2.6.1 now...
Title: wxSmith development
Post by: DreadNot on June 09, 2005, 07:59:05 am
OK.  All compiled and no place to go.  The wx2.6.1 compiled fine.  C::B set to use wx2.6.1 compiled fine.  wxSmith compiled fine.  However, I still see the same problem in the Workspace area--no workspace/project tree is displayed.

EDIT: See other recent post about the compile.
Title: wxSmith development
Post by: cyberkoa on June 12, 2005, 08:22:48 pm
Hi, just want to update my status on trying to add combobox in the wxSmith.

I have start to write the code for wxComboBox , the XML loading code. I refer to other widgets's code to add in appropriate code in defwidgets.cpp/h, creating combobox.cpp/h . The most difficult part  is on the combobox selection .
  I have refer the help file bundled with wxWidgets 2.6.1 and found that wxComboxBox have 2 constructors , the main different is one of it use wxString choices[] and other use wxArrayString as selection.

  I have decided to use the wxArrayString approach since it looks easier. After coding an special function to load selection to wxArrayString, and get ready to have a final compilation, the code could not compiled !!  Finally , I found out , in wxwidgets-2.4.2 , only have 1 constructor for wxcombo , I am refering to the latest documentation (2.6.1) to code , hahaha .. .
  Therefore , now is in the status to recode all in wxString choices []
 :cry:

  One thing need to mention is , it seems like there is no engine (code) to allow the wxwidgets's properties to be edited by poping up another dialog , I believe in wxcombo's selection we need that. And in fact ,  a lot of cases we need that such as color selection.
  Maybe , it comes to a stage to upgrade the properties engine.
Title: wxSmith development
Post by: cyberkoa on June 15, 2005, 06:09:56 pm
Another update .

I have managed to load a wxCombox and show on the design screen.
However, the combo box shows no item.  I have debugged in my code and confirm that I manage to load the items from the XML file.
  In BuidExtVars member function , I have created a new function to load a series of strings into a ArrayString.  I believe something have missed out.

 byo , how is extra variables that defined in the BuildExtVars() be assigned to the widget creation function ? May you explain in short because I have read the source code but not so understand.
Title: wxSmith development
Post by: cyberkoa on June 20, 2005, 03:28:38 am
Here is the screenshot for wxComboBox added.

(http://i19.photobucket.com/albums/b190/cyberkoa/wxsmith.jpg)

Code that I have written

1. Loading from XRC file
2. Saving to XRC file


Function that still not done

1. Edit the list in the combo box , need the decision from byo on the revamp on the properties manager.


However, I found that there are a few strange thing
1. widget editor does not reponse to mouse click event
2. When I do a preview, the combobox does not contain anything but in the widget editor , I can see the list using the keyboard up/down cursor.

I shall look into the event handling for the widget editor soon.
Title: wxSmith development
Post by: cyberkoa on June 21, 2005, 01:34:29 am
I have settle the problem that I mentioned previously
- widget editor does not reponse to mouse click event
-  When I do a preview, the combobox does not contain anything but in the widget editor , I can see the list using the keyboard up/down cursor.

However, there is still a minor problem on the mouse click event on combobox
- when I click on textbox contained in the combo box , the widget selection event seem like not taken place but if I press on the pull down button , the widget selection is taken place.
Title: wxSmith development
Post by: code1101 on June 21, 2005, 08:42:12 am
it seems that byo is too busy ... keep up the good work cyberkoa.
Title: wxSmith development
Post by: mandrav on June 21, 2005, 11:20:01 am
Good work cyberkoa :)
If you want, and byo agrees, I could add you as a developer for wxSmith.
So, byo, what do you think?

Yiannis.
Title: wxSmith development
Post by: cyberkoa on June 22, 2005, 07:22:23 am
Quote from: code1101
it seems that byo is too busy ... keep up the good work cyberkoa.

Thanks  :D   just trying my best, still catching up with C++ that I hv stop using for 6 years.


Quote from: mandrav
Good work cyberkoa :)
If you want, and byo agrees, I could add you as a developer for wxSmith.
So, byo, what do you think?

Yiannis.


Thanks for the offer  :D   I am willing to take a try if byo agrees. By the way, I shall send my code to byo to have a look first .

Still a beginner in developing project on CVS   :oops:
Title: wxSmith development
Post by: byo on June 22, 2005, 12:29:07 pm
Quote from: cyberkoa
Quote from: code1101
it seems that byo is too busy ... keep up the good work cyberkoa.

Thanks  :D   just trying my best, still catching up with C++ that I hv stop using for 6 years.


Quote from: mandrav
Good work cyberkoa :)
If you want, and byo agrees, I could add you as a developer for wxSmith.
So, byo, what do you think?

Yiannis.


Thanks for the offer  :D   I am willing to take a try if byo agrees. By the way, I shall send my code to byo to have a look first .

Still a beginner in developing project on CVS   :oops:


Hello, everyone. It's been a while since I've been here because of these sleepless books-full nights and terrible exams-like days. Just give me few more days and I'll be back :D.

Cyberoka: BIG THX for Youre work. Cna You send me the source ? And maybe some description of problems You have with this widget.
and don't worry - I'm CVS-beginner too (started using it after gaining access to CodeBlocks' CVS). Buty If You don't mind I would like to work now like mandrav and rigkg22 at the beginning of their cooperation - You could send me the sourcee and I put this into CVS :). Hope it will change soon - I just need to get back to this project and prepare for new Coder :). And now ... argh, back to books :?
Title: wxSmith development
Post by: rickg22 on June 22, 2005, 05:44:34 pm
I'd say we give cyberkoa cvs access. Just download TortoiseCVS, it's as easy as my avatar look lol :P

Anyway, byo, cyberkoa, e-mail is also a good way to communicate when you get CVS access.
Title: wxSmith development
Post by: cyberkoa on June 22, 2005, 07:23:48 pm
Quote from: byo

Hello, everyone. It's been a while since I've been here because of these sleepless books-full nights and terrible exams-like days. Just give me few more days and I'll be back :D.

Cyberoka: BIG THX for Youre work. Cna You send me the source ? And maybe some description of problems You have with this widget.
and don't worry - I'm CVS-beginner too (started using it after gaining access to CodeBlocks' CVS). Buty If You don't mind I would like to work now like mandrav and rigkg22 at the beginning of their cooperation - You could send me the sourcee and I put this into CVS :). Hope it will change soon - I just need to get back to this project and prepare for new Coder :). And now ... argh, back to books :?

any kind of cooperation that will be fine for me , in fact I hv learned a lot from reading the wxSmith code, still have a lot to learn :)

Let me do some final cleaning of the source code before post it up .
One thing need to mention , my Code::Blocks CVS is not the latest update because the latest update revamp the interface which affect some plugin coding.  My Code::Blocks CVS version should be somewhere on early of June.

I shall post it after going back home , and write some description on the problem that I encounter.
Title: wxSmith development
Post by: cyberkoa on June 23, 2005, 06:49:45 am
Here are the files
http://us.f1f.yahoofs.com/bc/96491ee4_m418d23c5/bc/wxSmith-Combobox.zip?bfA3juCBjIkFen5d

Basically, it includes 2 new files , wxscombobox.h and wxscombobox.cpp , and others modified files.

One thing I have left out is the releasing memory usage of the wxArrayString that used in the wxscombobox , which I think should put in the destructor of each widgets class.
I do not change the original macro in defwidgets.h that have the blank destructor because I think this changes involve the change of the engine should decided by byo.

Feel free to modify it if you feel those code is not correct or uncomplete.

I only coded the XML load and XML save , other function like AddProperty is not coded yet.
Thanks.
Title: wxSmith development
Post by: rickg22 on June 23, 2005, 05:41:51 pm
Quote from: byo
Cyberoka: BIG THX for Youre work. Cna You send me the source ?


Quote from: Cyberoka
Here are the files (link)


 :roll: Someone needs to be given access to CVS... :lol:
Title: wxSmith development
Post by: cyberkoa on July 05, 2005, 06:04:09 pm
Finally , I manage to come in this forum   :o

Ok , I have finished the code for wxListBox , and I have made icons for wxCombobox and wxListBox , which is the new feature introduced by byo in the latest CVS.

 Let me summarize my changes and enhancement
 1.  Add in wxListBox
 2.  Modified a macro in wxdefwidget.h , to add in destructors evDestroy() function. This is to release the memory used by wxArrayString.
 3.  I have made icons for wxCombox and wxListBox , I have no sense of art dunno looks ok or not  :oops:

 My discovery and suggestion
 1.  The default selection for wxComboBox and wxListBox , since they are defined as Int property , there is not upper bound checking.  Could it be better if we can design in such a way that we can choose to show the property in different form such as a combo box to limit the default selection to number of choices.


Finally, how can I commit the changes to CVS using Tortoise CVS?   :oops:

I am not familiar with CVS , I just want to update to the wxSmith branch .
Title: wxSmith development
Post by: mandrav on July 05, 2005, 06:17:14 pm
Quote
Finally, how can I commit the changes to CVS using Tortoise CVS?

First, add in CVS any new files you 've created (if any). To do this, select the new files, right-click and select "Add" from the tortoise menu.
Then, just right-click in the wxSmith top-folder (in a white space) and select "Commit". Fill the message log describing your changes and press OK :)

Yiannis.
Title: wxSmith development
Post by: cyberkoa on July 06, 2005, 06:41:57 am
I have a problem to commit the changes because Tortoise CVS is using anonymous to log on every time I tried to commit .  

  I have tried a few way including recheck out the CVS using my sourceforge ID ..
 or do I need to recheck out a fresh copy first ? :(
Title: wxSmith development
Post by: rickg22 on July 06, 2005, 06:55:10 am
cyberkoa: Yes, you need to Checkout a fresh copy with your sourceforge account.
Title: wxSmith development
Post by: cyberkoa on July 07, 2005, 08:29:19 am
I still having problem to commit to CVS ,
And I am rushing back to my home country Malaysia tomorrow morning , therefore, I have send my source to byo and hope that he can help to commit the changes.

 Since I will be at my home country the next two weeks, I can't help much in wxSmith at these moment.  

 See you all then .. :)
Title: wxSmith development
Post by: byo on July 08, 2005, 12:15:50 am
Quote from: cyberkoa
I still having problem to commit to CVS ,
And I am rushing back to my home country Malaysia tomorrow morning , therefore, I have send my source to byo and hope that he can help to commit the changes.

 Since I will be at my home country the next two weeks, I can't help much in wxSmith at these moment.  

 See you all then .. :)


Got new sources, will put it into CVS as soon as possible  :)

BTW: First attempt to generate code on-the-fly was made :) There are still some bugs but it seems to be working :D
Title: wxSmith development
Post by: byo on July 12, 2005, 07:10:20 pm
As we can see, C::B has been branched. And because wxSmith hasn't got any release yet, I've decided to develop it under HEAD branch. It means switching to wxWidgets 2.6.1, and what follows, fighting many incompatibilities between different wxWidgts versions inside wxSmith. Hope that change to wx 2.6 is permament ;)
Title: wxSmith development
Post by: mandrav on July 12, 2005, 07:21:45 pm
Quote from: byo
Hope that change to wx 2.6 is permament ;)

That's the point of branching :)

The VERSION_1_0 branch will only accept bug-fixes. Feel free to experiment in the main trunk (HEAD).

Yiannis.
Title: wxSmith development
Post by: byo on July 15, 2005, 01:03:39 am
I have problem with one bug after migrating to docking panels.
New Notebook page added to Manager for wxSmith uses wxSplitterWindow, but  after startup andafter docking Manager, sash position is set to 0 or sth like that (top window and sash are hidden). I used additional wxPanel with one sizer as background window for page but it didn't work out. The only way to see both panels is to use SetSashGravity and manipulate with size of manager.

Any ideas ?
Title: wxSmith development
Post by: rickg22 on July 15, 2005, 01:49:11 am
Try memorizing the splitter position and restore it on docking (i just hope there's an event for that :P ). For startup, use a configmanager variable.
Title: wxSmith development
Post by: mandrav on July 15, 2005, 08:54:19 am
Quote from: byo
I have problem with one bug after migrating to docking panels.
New Notebook page added to Manager for wxSmith uses wxSplitterWindow, but  after startup andafter docking Manager, sash position is set to 0 or sth like that (top window and sash are hidden). I used additional wxPanel with one sizer as background window for page but it didn't work out. The only way to see both panels is to use SetSashGravity and manipulate with size of manager.

Any ideas ?

That was the exact erroneous behaviour I got when used wxDockit with the project manager which also uses a wxSplitterWindow.
The sash would move to position -22 hiding the open files list and the sash itself.
This turned out to be a bug of wxDockit, which I fixed and documented. When the layout was updated, wxDockit would first launch the wxEVT_LAYOUT_CHANGE and then actually perform the layout. I 've corrected it in the wxDockit sources in our CVS and everything started working fine.

I haven't checked wxSmith's code for a while, but are you using a wxSplitterWindow directly?
You might want to use a wxSplitPanel, created by Rick (in xtra_classes.h). See projectmanager.cpp for how it is used...

[edit]
Also, check out EditorManager::RefreshOpenFilesTree() which is called when the layout changes (it could be called by OnSize). This is what keeps the sash in sync after layout.
[/edit]

Yiannis.
Title: Re: wxSmith development
Post by: cyberkoa on July 28, 2005, 03:24:21 pm
I have extended my home leave for extra 2 weeks, still at Malaysia now.

byo , I think you already fix the bugs you mentioned right ? since I want to see the new version of CB , I hv downloaded the latest CVS and compile the latest version . I hv tried CVS dated 26/7/2005 still got problem but 27/7/2005 it seems like ok.

mandrav, I hv downloaded CB rc-1 and try , it works fine , but when I finished compile wxSmith , and try to run , it give me msg "Another CB process is running" , I hv tried to restart my PC , it give the same msg also.

so , I used back the final-beta version .
I am using winXP , wxwidgets-2.6.1



 
Title: Re: wxSmith development
Post by: mandrav on July 28, 2005, 03:53:05 pm
mandrav, I hv downloaded CB rc-1 and try , it works fine , but when I finished compile wxSmith , and try to run , it give me msg "Another CB process is running" , I hv tried to restart my PC , it give the same msg also.

so , I used back the final-beta version .
I am using winXP , wxwidgets-2.6.1
Uncheck "Settings->Environment->Allow only one running instance" ;)

Yiannis.
Title: Re: wxSmith development
Post by: rickg22 on July 28, 2005, 04:55:15 pm
mandrav, I hv downloaded CB rc-1 and try , it works fine , but when I finished compile wxSmith , and try to run , it give me msg "Another CB process is running" , I hv tried to restart my PC , it give the same msg also.

so , I used back the final-beta version .
I am using winXP , wxwidgets-2.6.1
Uncheck "Settings->Environment->Allow only one running instance" ;)

Yiannis.

Perhaps we should have that disabled by default... anyway. You could present a dialog box asking if you want to run anyway.
Title: Re: wxSmith development
Post by: zieQ on July 28, 2005, 06:19:10 pm
Yes, I was asking myself what was the problem since in the final beta had no multiple instance settings.
Title: Re: wxSmith development
Post by: mandrav on July 28, 2005, 09:10:08 pm
Yes, I was asking myself what was the problem since in the final beta had no multiple instance settings.
People used to find it annoying because the last instance's settings are actually saved. So you might edit options in an instance and another instance overwrite them...
So we added an option for it.

Yiannis.
Title: Re: wxSmith development
Post by: rickg22 on July 29, 2005, 06:44:16 am
Guys i have a question
How stable is wxsmith right now?

I want to edit some of the Codeblocks dialogs... can it be done currently? Or do I have to grab another resource editor?
Title: Re: wxSmith development
Post by: byo on July 30, 2005, 09:56:54 am
Guys i have a question
How stable is wxsmith right now?

I want to edit some of the Codeblocks dialogs... can it be done currently? Or do I have to grab another resource editor?

Unfortunately wxSmith isn't ready for bigger job yet. Currently it doesn't support many standard widgets (I hope that cyberkoa will help me with this :), he has already started working on it).
And stability... sometimes it crashes (when deleting widgets) but I have some problems with debugging - C::B has problems with paths (when running not in debug mode it runs properly but when running in debug it says there's no C::B executable) and I can't load symbol tables from wxSmith's dll, even after add-symbols... in gdb, backtrace doesn't show any function names (maybe anyone could help me with this)
Title: Re: wxSmith development
Post by: rickg22 on August 01, 2005, 03:54:49 am
OK here's how. I'm not speaking from experience, but rather from what Yiannis told me.

1) Add a breakpoint after loading the plugins in app.cpp.
2) Run.
3) After you reach the plugins, add the symbol tables for the plugins dlls.
Title: Re: wxSmith development
Post by: mandrav on August 01, 2005, 10:32:54 am
What I do to debug C::B plugins is:

1) open app.cpp, position the cursor on HideSplashScreen() in CodeBlocksApp::InitFrame() (currently line 180)
2) press F4 (starts debugging and breaks on the above line).

When it breaks, the plugins have loaded so any breakpoints you set in plugins, will be valid.
Debug :)

Yiannis.
Title: Re: wxSmith development
Post by: cyberkoa on August 04, 2005, 04:42:02 am

Unfortunately wxSmith isn't ready for bigger job yet. Currently it doesn't support many standard widgets (I hope that cyberkoa will help me with this :), he has already started working on it).
And stability... sometimes it crashes (when deleting widgets) but I have some problems with debugging - C::B has problems with paths (when running not in debug mode it runs properly but when running in debug it says there's no C::B executable) and I can't load symbol tables from wxSmith's dll, even after add-symbols... in gdb, backtrace doesn't show any function names (maybe anyone could help me with this)
Ok, let me handle on the standard widgets , I will try my best ! 

The debugging technique provided by rick and mandrav is very useful ..
Now is still reading the source code of code generation by byo  ..
Next monday I will back to Mexico , will start on the development again ...  :D
Title: Re: wxSmith development
Post by: tiwag on August 04, 2005, 06:40:00 pm
I want to edit some of the Codeblocks dialogs...

in the last time i use more and more often wxFormBuilder
it's almost as good as DialogBlocks, but free and open source.
http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=2615
http://software-libre.org/download.php/232/wxFB-20050710-win32-installer.exe

The developer of wxFormBuilder himself posted a few times,
that he is using CodeBlocks and wxFormBuilder together and
reaches very good results with it.
Title: Re: wxSmith development
Post by: phlox81 on August 04, 2005, 07:48:09 pm
wow  :shock:

Nice, and quite impressive  8)
You saved me from installing Dev-Cpp, thanks man  :lol:
Title: Re: wxSmith development
Post by: byo on August 06, 2005, 04:18:43 pm
Heh, I see so many lovely apps  :lol:
And I just hope that anyone will use my plugin ;)
Title: Re: wxSmith development
Post by: rickg22 on August 07, 2005, 05:21:01 am
And I just hope that anyone will use my plugin ;)

Build it, and they will come :lol:
Title: Re: wxSmith development
Post by: byo on August 09, 2005, 11:04:04 pm
Hi, just a small list of features which were added recently:


All changes are in HEAD branch - I'll check if it will work also with VERSION_1_0 and if so, I'll update sources  :D.
Unfortunately wx 2.6 needed (required by wxPropertyGrid)
Title: Re: wxSmith development
Post by: cyberkoa on August 10, 2005, 12:44:54 am
Hi, just a small list of features which were added recently:

  • Drag Points - to move and size widgets with mouse :)
  • Changed to wxPropertyGrid for editing properties - there are still some things to code but most of conversion has been done (there's still possibility to use old properties system - just need to add __NO_PROPGRGID to defines - but I haven't tested if it still works ;))
  • Support for Dialogs, Frames and Panels
  • Code generation on-the-fly (but not all objects generate valid code - f.ex. gridsizer)

All changes are in HEAD branch - I'll check if it will work also with VERSION_1_0 and if so, I'll update sources  :D.
Unfortunately wx 2.6 needed (required by wxPropertyGrid)

o .. great , when will it be commited to CVS ? Looking forward to see the screen shot ...:)


Title: Re: wxSmith development
Post by: rickg22 on August 10, 2005, 04:21:43 am
I guess it'll be committed when the CVS server goes back online :P (scheduled downtime)
Title: Re: wxSmith development
Post by: byo on August 10, 2005, 11:49:52 am
I've put all into CVS before server went down  8) It should be availale right now (server is responding) :D
Title: Re: wxSmith development
Post by: cyberkoa on August 12, 2005, 06:31:29 pm
Finally I got the latest CVS running, and see the wxSmith with wxPropertyGrid , cool !  :shock:

And the resizing feature , cool!  :shock:

There are something I found out when I do some rough testing

1. The default selection for wxListBox and wxComboBox are missing   - I will look into it today

2. When I click radio button (Insert) at widgets pallete , it seems like going into an infinate loop.  - I will try to look into it later


I tested it yesterday midnight , have no time to look into the problem above.



Title: Re: wxSmith development
Post by: byo on August 12, 2005, 10:36:52 pm
Finally I got the latest CVS running, and see the wxSmith with wxPropertyGrid , cool !  :shock:

And the resizing feature , cool!  :shock:

There are something I found out when I do some rough testing

1. The default selection for wxListBox and wxComboBox are missing   - I will look into it today

2. When I click radio button (Insert) at widgets pallete , it seems like going into an infinate loop.  - I will try to look into it later


I tested it yesterday midnight , have no time to look into the problem above.


Thx for info - I'll se what's going on with all those bugs ;)

BTW. The default property - work in progress ;) It was inside standard properties window but I'll try to fix that soon.
Title: Re: wxSmith development
Post by: cyberkoa on August 16, 2005, 08:07:34 pm
I am coding a new widget wxBitMapButton , still in the progress to understand the wxSmith source with propgrid, hope to get it up as soon as possible.

byo , do I need to add a new property specially for the file path , or just leave it as string first ?
Title: Re: wxSmith development
Post by: byo on August 17, 2005, 12:05:22 am
I am coding a new widget wxBitMapButton , still in the progress to understand the wxSmith source with propgrid, hope to get it up as soon as possible.

byo , do I need to add a new property specially for the file path , or just leave it as string first ?

Hi, there can be a problem with wxBitmapButton because wxSmith doesn't handle creating bitmaps yet. But maybe You'll add support for this ;) But remember to keep compatibility with original XRC structure :)

At the beginning I propose using simple string for bitmap because it's very probably that it will be changed in future.
Title: Re: wxSmith development
Post by: cyberkoa on August 25, 2005, 02:03:30 am
hi, I have coded the following but not commited to CVS (refer to attacehment)

   
         
One thing to mention in my development, wxradiobox is not derived from wxControlWithItems , therefore I could not make use of the existing stringlistproperty macro . Moreover , it has not Append Function , therefore , choices cannot be added dynamically.

I guess wxdatepickerctrl may have a default date attribute in XRC but I am not sure.
I try to use the DialogsBlocks and in their wxdatepickerctrl have a default value in the properties editor.

I am searching and reading the defintaion of XRC file format but seems like it is still not very clear for some of the controls.

[attachment deleted by admin]
Title: Re: wxSmith development
Post by: byo on August 25, 2005, 11:27:51 am
Hi, I've checked wxRadioBox already - it need additional properties to be created (I can take care of it). Hmm, can You commit these widgets with this crashable RadioBox ?
Title: Question
Post by: rickg22 on August 25, 2005, 05:19:55 pm
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)?
Title: Re: wxSmith development
Post by: cyberkoa on August 26, 2005, 01:33:07 am
Hi, I've checked wxRadioBox already - it need additional properties to be created (I can take care of it). Hmm, can You commit these widgets with this crashable RadioBox ?

I shall commit to CVS later because the development PC is at my house and I am now at office.

I have modified .cbp to suit my development environment (wxwidgets folder name , the library folder name etc... )
maybe you need to add in those files in your project manually


Modified
=====
One more thing to mention , the spinctrl work fine but have a little problem , I try to look into the source code of wxSmith but could not find the cause (a bit complicated). I guess is the wxwidgets problem , the DoGetSize function in wx/msw/spinctrl.cpp maybe return the wrong position.

The problem is very simple , spinctrl consists of 1 spinbutton and 1 textbox  at the left .
When we select the spinctrl , the indication outline is drawn at the wrong position , which the left top corner at the left top corner of the spinbutton.

Title: Re: wxSmith development
Post by: cyberkoa on August 26, 2005, 06:58:50 am
I found that I could not commit to CVS  :(  the error message given by TortiseCVS is as below

Quote
In C:\projects\codeblocks\codeblocks\src\plugins\contrib\wxSmith\defwidgets: "C:\Program Files\TortoiseCVS\cvs.exe" "-q" "add" "wxsdatepickerctrl.cpp" "wxsdatepickerctrl.h" "wxsradiobox.cpp" "wxsradiobox.h" "wxsradiobutton.cpp" "wxsradiobutton.h" "wxsscrollbar.cpp" "wxsscrollbar.h" "wxsspinbutton.cpp" "wxsspinbutton.h" "wxsspinctrl.cpp" "wxsspinctrl.h" "wxstreectrl.cpp" "wxstreectrl.h"
CVSROOT=:pserver:[email protected]:/cvsroot/codeblocks

cvs [server aborted]: "add" requires write access to the repository

Error, CVS operation failed

Steps that I do :

1. select those files that I would like to add to CVS
2. Right Click > CVS Add ...

    Click OK

3. ===Starting processing ====  , error message show...

Could it because of the CVS access authority problem ? Or maybe I need to open certain port at my BroadBand Router/Firewall ..


Title: Re: wxSmith development
Post by: mandrav on August 26, 2005, 08:32:18 am
AFAIK, sourceforge.net allows CVS-write access only with ssh-based authentication, but I could be wrong...

Yiannis.
Title: Re: wxSmith development
Post by: zieQ on August 26, 2005, 09:44:10 am
No you are right. pserver is only for read-only access on sourceforge. Developer should use SSH. cyberkoa, make a patch to save your modification before the new ssh checkout ;)
Title: Re: wxSmith development
Post by: cyberkoa on August 26, 2005, 09:47:36 am
o .. ok thanks .. here already midnight .. tomorrow evening I will get it done
Title: Re: wxSmith development
Post by: byo on August 26, 2005, 10:52:20 am
One more thing to mention , the spinctrl work fine but have a little problem , I try to look into the source code of wxSmith but could not find the cause (a bit complicated). I guess is the wxwidgets problem , the DoGetSize function in wx/msw/spinctrl.cpp maybe return the wrong position.

The problem is very simple , spinctrl consists of 1 spinbutton and 1 textbox  at the left .
When we select the spinctrl , the indication outline is drawn at the wrong position , which the left top corner at the left top corner of the spinbutton.

I've found this problem already. It can be seen even in wxListBox - corners are shifted 1 or 2 pixels. As I remember there's event TODO in source code. I'll try to find a solution.

BTW. I have removed custom variables from my .cbp file - they're set up globally so I've no problem with different directories. So I propose to remove them from .cbp file
Title: Re: Question
Post by: byo 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 :(
Title: Re: wxSmith development
Post by: cyberkoa 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 .

Title: Re: wxSmith development
Post by: cyberkoa 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.


 

Title: Re: wxSmith development
Post by: cyberkoa 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.
Title: Re: wxSmith development
Post by: byo 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
Title: Re: wxSmith development
Post by: byo 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]
Title: Re: wxSmith development
Post by: David Perfors 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.)
Title: Re: wxSmith development
Post by: byo 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 :)
Title: Re: wxSmith development
Post by: cyberkoa on September 20, 2005, 10:29:26 pm
It seems like is my mistake , thx byo for fixing it :oops:
Title: Re: wxSmith development
Post by: tiwag 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 ?
Title: Re: wxSmith development
Post by: byo 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 :)
Title: Re: wxSmith development
Post by: tiwag 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 !
Title: Re: wxSmith development
Post by: byo 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 :)
Title: Re: wxSmith development
Post by: takeshi miya 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
Title: Re: wxSmith development
Post by: tiwag 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
Title: Re: wxSmith development
Post by: rickg22 on October 07, 2005, 05:37:23 pm
Hmmmmmmmm.... it seems very much like an uninitialized pointer... have you checked for "this" being nulll and such?
Title: Re: wxSmith development
Post by: byo on October 09, 2005, 11:54:45 pm
Hmmmmmmmm.... it seems very much like an uninitialized pointer... have you checked for "this" being nulll and such?

Whoops :oops:
I had lot of work to do this weekend and I must have missed something important  :(

EDIT: Bugs fixed :)
Title: Re: wxSmith development
Post by: jmccay on October 27, 2005, 03:22:20 am
I added a XRC Dialog, and here is the code produced.

Code: [Select]
//(*Initialize(XRCtest)
    wxXmlResource::Get()->LoadDialog(this,parent,_T("XRCtest"));
    FlexGridSizer1 = XRCCTRL(*this,"",wxFlexGridSizer);
    Notebook1 = XRCCTRL(*this,"ID_NOTEBOOK1",wxNotebook);
    Panel3 = XRCCTRL(*this,"ID_PANEL3",wxPanel);
    Panel1 = XRCCTRL(*this,"ID_PANEL1",wxPanel);
    //*)

Here is the error produced.  This is a standard wxWidgets DLL app with RC2 & wxWidgets 2.6.x & winxp:

Code: [Select]
xrctest.cpp:12: error: invalid static_cast from type `wxWindow*' to type `const wxFlexGridSizer*'
Process terminated with status 1 (0 minutes, 1 seconds)

Any idea what can cause this?  BTW good job on the wxSmith.  It has some issues with repainting when dragging.  It changes the area to black.  Still good job.

jmccay
Title: Re: wxSmith development
Post by: byo on October 27, 2005, 07:50:59 am
I added a XRC Dialog, and here is the code produced.

Code: [Select]
//(*Initialize(XRCtest)
    wxXmlResource::Get()->LoadDialog(this,parent,_T("XRCtest"));
    FlexGridSizer1 = XRCCTRL(*this,"",wxFlexGridSizer);
    Notebook1 = XRCCTRL(*this,"ID_NOTEBOOK1",wxNotebook);
    Panel3 = XRCCTRL(*this,"ID_PANEL3",wxPanel);
    Panel1 = XRCCTRL(*this,"ID_PANEL1",wxPanel);
    //*)

Here is the error produced.  This is a standard wxWidgets DLL app with RC2 & wxWidgets 2.6.x & winxp:

Code: [Select]
xrctest.cpp:12: error: invalid static_cast from type `wxWindow*' to type `const wxFlexGridSizer*'
Process terminated with status 1 (0 minutes, 1 seconds)

Any idea what can cause this?  BTW good job on the wxSmith.  It has some issues with repainting when dragging.  It changes the area to black.  Still good job.

jmccay

Yop, I know this bug, Please select FlexGridSizer and unselect "Is Member" property and it should work fine :) I forgot to remove this bug before RC2  :oops:
Title: Re: wxSmith development
Post by: jmccay on October 28, 2005, 03:54:07 am
I have created a page on the wiki under tutorials called "WxSmith Tutorial & Pointers".  I only filled in a pointer, but it's a good starting place for tutorial on using wxSmith.

jmccay
Title: Re: wxSmith development
Post by: byo on October 28, 2005, 02:51:53 pm
I have created a page on the wiki under tutorials called "WxSmith Tutorial & Pointers".  I only filled in a pointer, but it's a good starting place for tutorial on using wxSmith.

jmccay

Thx for starting it :)

I've almost written wxSmith "Hello world tutorial" :). Maybe i'll fill empty Tutorial section :)
Title: Re: wxSmith development
Post by: MaikoID on October 17, 2008, 04:01:01 am
Hi,
Why "code completion" don't work with the "wxSmith" variables ?

when I put this

Code: [Select]
.
.
.
StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
StatusBar1. (don't show the properties of this object)
.
.
.
Title: Re: wxSmith development
Post by: rcoll on October 17, 2008, 08:46:32 am
This is the wrong forum for this question, but ..

Your code is wrong, and so code completion cannot parse it.  When you enter

StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));

the correct reference is

StatusBar1->something

not

StatusBar1.something

Notice the pointer ref "->" rather than the direct ref "."

Ringo
Title: Re: wxSmith development
Post by: MaikoID on October 17, 2008, 03:02:16 pm
I know that, but not work with -> too.

It's very difficult to program with GUI interfaces, without these tricks.
Title: Re: wxSmith development
Post by: byo on October 19, 2008, 11:26:58 pm
I know about that problem. But I can not force reparsing of files in any way from plugin (I hope I'm wrong and somebody shows me the solution).

I work this way: I always keep the header file open, when I have to write some part of the code I press Ctrl+S (Save All) - this forces all files to be reparsed.

It's very difficult to program with GUI interfaces, without these tricks.

Hmm, maybe little bit harder than usual but I wouldn't label it "difficult". It's very useful and I like completion a lot but it may make you to lazy. Side effect: unfortunately more bugs and more time spent on finding them (that's real-life example).

Regards

   BYO
Title: Re: wxSmith development
Post by: Master on October 20, 2008, 06:42:11 am
                                              In the name of God

hello,  while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?
(please also pay attention to the 2nd part of this post, may be it is a new idea that could be implemented in adoring wxsmith):)
=====
more details :
Quote
the only way to let the buttons and other stuff appear in this situation is to right click on the item and choose"send back" ,by using this method
when you run the application when you move your mouse cursor over a place that the item is located! by the time the mouse hovers on the item it shows up! meaning , that all of the items are invisible until you move the cursor over the object/item you have used in the form!
by the way please notice that , when you use "sendBack" on an item in this situation (using a bitmap as background of your application), you can not just click on that item easily! i mean for example you place a button on your form!(on a bitmap picture),and you send it back, then you want to add sth to the code specific to the button!(for example wana add  a new function or write Close(),what ever you like), wana double click on it and then expect seeing the source code page turned up! but to your surrprise nothing works again !(from properties pane, you cant use a new handler!i dont know Why!?!!)

i really would like o know the cause , and how to fix it if possible, and if there is noway for it now, i would really appreciate implementing such a functionality in WxSmith .

by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)
==================
And also , is there any way to insert a flash object and make it function as button! lets say using a  flash button in wxsmith, sth just  like bitmap button! if not can you implement such a thing in adoring Wxsmith?

and is it possible to merge an Object again , sth like a bitmap , a piece of picture to the wxpanel , so that it just doesn't get in way when adding buttons , and other wxstuff ? !

tanx 
Title: Re: wxSmith development
Post by: frithjofh on October 22, 2008, 09:24:21 pm
hi byo,

for some time now i'm using some icons for the sizers which i made myself. i don't presume to be a great artist, but i think they work a little bit better than the original ones, better legible. the idea was that all sizer items and similar would be alike and clearly different from al the rest of the widgets icons. so i took up the red and made them all red, i gave them similar sizes, and some more changes...

they work fine for me, i attached them in a .rar , feel free to take a look at them and maybe use them as official ...

greetings from asturias

[attachment deleted by admin]
Title: Re: wxSmith development
Post by: byo on October 24, 2008, 11:24:55 pm
hello,  while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?

Hmm, you can do it it by adding handler for EVT_PAINT event. Let's say that you have bitmap in m_SomeBitmap variable, code similar to this should work:

Code: [Select]
void SomeFrame::OnPaint(wxPaintEvent& event)
{
    wxPaintDC dc( this );
    dc.DrawBitmap( m_SomeBitmap, 0, 0, true );
}

Putting some bitmap button or anything else at the bottom is rather a workaround and trying to put one item on another causes strange effect on windows (for example items are drawn in one order but process mouse events in opposite).

Quote
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)

wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.

Quote
And also , is there any way to insert a flash object and make it function as button! lets say using a  flash button in wxsmith, sth just  like bitmap button! if not can you implement such a thing in adoring Wxsmith?

Do you mean the flash used in web sites? If so then quick answer: no. Even web browsers need plugins for this since decoding flash is a huge challenge.

And I would almost forgot. Thsi topic was related to development process of wxSmith, not developing using wxSmith. It should be posted somewhere in the "users forums".

BTW. Why this post is "in the name of God" ?

Regards
   BYO
Title: Re: wxSmith development
Post by: byo on October 24, 2008, 11:25:30 pm
hi byo,

for some time now i'm using some icons for the sizers which i made myself. i don't presume to be a great artist, but i think they work a little bit better than the original ones, better legible. the idea was that all sizer items and similar would be alike and clearly different from al the rest of the widgets icons. so i took up the red and made them all red, i gave them similar sizes, and some more changes...

they work fine for me, i attached them in a .rar , feel free to take a look at them and maybe use them as official ...

greetings from asturias

Thanks for the icons. They look better than mine you can expect them in the repository soon :)

BYO
Title: Re: wxSmith development
Post by: Master on October 26, 2008, 04:59:08 pm
hello,  while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?

Hmm, you can do it it by adding handler for EVT_PAINT event. Let's say that you have bitmap in m_SomeBitmap variable, code similar to this should work:

Code: [Select]
void SomeFrame::OnPaint(wxPaintEvent& event)
{
    wxPaintDC dc( this );
    dc.DrawBitmap( m_SomeBitmap, 0, 0, true );
}

Putting some bitmap button or anything else at the bottom is rather a workaround and trying to put one item on another causes strange effect on windows (for example items are drawn in one order but process mouse events in opposite).

Quote
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)

wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.

Quote
And also , is there any way to insert a flash object and make it function as button! lets say using a  flash button in wxsmith, sth just  like bitmap button! if not can you implement such a thing in adoring Wxsmith?

Do you mean the flash used in web sites? If so then quick answer: no. Even web browsers need plugins for this since decoding flash is a huge challenge.

And I would almost forgot. Thsi topic was related to development process of wxSmith, not developing using wxSmith. It should be posted somewhere in the "users forums".

BTW. Why this post is "in the name of God" ?

Regards
   BYO

tanx byo for your help , the reason , i posted such a thing here was that , i thought , they could be implemented in Wxsmith ! why ? cuz again i though they are a must have and you forgot to add them to the Wxsmith project !!
well by saying the flash buttons , i mean a button made using some flash button creation software such as Armada flash suit or adobe Flash Cs3!( i wonder if you saw KmPlayer, the latest version, it uses such buttons if think!), so that you can use them in your project !the  mouse hovers,and  it changes ! you know that !
(if again these things need to use plugins , tell me please! )

and That "In the name of God" it my habit !when ever im badly in need of sth and i hope everything goes ok , i start my work (rather start coding a new project or ask new stuff) with the name of God .

again Byo many tanx, and im sorry if my post was no related to this topic  , please consider them as some suggestion on improving Wxsmith! ( ive seen these stuff in VS, so i thought i could be a good idea to implement them in WxSmith too !)
Title: Re: wxSmith development
Post by: byo on October 27, 2008, 07:43:09 pm
well by saying the flash buttons , i mean a button made using some flash button creation software such as Armada flash suit or adobe Flash Cs3!( i wonder if you saw KmPlayer, the latest version, it uses such buttons if think!), so that you can use them in your project !the  mouse hovers,and  it changes ! you know that !
(if again these things need to use plugins , tell me please! )

Usually you won't need such huge products like flash to do this. Everything is alreay available. For the reference I attach project with simple "button-like" item which changes colour when mouse is over it. The project is made on linux but source and header files should work fine on windows too. Just need to create new project.

KmPlayer is definitely not using flash. That would equal to using plane to buy some vegetables in a shop on the other side of the street.

Anyway, we should if you want to continue this conversation, please add new topic into other group.

Regards
   BYO

[attachment deleted by admin]
Title: Re: wxSmith development
Post by: kakaroto on November 03, 2008, 03:27:05 am
Hello all!

I'm and experienced developer but I'm new to Code::Blocks and wxWidgets, so please be indulgent with me (at least the first few questions  :D )

I've been looking at the wxWidgets sample code and found a quite useful widget for a project I have in mind: wxFilePicker. Unfortunately it seems that this widget is not available/supported in wxSmith; am I right? or am I missing something?

If I'm doing something wrong I'd be thankful if you could point me to the appropriate documentation.

Thanks in advance!


PS: Just in case it matters, I'm using Code::Blocks 8.02 and wxWidgets 2.8 under Kubuntu 8.10
Title: Re: wxSmith development
Post by: byo on November 03, 2008, 11:48:50 pm
I've been looking at the wxWidgets sample code and found a quite useful widget for a project I have in mind: wxFilePicker. Unfortunately it seems that this widget is not available/supported in wxSmith; am I right? or am I missing something?

Unfortunately there's no support for wxFilePickerCtrl in wxSmith now. But if you only want to show file-choose dialog there's wxFileDialog object which can be used instead. More info on this class can be found here (http://"http://docs.wxwidgets.org/stable/wx_wxfiledialog.html#wxfiledialog").

I don't remember exactly whether it was supported on the 8.02 release. If it was not, I can only suggest some newer nightly build ;)

Regards
   BYO
Title: Re: wxSmith development
Post by: lesnewell on November 17, 2008, 12:04:12 pm
Hi byo,

Is it possible to set the default border, placement and proportion when placing widgets? For instance I usually use 3 dialog unit borders with a proportion of 0. It can be a pain to place all my widgets then go through them all, changing these values.

While I am asking is there any way to convert a wxSmith project to use xrc?

Thanks,
Les
Title: Re: wxSmith development
Post by: riban on November 17, 2008, 07:32:47 pm
Hi

I read in Jan 2006 (http://forums.codeblocks.org/index.php?topic=1987.0 (http://forums.codeblocks.org/index.php?topic=1987.0)) a reference to cut, copy and paste. Is this features going to be implemented. It would be an extremely useful features that is missing from an otherwise excellent application. I am using Code::Blocks with wxSmith extensively and encouraging many of my colleagues to do so. The lack of cut, copy & paste is slowing their migration (from an M$ product) and does slow my development often.

If there is feature request system that I have missed, please kick me in the right direction.

Keep up the good work.
Title: Re: wxSmith development
Post by: lesnewell on November 19, 2008, 08:48:10 am
Copy/paste works for me. Select the items, hit ctrl-C, got to your target, hit ctrl-V.

You have to be a little careful what you select. Fro instance if you select a sizer, the sizer and all of it's contents will be copied. When pasting, be aware of what inser mode you are using (before, after, into etc).

Les
Title: Re: wxSmith development
Post by: Loaden on February 05, 2009, 10:29:35 am
I hope wxSmith can write code like this:

[attachment deleted by admin]
Title: Re: wxSmith development
Post by: Loaden on February 05, 2009, 10:36:13 am
Here have some question about wxSmith.
It's seem like bug:
http://forums.codeblocks.org/index.php/topic,10040.msg69882.html#msg69882
http://forums.codeblocks.org/index.php/topic,10051.0.html
Title: Re: wxSmith development
Post by: byo on February 05, 2009, 11:34:03 pm
I hope wxSmith can write code like this:

There's one problem with enums - if you mix two or more resources in one aplication you may have ids that are same. Let's take an example:

Theres one resource of type wxDialog - it has button with id of value let's say 10. Now we would like to add separate wxPanel resource into that dialog. This resource may also have button with id of value 10. If event handling occurs there's confusion because event handling is filtered through ids.

I decided to switch to static const long time ago (there were enums before) because:

Regards
   BYO
Title: Re: wxSmith development
Post by: Loaden on February 06, 2009, 12:43:23 am
I hope wxSmith can write code like this:
There's one problem with enums - if you mix two or more resources in one aplication you may have ids that are same.
I see.
but why can not set all control id to wxID_ANY? or wxID_* ? i think this is a bug.
DialogBlocks not have this question. it's support wxID_* in every control.

And i hope wxSmith can offer more option, to let's user choice.
example: _("") or _T(""), because more application not support I18N.
example: const static id OR enums id.

Final, there have some question:
http://forums.codeblocks.org/index.php/topic,10040.msg69882.html#msg69882
I can't set size. it's not work.
I found it's always call 'SetSizeHints'.
Code: [Select]
Index: src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.cpp (revision 5440)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.cpp (working copy)
@@ -215,7 +215,7 @@
                         Codef(_T("%sFit(%O);\n"),ChildAccessPrefix.c_str());
                     }
 
-                    Codef(_T("%sSetSizeHints(%O);\n"),ChildAccessPrefix.c_str());
+                    //Codef(_T("%sSetSizeHints(%O);\n"),ChildAccessPrefix.c_str());
                 }
             }
(http://forums.codeblocks.org/index.php?action=dlattach;topic=10040.0;attach=3128)
thanks!!
Title: Re: wxSmith development
Post by: Loaden on February 06, 2009, 12:54:18 am
I want set Frame size like wxSize(700, 500), and all control resize self to fit Frame's size.
But now, parent size must fit controls.
Title: Re: wxSmith development
Post by: hirofield on September 21, 2009, 02:37:16 pm
Hi,

A few days ago, I posted almost the same message as this on "General" forum.
But I think that forum is not appropriate to post this kind of message,
so let me post it on this board again.

I have a request for auto-generated codes by wxSmith.

I'm testing a frame which has fixed size.
I created a new frame based wxSmith project by the wizard, then deleted the
MenuBar1 and the StatusBar1 which are automatically added by default.
The followings are the codes of frame constructor in this situation.

Code: [Select]
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(SizeTestFrame)
    Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
    //*)
}

Next, I unchecked the [Default size] checkbox in the property editor, then set
Width to 300 and Height to 200. The codes of constructor was changed as follows.

Code: [Select]
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(SizeTestFrame)
    Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
    SetClientSize(wxSize(300,200));
    //*)
}

After that, I placed a BoxSizer into the Frame on the GUI designer screen.
Then the frame was shrunk to very small size, and the constructor codes are
changed:

Code: [Select]
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(SizeTestFrame)
    wxBoxSizer* BoxSizer1;

    Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
    SetClientSize(wxSize(300,200));
    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
    SetSizer(BoxSizer1);
    BoxSizer1->SetSizeHints(this);
    //*)
}

This means the size setting by SetClientSize(wxSize(300,200)); is ignored.
So I added SetClientSize(wxSize(300,200)); again after the auto-generated codes
by manual as follows:

Code: [Select]
SizeTestFrame::SizeTestFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(SizeTestFrame)
    wxBoxSizer* BoxSizer1;

    Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
    SetClientSize(wxSize(300,200));
    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
    SetSizer(BoxSizer1);
    BoxSizer1->SetSizeHints(this);
    //*)

    SetClientSize(wxSize(300,200));
}

Then the frame was shown at the expected size on runtime.
But the frame is still shrunk on the GUI designer even clicking " Show preview"
button.

Although I guess it might be a kind of spec or bug of wxWidgets, but I think
it's better that wxSmith places SetClientSize(wxSize(x, y)); at the end of the
auto-generated codes of constructor, and it's reflected in the GUI designer
screen.
In addition, I think it affects the usability of the GUI designer.  Actually,
it's rather difficult for me to place a widgets on the exact position in the
narrow space.

That's my request.
I would be happy if this issue is resolved.

Regards,

hirofield
Title: Re: wxSmith development
Post by: noblus on December 18, 2009, 05:12:12 am
Hi. I have a minor problem when using wxSmith (C::B 2.8.10, newest nightly builds).

The listed events in "Events Window" for wxSlider are wxEVT_COMMAND_SCROLL + (_TOP, _BOTTOM, etc). They works almost fine, except when I want to add a handler for wxEVT_COMMAND_SLIDER_UPDATED event. wxEVT_COMMAND_SLIDER_UPDATED event handler can be triggered when mouse drags the thumb, but wxEVT_COMMAND_SCROLL_XXXX's can't.

So if there is a solution please tell me. Thanks in advance.
Title: Re: wxSmith development
Post by: jens on December 18, 2009, 07:18:29 am
As workaround (until the wxEVT_COMMAND_SLIDER_UPDATED) is added you can use wxEVT_SCROLL_THUMBTRACK to fetch any event generated by tracking the slider with the mouse and wxEVT_SCROLL_CHANGED to fetch also events triggered by the keyboard or by clicking next to the slider (this event is also triggered by mouse-dragging, but only after releasing the mouse-button).

Anyway the wxEVT_COMMAND_SLIDER_UPDATED will most likely be added soon.

Thanks for reporting.

EDIT:
Just added it in my local copy, will commit this later.
Title: Re: wxSmith development
Post by: jens on December 18, 2009, 02:33:38 pm
Just added it in my local copy, will commit this later.

Done (svn r5986).
Title: Re: wxSmith development
Post by: noblus on December 19, 2009, 04:54:14 am
Just added it in my local copy, will commit this later.

Done (svn r5986).

Thanks. Excellent Efficiency :lol:
Title: Re: wxSmith development
Post by: Cryogen on March 05, 2010, 07:36:15 pm

 Hi Guys,

I added a new feature to wxSmith and posted a patch on 2/2. I probably should have announced it here sooner. The description from Berlios:

-----------
The patch was made against SVN version 6130, 2/2/10.   2010-Feb-02 21:33   cryogen
This patch adds the ability to insert code to create an image for a toolbar button or menu item. Previously you could only use an image path or wxArtProvidor. In my case, I wanted to use images embedded using wxInclude, via the wxMEMORY_BITMAP() macro. You can now insert code such as "wxMEMORY_BITMAP(save_left)" into the new field to have wxSmith create an entry such as:

ToolBarItem2 = ToolBar1->AddTool(ID_TB_SAVEUNSELECTED, _("Save Unselected"), wxMEMORY_BITMAP(save_left), wxNullBitmap, wxITEM_NORMAL, .....

Any code that returns a valid wxBitmap will work.

The Extra Code option doesn't work for these situations as it inserts the extra code after the call to Append() or Realize(), which is too late.

The patch also includes a couple of spelling corrections.
-----------

What this does is adds the fields seen here at bottom:

(http://cryogen.byethost24.com/wxSmithImageEd.png)

so that you can insert code as described above. This removes the limitation imposed by wxSmith preventing the entry of code to generate the bitmap. I hope you find it useful. You can find it as patch 2921 at https://developer.berlios.de/patch/?group_id=5358 (https://developer.berlios.de/patch/?group_id=5358).

Cheers,

  Cryo.
Title: Re: wxSmith development
Post by: Cryogen on March 05, 2010, 08:45:12 pm

 Hi again,

I thought you could download patches from Berlios but apparently not, so it's attached.

Cheers,

  Cryo.

[attachment deleted by admin]