Issue2375
Created on 2015-07-06.02:34:20 by alex.gronholm, last changed 2015-09-09.20:14:35 by zyasoft.
File name |
Uploaded |
Description |
Edit |
Remove |
issue2375.patch
|
darjus,
2015-09-01.12:27:58
|
|
|
|
msg10137 (view) |
Author: Alex Grönholm (alex.gronholm) |
Date: 2015-07-06.02:34:19 |
|
Why does this fail?
>>> from javax.swing.tree import DefaultTreeModel, DefaultMutableTreeNode, DefaultTreeCellRenderer
>>> class AModel(DefaultTreeModel):
... def __init__(self):
... super(AModel, self).__init__(DefaultMutableTreeNode())
...
>>> a = AModel()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Default constructor failed for Java superclass javax.swing.tree.DefaultTreeModel
But this works:
>>> class AModel(DefaultTreeModel):
... def __init__(self):
... DefaultTreeModel.__init__(self, DefaultMutableTreeNode())
...
>>> a = AModel()
>>>
|
msg10188 (view) |
Author: Darjus Loktevic (darjus) |
Date: 2015-09-01.07:01:20 |
|
I've tracked this to 95d09ba14aa7834f1e2cebcfb48593dc3b480f69 and http://bugs.jython.org/issue1540
|
msg10189 (view) |
Author: Darjus Loktevic (darjus) |
Date: 2015-09-01.12:27:58 |
|
Hey Jim,
Does this patch make sense? Sorry don't have much context into it, therefore would like your review before committing.
|
msg10197 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-09-01.23:38:54 |
|
Darjus, +1
Makes perfect sense: ProxyMaker handles constructors differently than ordinary methods because that is Java's model. So no need to prefix with super__
I have committed this patch on your behalf in https://hg.python.org/jython/rev/406ca703d7d3
|
msg10237 (view) |
Author: Alex Grönholm (alex.gronholm) |
Date: 2015-09-09.20:09:39 |
|
Just wanted to say, it works for me now. Thanks!
|
msg10238 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-09-09.20:14:35 |
|
Closing out per Alex's report.
|
|
Date |
User |
Action |
Args |
2015-09-09 20:14:35 | zyasoft | set | status: pending -> closed messages:
+ msg10238 |
2015-09-09 20:09:39 | alex.gronholm | set | messages:
+ msg10237 |
2015-09-01 23:38:54 | zyasoft | set | status: open -> pending assignee: zyasoft -> resolution: fixed messages:
+ msg10197 milestone: Jython 2.7.1 |
2015-09-01 12:28:00 | darjus | set | files:
+ issue2375.patch keywords:
+ patch messages:
+ msg10189 |
2015-09-01 07:01:20 | darjus | set | nosy:
+ darjus messages:
+ msg10188 |
2015-07-09 18:02:22 | santa4nt | set | nosy:
+ santa4nt type: crash -> behaviour components:
+ Core |
2015-07-06 02:34:20 | alex.gronholm | create | |
|