Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
New wxSmith: Testing
byo:
Hi, everyone.
If someone's interested in new wxSmith status, here's link for precompiled win version that should work with recent nightlies (I've tested it on 18.12 and it worked fine):
http://rapidshare.com/files/8683245/New_wxSmith__rev_3419__-_Testing.7z.html
This version is UNSTABLE and it shouldn't be sued for anything except testing.
New version modifies project and source files so remember to BACKUP YOUR PROJECT before opening it using this wxSmith.
Currently I've successfully converted wxSmith's own project to new format - but I had to fix few bugs to get positive results so there's big chance that by opening your projects other bugs will come out ;)
I'll be unavailable till 10.01 so waiting tor your bug reports ;)
Marry Christmas and Happy New Year :)
BYO
ocloma:
congratulations, excellent work!!!!
Marry Christmas!!!!
bugmenot:
I tried the new version and I must say that it runs more stable for me than the old version with newest nightlies. The old version started to crash in many situations with newer Codeblocks versions. I'm using windows.
It certainly is a great improvement over the old version.
One bug I noticed where drawing fragments outside of the current frame. Meaning when for example you remove a control the total size of a frame shrinks in the preview. The frame is correctly drawn however the regions that now lies outside of the frame are not correctly cleared to the background color. This happens in numerous situation so you probably already know about it.
Create a new project and then add a wxSmith frame. In the project manager (that window where you can browse your source files and code completion symbols) go to the "Resources" tab. In the tree you will see a root named "Resources" below it an unnamed element which is the root for all wxSmith resources.
Another more serious bug happens when you often change a sizer property of a control. I tried changing the expand flag check box in both the regular property tab and in the quick property panel and I changed the border size using the increase and decrease buttons in the quick property panel. I clicked the buttons fast about a 50 times. I don't know if the error also happens when pushing them slowly after another. After a number of clicks the drawing starts to lag. I looks like if it remembered all the previous states (undo level?) and would draw then first before drawing the final state. When now exiting Codeblocks you might get lucky and nothing happens or it just crashes but most of the time the following assertion is triggered:
--- Quote ---File: wxscoder.cpp
Line: 39
Expression: EM != NULL
--- End quote ---
When toggling the "Is member" check box the preview frame is redrawn. This is not necessary.
When adding a bitmap button and loading the image from a file the following code is generated:
--- Code: ---wxSize StaticBitmap1_Size = wxDefaultSize;
StaticBitmap1 = new wxStaticBitmap(this,ID_STATICBITMAP1,wxBitmap(_("..."));
,wxDefaultPosition,StaticBitmap1_Size,0,_T("ID_STATICBITMAP1"));
--- End code ---
Obviously one ";" is too much.
http://www.wxwidgets.org/manuals/2.6.3/wx_wxbitmap.html#wxbitmapctor
--- Quote ---Under Windows, type defaults to wxBITMAP_TYPE_BMP_RESOURCE. Under X, type defaults to wxBITMAP_TYPE_XPM.
--- End quote ---
However we want to read an image from a file so that wont work. I don't know how you can make it so that wxWidgets loads a file and auto-detects the type so I'd suggest looking at the extension and then passing wxBITMAP_TYPE_BMP/wxBITMAP_TYPE_GIF/... as second parameter. Perhaps even adding an option to the bitmap selector dialog to indicate the type if for example the files have non standard extension or even wrong extensions.
Also the bitmap selector dialog crops the bitmap down in the preview, perhaps shrinking would be a better options. Also it is currently not possible to load resources. (It would be great if wxSmith or another plugin could manage those.)
I didn't quiet understand how the font selector dialog works, is it already fully functional? Anyway it might be a good idea to allow the user to specified the example text (well he'll see how it looks in the preview anyway so it might not be a so good idea after all). Anyway you're using wxSystemSettings::GetFont but didn't include <wx/settings.h>.
When removing controls the corresponding headers are no longer included. However it's possible that these headers provided the declarations for the events of some handlers. The easiest fix would be to include the needed headers outside of the //(*Headers(...)//*) tags when a handler is added. This way they are included twice and when the control is removed the version outside of the //(*Headers(...)//*) tags is still there.
When adding a StdDialogButtonSizer and adding ok and yes buttons they are placed over another. (This might be wx bug and not a wxSmith one.)
By changing the wxSP_3D style of a wxSplitterWindow the preview window give the splitter too much space. The space for the border is there but it isn't used as I have unset wxSP_3D. Perhaps move wxSplitterWindow to the layout category.
That's all I could find for bugs. However I would have a few suggestions.
In the regular property editor some can have only a predefined number of values. (For example "Horizontal align" can only have 3 values.)
Delphi changed the value to the next in the list when just double clicking (no need to select in the drop down box). I found that pretty handy.
Make the delete key delete the currently selected control.
By default make controls expand.
I really loved how under Delphi double clicking a button in the preview generated the click handler and scrolled to the right position in the source code. Perhaps add a line:
--- Code: ---//(*Handler(Foo)*)
--- End code ---
when generating a handler so that it's possible to scroll to the right place by just double clicking the control in the preview.
Add some possibility to move controls around in the tree and not only in the preview. Make it possible to move sizers around with all the controls they contain.
Allow to specify the creation code for custom widgets somewhere centrally. You add a new control to a list then add the creation code, the name and specify a bitmap which will be used to fill out the region in the preview.
Anyway even if it still needs some polishing wxSmith is already great as it is. Keep up the good work.
byo:
Thx bugmenot for your work. It's really proceless for me :)
I'll start working on most of issues presented here as soon as possible :)
byo:
few bugs fixed. Here's new version working with 10.01.07 nightly:
http://wxsmith.ovh.org/builds/wxSmith_rev3481.7z
Here's some changelog since last version (available in this topic):
* Fixed bugs in editor preview generation - no more blinks or artifacts
* Fixed wxStaticBitmap and wxBitmapButton widgets
* Fixed few bugs in font property - it now works properly
* Replaced previous font editor with simplified dialog (previous editor is available under advanced options)
Few bugs which I hadn't remove beacause of some problems:
* Bug with "EM != NULL" assertion - I've never got this so I couldn't find the reason of this failure
* Toggling "Is Member" and changing few other properties still cause editor to refresh (it would require some bigger changes in property system so maybe in future). Since there's no blinkink bug, it should not be frustrating ;)
* No support for resources
* Problem with headers for handler functions - this will be quite hard to fix (need to parse handlers list, check what headers are required for handler arguments). Fortunately as long as pch is used, absent headers are no problem
Regards
BYO
Navigation
[0] Message Index
[#] Next page
Go to full version