In several places, e.g. dPemMixin.py", line 3475, wherever screen coordinates are passed from Dabo to wx, they are passed as just generic numbers, which the wx tolerated before. Now it's a runtime error, namely
dc.DrawText(txt, x, y) TypeError: DC.DrawText(): arguments did not match any overloaded call: overload 1: argument 2 has unexpected type 'float' overload 2: argument 2 has unexpected type 'float'
Is there anything we can do about this?
On Jun 24, 2023, at 04:20, Драган Недељковић ndragan@ndragan.com wrote:
In several places, e.g. dPemMixin.py", line 3475, wherever screen coordinates are passed from Dabo to wx, they are passed as just generic numbers, which the wx tolerated before. Now it's a runtime error, namely
dc.DrawText(txt, x, y)TypeError: DC.DrawText(): arguments did not match any overloaded call: overload 1: argument 2 has unexpected type 'float' overload 2: argument 2 has unexpected type 'float'
Is there anything we can do about this?
The 'master' branch of Dabo has been inactive for about a decade now. Several years ago I made a brief attempt at updating the code base to use Python 3.x and wxPython 4.x, and got some of it working. That is now in the 'dabo3' branch, where any changes like the one you mention would be made.
I haven't kept up on the changes to wxPython; it was hard enough to get some basic compatibility with 4.x. Please check out the 'dabo3' branch, and if you have some suggestions that would fix some issues, please create a pull request against that branch on GitHub. If you have any other questions, feel free to ask, and I'll try to help as much as I can.
-- Ed Leafe
I have been able to get Dabo working with python 3.11 and wxPython 4.2.1. When I say working I mean that my program works. I have not attempted to get everything working that Dabo has to offer. For example I don't use any of the special tools ClassDesigner, ReportDesigner and others. Therefore, I haven't tried to get them running. Most of the changes are very straight forward and easy to do. Convert 'collections.something' to 'collection.abc.something' and other similar statements.
The example error you show I just converted to an int (if memory serves). Also I believe the value was 0.0 which I converted to 0 (zero).
I'm more than willing to provide what I have that works for me. That said, I'm not the best programmer and I just did things to get by any errors.
Johnf
On 6/24/23 6:13 AM, Ed Leafe wrote:
On Jun 24, 2023, at 04:20, Драган Недељковићndragan@ndragan.com wrote:
In several places, e.g. dPemMixin.py", line 3475, wherever screen coordinates are passed from Dabo to wx, they are passed as just generic numbers, which the wx tolerated before. Now it's a runtime error, namely
dc.DrawText(txt, x, y)TypeError: DC.DrawText(): arguments did not match any overloaded call: overload 1: argument 2 has unexpected type 'float' overload 2: argument 2 has unexpected type 'float'
Is there anything we can do about this?
The 'master' branch of Dabo has been inactive for about a decade now. Several years ago I made a brief attempt at updating the code base to use Python 3.x and wxPython 4.x, and got some of it working. That is now in the 'dabo3' branch, where any changes like the one you mention would be made.
I haven't kept up on the changes to wxPython; it was hard enough to get some basic compatibility with 4.x. Please check out the 'dabo3' branch, and if you have some suggestions that would fix some issues, please create a pull request against that branch on GitHub. If you have any other questions, feel free to ask, and I'll try to help as much as I can.
-- Ed Leafe
Post Messages to:Dabo-users@leafe.com Subscription Maintenance:https://mail.leafe.com/mailman/listinfo/dabo-users Searchable Archives:https://leafe.com/archives This message:https://leafe.com/archives/byMID/7C20EDD8-650A-468A-8B41-49E9ACAC262A@leafe....
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
On Jun 24, 2023, at 08:13, Ed Leafe ed@leafe.com wrote:
In several places, e.g. dPemMixin.py", line 3475, wherever screen coordinates are passed from Dabo to wx, they are passed as just generic numbers, which the wx tolerated before. Now it's a runtime error, namely
dc.DrawText(txt, x, y) TypeError: DC.DrawText(): arguments did not match any overloaded call: overload 1: argument 2 has unexpected type 'float' overload 2: argument 2 has unexpected type 'float'
Is there anything we can do about this?
The 'master' branch of Dabo has been inactive for about a decade now. Several years ago I made a brief attempt at updating the code base to use Python 3.x and wxPython 4.x, and got some of it working. That is now in the 'dabo3' branch, where any changes like the one you mention would be made.
I haven't kept up on the changes to wxPython; it was hard enough to get some basic compatibility with 4.x. Please check out the 'dabo3' branch, and if you have some suggestions that would fix some issues, please create a pull request against that branch on GitHub. If you have any other questions, feel free to ask, and I'll try to help as much as I can.
Now that I've been working with Dabo again, I've fixed several of these changes.
The new `main` branch is the former `dabo3` branch, so please use that. If you find any more cases where things aren't working right, please let me know.
-- Ed Leafe
If that does not fix the issue. What I did to get around the issue in the past was to use int.
dc.DrawText(txt, int(x), int(y))
That did not seem to change the location of the text - at least in my app. ReportLab has the same issues.
In my pem_mixin.py at line 3429 I have:
if self._angle == 0: dc.DrawText(txt,int( x), int(y))
Hope this helps.
Also I am using wxpython 4.2.2
Johnf
On 12/10/24 7:51 AM, Ed Leafe wrote:
On Jun 24, 2023, at 08:13, Ed Leafe ed@leafe.com wrote:
In several places, e.g. dPemMixin.py", line 3475, wherever screen coordinates are passed from Dabo to wx, they are passed as just generic numbers, which the wx tolerated before. Now it's a runtime error, namely
dc.DrawText(txt, x, y)TypeError: DC.DrawText(): arguments did not match any overloaded call: overload 1: argument 2 has unexpected type 'float' overload 2: argument 2 has unexpected type 'float'
Is there anything we can do about this?
The 'master' branch of Dabo has been inactive for about a decade now. Several years ago I made a brief attempt at updating the code base to use Python 3.x and wxPython 4.x, and got some of it working. That is now in the 'dabo3' branch, where any changes like the one you mention would be made.
I haven't kept up on the changes to wxPython; it was hard enough to get some basic compatibility with 4.x. Please check out the 'dabo3' branch, and if you have some suggestions that would fix some issues, please create a pull request against that branch on GitHub. If you have any other questions, feel free to ask, and I'll try to help as much as I can.
Now that I've been working with Dabo again, I've fixed several of these changes.
The new `main` branch is the former `dabo3` branch, so please use that. If you find any more cases where things aren't working right, please let me know.
-- Ed Leafe
Post Messages to: Dabo-users@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/dabo-users Searchable Archives: https://leafe.com/archives This message: https://leafe.com/archives/byMID/056461D1-DCAF-4718-A62A-AB828ED97DDF@leafe....