xTalkSince a long time, you've been able to run javascript in
by simply calling it through
Code: Select all
do [javascript code] with "javascript"
xTalkSince a long time, you've been able to run javascript in
by simply calling it through
Code: Select all
do [javascript code] with "javascript"
What worksrichmond62 wrote: ↑Wed May 07, 2025 3:09 pm https://forums.livecode.com/viewtopic.p ... 10#p234010xTalkSince a long time, you've been able to run javascript inby simply calling it throughCode: Select all
do [javascript code] with "javascript"
Emphasis mine: webtalk is written in javascript, but I haven't implemented the 'do [script] with ["javascript"]'. It would be doable, but not the applescript version.richmond62 wrote: ↑Wed May 07, 2025 3:09 pm This is also something that needs to be plugged both in the legacy IDE and any upcoming webTalk.
Code: Select all
put "JSON.stringify({x: 1, y: 2})" into tJS
do tJS as "javascript"
put the result into tResult
You misunderstand that one:plugging the legacy IDE in webtalk
Document Object ModelDOM
Yes, I re-read your post and see what you mean now. webtalk (being itself created in javascript) has more access to everything in javascript than LC does. The LC version is very limited in what it can achieve. (as above)richmond62 wrote: ↑Wed May 07, 2025 4:08 pmYou misunderstand that one:plugging the legacy IDE in webtalk
Plugging the possibility of using javascript inwith either the IDE or webTalk.
You asked, that's what it's called. The same as people don't often use the full phrase "Random Access Memory" - they use RAM instead.richmond62 wrote: ↑Wed May 07, 2025 4:08 pm Document Object Model
I love the way people use acronyms assuming that everyone knows what they stand for . . .
Code: Select all
do "[javascript]" as "JavaScript"
There's not much point, they'd likely want to point me towards using 'create' / zavvi (whatever it's called) and not relying on the legacy IDE and engine... but just worth mentioning that the do [script] as [alternative language] is a handy feature, but not fully-featured (there are things you can still achieve with it if you work around the limitations).
I'd say you have been moreso, with threats you received in the past. I haven't had any of that, but I have been told in no uncertain terms that no further help would be forthcoming.richmond62 wrote: ↑Wed May 07, 2025 6:33 pm Personally I see no real harm keeping one foot in the door: but, then, I have not been quite so badly burnt as you have.![]()
Which project did you use that license with?tperry2x wrote: ↑Wed May 07, 2025 5:52 pm This is partly the reason I've added specific conditions in my license agreement prohibiting use of my project by anyone affiliated with LC: they can do their thing, we can do ours. They've made that perfectly clear on multiple occasions that this is the way things are now.
Not any project here. The webtalk project specifically.FourthWorld wrote: ↑Wed May 07, 2025 8:09 pmWhich project did you use that license with?tperry2x wrote: ↑Wed May 07, 2025 5:52 pm This is partly the reason I've added specific conditions in my license agreement prohibiting use of my project by anyone affiliated with LC: they can do their thing, we can do ours. They've made that perfectly clear on multiple occasions that this is the way things are now.
Thank you. I like the two column format, very readable.tperry2x wrote: ↑Wed May 07, 2025 8:38 pmNot any project here. The webtalk project specifically.FourthWorld wrote: ↑Wed May 07, 2025 8:09 pmWhich project did you use that license with?tperry2x wrote: ↑Wed May 07, 2025 5:52 pm This is partly the reason I've added specific conditions in my license agreement prohibiting use of my project by anyone affiliated with LC: they can do their thing, we can do ours. They've made that perfectly clear on multiple occasions that this is the way things are now.
webtalk.tsites.co.uk
tperry2x wrote: ↑Wed May 07, 2025 8:37 pm Just to clarify, we were talking about in the LC / OXT legacy engine.
Not in emscripten or in a browser widget.
You can do very basic one-liner javascripts, or things which don't require extensive parsing and functions without a browser widget or anything. A bit like how you can also run applescripts too. (but again, only on MacOS).
Is that so? IIRC, I tried that at one point, since Apple included JXA (Javascript for automation) along with AppleScript, as a 'OSA' type language I figured that might work, but I got the impression it does not. But maybe it requires newer versions than I tried?In the emscripten build, I know you can indeed use javascript, but that's a separate thing altogether. What we were on about was using the 'do as alternative language' function in the legacy IDE. Not with any browser widgets, not with the emscripten build, and not with any LCB extensions - but instead with the native legacy IDE alone.
Well to be accurate, it does 'work' sort of, it just doesn't play well with modern window managers and GTK3/4 where it has off-screen render buffer to view port problems and keyboard focus issues. It's still includes a JS runtime in CEF and can still be useful for non-interactive-web things.(As I mentioned above in my reply, the browser widget does not work on Linux, however out of date that browser widget is now).
I think the reason is most likely the same reason that things like Heizer's LiveCard and SuperCard 'Roadster' were created back in the late 1990s, which is to deliver xTalk stack content via a web browser.probably the entire reason why the emscripten build exists, but that itself is likely using depreciated APIs if we were to dig through it.
Code: Select all
put alternateLanguages()
Code: Select all
do "console.log('test');" as javascript ; put the result
Code: Select all
do "'test'" as javascript ; put the result
Code: Select all
KeyboardEvent.keyCode, keyIdentifier
Code: Select all
document.addEventListener("keydown", function(event) {
if (event.keyCode === 13) {
console.log("Enter key was pressed");
}
});
Code: Select all
document.addEventListener("keydown", function(event) {
if (event.key === "Enter") {
console.log("Enter key was pressed");
}
});
Users browsing this forum: No registered users and 0 guests