WtDesigner
WtDesigner copied to clipboard
JavaScript Error
Hi Juan,
First of all, thanks for all your precious work on this great tool. I am a colleague of @cls-nebadje and am about to continue our current Wt project. For this I have built the WtDesigner on my Ubuntu-16.04 according to #3, i.e.:
- manually built & installed Wt 3.3.5-rc2
- manually built WtDesigner (tried both master and develop-uli-less-warnings branches)
- resulting
ldd bin/WtDesigner/WtDesigner
: wtDesigner.ldd.txt
- resulting
Unfortunately I am running into at least one recurring error which I can't seem to get rid of. It is easily reproducible:
- start WtDesigner (opening default dummy project)
- select
wt_root
- add a new
WSlider
- select slider
- change slider's maximum value to 100 (or any other number >10)
I then get a JavaScript Alert: Wt internal error; code: undefined, description: Unexpected number '3' and the WtDesigner log shows the following verbose error message: wtDesigner.javascript.err.txt After this trying to save the project naturally fails. Do you have any idea what might be causing this error? Where should I be looking for the culprit? I would greatly appreciate any hints.
Cheers, Rolf
Hi Rolf,
I will try to take a look at it this weekend, but in the meanwhile, I would take a closer look to your compilation process, because I quickly tried to reproduce the issue using the latest Windows distribution of WtDesigner and I don´t get any problem:
Hi Juan,
Thanks for looking into it if you find the time. I'll be searching on my compilation process and scanning through the sources for anything suspicious.
Another thing I noticed: if I attempt to change the slider's styleClass
to vertical orientation (Wt-slider-v
), the widget is displayed rather strangely and if I then refresh the whole project the styleClass
suddenly contains Wt-slider-v Wt-slider-h
. Does this happen on your WtDesigner too?
Maybe this hints to my other slider-issue above.
Cheers,
Rolf
Hi Juan,
sorry, I just realized that the slider orientation should be set with WSlider::setOrientation rather than with the styleClass
, so this is a different story which includes adding an interface to WSlider's orientation/setOrientation and making sure that the styleClass doesn't contain ambivalent Wt-slider-[vh]
due to Wt/PaintedSlider.
As to my issue above (maximum value): I'm still searching...
Unfortunately no, since my Ubuntu is running on 32-bit arch:
:~$ arch
i686
Is that a problem when building manually from sources?
I am sorry, I was not able to reproduce the error. But since it says it is a javascript error, makes me think that maybe it is related to the resources used in a WtDesigner project. Have you tried overwriting your with the ones from the source code of this project? See if that helps?
Thanks for the tip. Although I've been using the resources from your above mentioned source code all along, I tried overwriting the resources (also from newer wt versions). Unfortunately it doesn't help. I keep on getting Java Script errors when setting Slider maximum to ≠10. My current workaround is to leave it at 10, which at least allows me to save the <project>.wui
& ui_<project>.h
and then change the range manually within the app. Maybe this will be resolved once we migrate to other wt versions.
On the plus side I was now able to review your great WtDesigner code, so maybe I can contribute more in the future. I have added an interface for Slider's orientation & tickPosition, in case you're interested in this patch.
Cheers,
Rolf
Sorry I couldn´t be more helpful. And sure, any contribution is well received, please sent a pull request! Best, J.