GithubHelp home page GithubHelp logo

Comments (8)

jMarcS avatar jMarcS commented on June 23, 2024

I can give only a partial answer. The strings are always three letters and a colon. BACK is incorrect; the correct string is BAK.

When I get a chance I will read the sample programs to see how the data is extracted. My guess is that the programmer gets a string and lops off the first four characters to get the type, then uses the rest as data.

There is an error in res/raw/f37_html_demo; I think "STT" should be "STT:".

from de-re-basic.

mrleavitt avatar mrleavitt commented on June 23, 2024

BACK is now BAK. Thanks for the confirmation. I'll leave this open until you get a chance to look at the sample programs. Are the sample programs kept in a separate GIT repository? I know they're on the website for general retrieval, and I've got a recent copy, but I admit to not having played with them yet.

from de-re-basic.

jMarcS avatar jMarcS commented on June 23, 2024

The sample programs are in the same repository, but they're not source files ("src" directory), they're resource files ("res" directory, specifically "res/raw"). There are also a whole lot of program files up on Paul's ftp server, some from Paul and even more from forum users, that are not in a Git repo, although I think in the long run Paul wold like to move them. I understand there's some pretty great stuff up there from the community.

from de-re-basic.

jMarcS avatar jMarcS commented on June 23, 2024

There is an error in res/raw/f37_html_demo; I think "STT" should be "STT:".

Turns out it's more complicated than that. The code catches an "STT" (sic) datalink internally and starts a speech-to-text process, then creates a "DAT:" datalink to hold the resulting text. f37 doesn't have to check for STT. We can't make the description wholly consistent without fixing that, but since the document doesn't mention STT anyway it may not matter.

from de-re-basic.

jMarcS avatar jMarcS commented on June 23, 2024

I should not offer advice when I don't know the whole story! Your question in #33 makes it clear why STT is different from the other datalinks, as I described in my previous post.

I think the manual needs to explain what is meant by "datalink". That seems to be the focus of the confusion, both mine and yours. It would go in the "html.get.datalink" section. The list of valid datalink strings needs to include STT, because in the JavaScript it looks like the others, but as a special case - it's handled differently, and it needs a cross-reference to the speech-to-text section to explain why. Also, disregard my comment about "fixing" STT in the code - it's not broken, and changing it would break existing user programs. This will be about documenting what already is.

When Paul says to study sample code in f37, he's not kidding. For somebody who has done JavaScript in Android, that's probably enough, but one thing people like about BASIC! is that it makes Android more approachable. In this case that may take a few more words in the manual.

from de-re-basic.

mrleavitt avatar mrleavitt commented on June 23, 2024

Agreed. We need an explanation of datalink, or at the very least, a link to a clear explanation of datalink. So let's leave this one open.

from de-re-basic.

RFO-BASIC avatar RFO-BASIC commented on June 23, 2024

The message header strings returned are: BAK:, LNK:, ERR:, FOR:, DNL:, DAT:

The method for Extracting the message header and any following data should be obvious to the BASIC! programmer. The sample program, f37, has examples for doing this.

I am sending you an email with a (hopefully) better explanation of datalink and STT. I am sending my email because it has special characters that git-hub swallows.

from de-re-basic.

mrleavitt avatar mrleavitt commented on June 23, 2024

OK, so I added the following paragraph right before the actual description of the Html.get.datalink command. I expanded your introductory material without going too far into the weeds. Is it OK?

"A datalink provides a method for sending a message from an HTML program to the BASIC! programmer. There are two parts to a datalink in an HTML file: 1) the JavaScript that defines the datalink function, and 2) the HTML code that calls the datalink function. The BASIC! Program requires a mechanism for communicating with a website's HTML code."

from de-re-basic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.