Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

JavaScript Error #16

Open
pirx08 opened this issue Feb 8, 2017 · 8 comments
Open

JavaScript Error #16

pirx08 opened this issue Feb 8, 2017 · 8 comments

Comments

@pirx08
Copy link

pirx08 commented Feb 8, 2017

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)

Unfortunately I am running into at least one recurring error which I can't seem to get rid of. It is easily reproducible:

  1. start WtDesigner (opening default dummy project)
  2. select wt_root
  3. add a new WSlider
  4. select slider
  5. 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

@juangburgos
Copy link
Owner

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:

not_issue

@pirx08
Copy link
Author

pirx08 commented Feb 9, 2017

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

@pirx08 pirx08 closed this as completed Feb 9, 2017
@pirx08 pirx08 reopened this Feb 9, 2017
@pirx08
Copy link
Author

pirx08 commented Feb 9, 2017

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...

@juangburgos
Copy link
Owner

Hi,

Were you able to reproduce the issue with the precompiled linux version?

@pirx08
Copy link
Author

pirx08 commented Feb 10, 2017

Unfortunately no, since my Ubuntu is running on 32-bit arch:

:~$ arch
i686

Is that a problem when building manually from sources?

@juangburgos
Copy link
Owner

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?

@pirx08
Copy link
Author

pirx08 commented Feb 15, 2017

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

@juangburgos
Copy link
Owner

Sorry I couldn´t be more helpful. And sure, any contribution is well received, please sent a pull request!
Best,
J.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants