X thunkable canvas work-around using HTML is useless if there isn't a "Webview_String" property


#1

I am presently looking into the eventual port of my “thunkable classic” Android app to iOS, and taken back by the absence of canvas in X thunkable, since this how large part of the functionality interfaces with the user.
While it is possible to rely on an HTML/Javascript file accessed by a “web viewer” component (and my app does actually use several such files already for computing performance reason, so that is a known factor) the point is that the X thunkable web viewer component lacks the “Webview_String” property. How can the rest of the app interface (input and output) dynamically with the HTML/Javascript if there is not means of communication?


#2

Hi @CBVG,

Thanks for the feedback - we’re constantly working to improve the quality and quantity of what Thunkable X has to offer so it’s very much appreciated.

As has been mentioned several times already in the community, we are working on updates to the Webviewer and in the process of developing out our gaming components - both of which should be available in the coming months.

In relation to your own app, please feel free to share it with us, along with a more general set of requirements rather than specifically saying you need a certain component. Since our two platforms are so different there may be alternative way to achieve this.

Thanks!


#3

My app is featured in the “SuccessfullyTHUNK’d” section, with two screen capture to illustrate:

(It is a big app: 5 screens, totals 7105 obsessively optimized blocks, relies on 7 HTML files, 4 of which having JavaScript code, and still managed to keep the apk at 4.55 M)

If you look at it, the white center section is a ‘canvas’ object. The user is ment to touch the white area where they want to insert or edit a dimensional unit, which is specified using various pull down menus or function keys. Which means that this area has to be interactive, continuously receiving new specifications from the application logic (“write ‘min’ for minute in blue at position X Y”), and sending information back to the code (“user tapped screen at location X Y”).
Additionally, there are several discrete functions that are working behind the scene, relying on web-viewer to load an HTML file that runs a JavaScript. One for those, for instance, is a heap sort utility that organizes all the units in order of recent use. With about 400 different units, the heap sort function was tested to take between 3.1 and 3.5 seconds to return an ordered list that could then be sub-sampled (retaining only the 20 most used units) and presented to the user in a list picker when the algorithm is written in ‘thunkable’ blocks; clearly 3 seconds is uncomfortably long to be practical as “short cut”, and the whole sorting process is handled by a JavaScript code that runs approximately 700 times faster.
But in order for this to work, I need the application front end to be able to pass the information to the HTML as a Webview string (the unsorted list), and for the front end to be able to receive the sorted list back once processed.

Both the canvas, and the ability to communicate bidirectionally with a Web_Viewer object exist in ‘thunkable classic’; my requirements is simply to have them work in a similar fashion with “x”.
Or, if you want it in more general terms, I would need an interactive component where I could write and draw at a specified X and Y location, and which would return the X and Y coordinate of the location touched in the form of a triggered event; and the ability to communicate and interface with another component like Web_Viewer, through a string (or list, number, object), the latter being the more desirable since I can emulate the former using HTML/JavaScript using a Web_Viewer as long as the from end can send and receive messages.