Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8367971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:16:59+00:00 2026-06-09T13:16:59+00:00

I cant find any examples online on how to use this method. I think

  • 0

I cant find any examples online on how to use this method. I think that It may be something that I will use. Can someone provide me an example on how to use this method?

http://wxpython.org/docs/api/wx.xrc.XmlResource-class.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:16:59+00:00Added an answer on June 9, 2026 at 1:16 pm

    Based on the source code, I believe this is how you would do it.

    Source Code:
    http://wxwidgets2.8.sourcearchive.com/documentation/2.8.7.1/classxrc_1_1XmlResource_4a0466d7ef7ac98ef7a9b8135a0c9339.html

    def AddSubclassFactory(*args, **kwargs):
        """AddSubclassFactory(XmlSubclassFactory factory)"""
        return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
    

    So you can see that it is looking for an object of type XmlSubclassFactory. From the documentation (http://wxpython.org/docs/api/wx.xrc.XmlSubclassFactory-class.html) we find…

    XmlSubclassFactory  __init__(self)
    

    We can see that the constructor for XmlSubClassFactory takes no arguments. So we create an object of XmlSubclassFactory and create a resource to add the SubClassFactory to.

    import wx
    from wx import xrc
    
    scf = xrc.XmlSubClassFactory()
    resource = xrc.XmlResource("resource.xrc")
    resource.AddSubclassFactory(scf)
    

    I, unfortunately, could not find a Python example. However, I think the Perl analog is pretty close. From http://permalink.gmane.org/gmane.comp.lang.perl.wxperl/477

    Wx::XmlResource::AddSubclassFactory( MyFactory->new ); // perl
    

    This is pretty similar to what we are doing. So between reading the source code and that example, I believe the snippet is a good place to start. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use PyLucene, and I can't find any code examples that actually
Sure I've seen this done before but off-hand I can't find any examples. I've
I can't find any examples online of how to configure two separate databases for
Cant really find any useful information on this through Google so hope someone here
I've searched and searched and I can't find any clear examples online. I'd like
I herd about RED5, but unfortunately I can't find any examples for feeding it
I am trying to parse XML with jsoup, but I can't find any examples
I love the idea of Grizzly, but I can't find any good examples to
I'm fairly new to log4net, and I can't seem to find any clear examples
all. Maybe i've not googled enough, but i can't find any example on this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.