wxFormBuilder

Welcome to wxFormBuilder’s issue tracking system! We hope that wxFormBuilder provides you with many hours of increased productivity.

Please feel free to post bug reports and feature requests here. You can feel free to discuss an issue or feature on the forum but if you decide it needs to be looked at you need to post it here. If a feature request or bug report is not on this site there is a good chance it won’t be worked on. So, as a rule, post them here.

Thanks for your cooperation,
The wxFormBuilder Team

| Tasklist |

FS#453 - Subclass attribute for the custom control is not generated in the XRC

Attached to Project: wxFormBuilder
Opened by Jack Daniels (azeroth) - Friday, 22 January 2010, 19:37 GMT+2
Task Type Bug Report
Category Backend / Core → XRC Code Generation
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version 3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

What steps will reproduce the problem?

  1. Create custom control
  2. Add some text for subclass property
  3. Switch to XRC tab
  4. Verify that custom control has no subclass attribute

This is non-intuitive because the user would expect that if data has been entered in the subclass property of the control that it should be present in the output of any format that supports it. wxFB appears to support the subclass feature for every other control.

This task depends upon

Comment by Jack Daniels (azeroth) - Friday, 22 January 2010, 20:06 GMT+2

Here's a patch, which I have not tested, but I believe fixes the issue. ObjectToXrcFilter.AddWindowProperties appears to be what adds the subclass attribute to the xml node.

Index: plugins/additional/additional.cpp
===================================================================
--- plugins/additional/additional.cpp   (revision 1661)
+++ plugins/additional/additional.cpp   (working copy)
@@ -1178,6 +1178,7 @@
        ticpp::Element* ExportToXrc(IObject *obj)
        {
                ObjectToXrcFilter xrc(obj, obj->GetPropertyAsString(_("class")), obj->GetPropertyAsString(_("name")));
+               xrc.AddWindowProperties();
                return xrc.GetXrcObject();
        }
 };

Loading...