Hi,
I’ve been working with WiseJ for a few years and just updated to WiseJ-4. I’ve never tried to tackle using Widgets, but latency issues have forced me to try now. I have a Windows Desktop vb.net app working on an Azure Server as a Web App. I recently discovered the benefit of using ChatGPT to help with coding, so I started there. The AI seemed to be well informed on WiseJ and I thought I had discovered a shortcut as I am not well versed in javascript. Instead, the result has been disappointing with the AI suggesting conflicting strategies and despite me pointing it to the WiseJ API, it seems to take its own path to helping me. Admittedly, I’m being lazy, but I am in a time crunch as I have employees who depend on the app and some drawing functions are too slow. I created a test project and it is failing by not finding the .js file. The test solution is attached.
I’m not asking for you to build my app but a few pointers would be appreciated.
Gerry
Thanks Julie! As I mentioned, this is my first try at this. The code make this look simple, add the widget, .js file, and a call, but I’m still unsure.
I added the “init” file OverlayCanvasWidget.js. In it’s Properties I set the Build Action to “Embeded Resource” and the Copy to Output Directory to “Copy if Newer”.
In the actual Widget I placed on my page I set the Package Name and Source, however in the InitScript, I’m not sure of the syntax of identifying the “init” file, which is “Scripts/Widgets/OverlayCanvasWidget.js”. I assume this is what it is looking for, but it doesn’t work. I can’t find in the documentation how to do this specifically.
Another suggestion or two would be helpful.
Thanks much!
Gerry
Try setting the InitScript of the widget to your js code
https://docs.wisej.com/api/wisej.web/content/widget#initscript
Please login first to submit.