Re: Trouble calling method from one class to another class

RF <[email protected]> Sat, 24 Apr 2021 15:53:51 -0700
Newsgroups gmane.comp.python.wxpython
Message-ID <CAGgoqdixw1-DejYRrEk6ebRSb3BEJhjdvdwpLMwZpmbTM2dmWA@mail.gmail.com>
> Even if this worked, you have a hard coded path which will fail on any
machine except yours
Yes I am aware of that. I thought you would just edit the path so some
files on your system would load into the tree. It doesn't matter what files
are loaded since they are not being used yet.

Hmmm...I moved two TreeCtrl lines down below the add_tab_page() method call
but it didn't make any difference. Please see the screenshot.

I'm also attaching the .py update file as pxCore3.py (in a zip file).

IDE Mod is the screen shot of my PyCharm IDE after I ran the updated file
(showing the same error is still there).

Thank you...


On Sat, Apr 24, 2021 at 3:34 PM Dietmar Schwertberger <
[email protected]> wrote:

> On 24.04.2021 20:21, RF wrote:
>
> I did test it. I use PyCharm IDE and it runs fine (until I try to create a
> new tab page, then I get the error I'm trying to resolve).
>
> It seems that your IDE does run something other than your programs.
>
>
> pxCore.py tries to instantiate a control with a sizer as parent which does
> not work:
>
>     self.tree = MyTreeCtrl(vbox, tID, size=wx.Size(240, 400),
> style=wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_HAS_BUTTONS | wx.TR_NO_LINES)
>   File "D:\Python\wxpython\bugs_etc\2021-04-24_Calling\pxCore.py", line 6,
> in __init__
>     wx.TreeCtrl.__init__(self, parent, id, size, style)
>
>
> pxCore2.py calls ...traverse_directory_tree... before self.tab_num is
> defined. This also does not work.
> Even if this worked, you have a hard coded path which will fail on any
> machine except yours.
>
> Regards,
>
> Dietmar
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wxpython-users/6bcc96f1-cff3-b1ee-4790-fe05395d6a70%40schwertberger.de
> <https://groups.google.com/d/msgid/wxpython-users/6bcc96f1-cff3-b1ee-4790-fe05395d6a70%40schwertberger.de?utm_medium=email&utm_source=footer>
> .
>


-- 
Ralph Freshour

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/CAGgoqdixw1-DejYRrEk6ebRSb3BEJhjdvdwpLMwZpmbTM2dmWA%40mail.gmail.com.
IDE Mod.png (image/png, 133.3 KB) - not displayed
pxCore3.zip (application/x-zip-compressed, 1.4 KB) - not displayed