Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

wxSmith development

<< < (32/34) > >>

lesnewell:
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

Loaden:
I hope wxSmith can write code like this:

[attachment deleted by admin]

Loaden:
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

byo:

--- Quote from: Loaden on February 05, 2009, 10:29:35 am ---I hope wxSmith can write code like this:

--- End quote ---

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:

* Static members are not created per instance of class. They are global so the total extra memory requirement for them is up to few hundred bytes per application.
* These members are initialized using wxNewId() function which is said to create unique ids in whole application scope which allows to mix multiple resources simultaneously in one window
Regards
   BYO

Loaden:

--- Quote from: byo on February 05, 2009, 11:34:03 pm ---
--- Quote from: Loaden on February 05, 2009, 10:29:35 am ---I hope wxSmith can write code like this:

--- End quote ---
There's one problem with enums - if you mix two or more resources in one aplication you may have ids that are same.

--- End quote ---
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: ---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());
                 }
             }
--- End code ---

thanks!!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version