Wanna Make Myself a "Widget"... but (OXT Lite)
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Wanna Make Myself a "Widget"... but (OXT Lite)
So I wanna slap together the smallest widget that I can that's got the weather, the news, maybe the stock market, possibly Gemini-esque junk (sounds like I can get an API key) and... that's the problem. If this thing interfaces with the Web, which it'd need to do, is the Web bit of OXT Lite (specifically, I am guessing is what I'll use) up for it? Up to date and Chromium and all that jazz?
I seem to remember talk of OXT Lite either going to another simpler lib, or something. Maybe Paul's edition would be the better idea.
So, instead of having 20 "apps" that all do one thing, I wanna make one that does them all. But it has to be able to fetch info from the Web, securely.
Hopefully that makes sense
Input from tperry2x and OpenXTalkPaul would be appreciated!
I seem to remember talk of OXT Lite either going to another simpler lib, or something. Maybe Paul's edition would be the better idea.
So, instead of having 20 "apps" that all do one thing, I wanna make one that does them all. But it has to be able to fetch info from the Web, securely.
Hopefully that makes sense
Input from tperry2x and OpenXTalkPaul would be appreciated!
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
As long as you aren't expecting linux users to use the browser widget, then I'd say you should be fine to use either OXT or OXT Lite.
This is only because, on OXT and OXT Lite, you'd have problems...
(or rather, users opening the stack / standalone produced with OXT & OXT Lite) would have problems in Linux.
You should be all good on Windows and MacOS though as far as I'm aware.
I'd very much appreciate a tutorial / walkthrough of how to actually do this too.
This is only because, on OXT and OXT Lite, you'd have problems...
(or rather, users opening the stack / standalone produced with OXT & OXT Lite) would have problems in Linux.
You should be all good on Windows and MacOS though as far as I'm aware.
I'd very much appreciate a tutorial / walkthrough of how to actually do this too.
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
By 'Widget', I'm guessing you mean using the Browser Widget, and don't mean writing an Extension Builder Widget module?overclockedmind wrote: ↑Tue Mar 26, 2024 7:52 am So I wanna slap together the smallest widget that I can that's got the weather, the news, maybe the stock market, possibly Gemini-esque junk (sounds like I can get an API key) and... that's the problem. If this thing interfaces with the Web, which it'd need to do, is the Web bit of OXT Lite (specifically, I am guessing is what I'll use) up for it? Up to date and Chromium and all that jazz?
I seem to remember talk of OXT Lite either going to another simpler lib, or something. Maybe Paul's edition would be the better idea.
So, instead of having 20 "apps" that all do one thing, I wanna make one that does them all. But it has to be able to fetch info from the Web, securely.
Hopefully that makes sense
Input from tperry2x and OpenXTalkPaul would be appreciated!
I've had the Browser Widget work OK for me on some Linux, but it goes all nutty on others.
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
I might have the wrong end of the stick here.
I thought of a way to maybe achieve a floating weather forecast stack (if that's what you wanted).
You could have this as a regular stack, with a custom window shape - perhaps a mask PNG, with a subtle blur to fade it into your desktop.
It could read HTTPS data every x minutes from a site that contains open-source weather data.
You could then write some custom script to translate the data into a format you can use and store in variables etc.
Then, have weather graphics that position themselves via script, depending on the data received.
If that's not what you mean, and I've got the wrong idea - can I clarify as what you mean by a widget. Do you mean making a widget that appears in the tools palette instead, that users can drop into their stacks?
There's lots of ways you could get Https data, using commands through the shell function that are common to all OSs (or at least return identical data with slightly varying shell syntax).
That way, you don't have to use a browser widget at all. You can also set the hideconsolewindows to true to stop any terminal / shell command windows from popping up.
I wouldn't necessarily advise using the built in URL reading commands included in the IDE as timeouts and things need to be handled. Running the fetch data commands through the shell function takes care of all of that by the OS for you.
I thought of a way to maybe achieve a floating weather forecast stack (if that's what you wanted).
You could have this as a regular stack, with a custom window shape - perhaps a mask PNG, with a subtle blur to fade it into your desktop.
It could read HTTPS data every x minutes from a site that contains open-source weather data.
You could then write some custom script to translate the data into a format you can use and store in variables etc.
Then, have weather graphics that position themselves via script, depending on the data received.
If that's not what you mean, and I've got the wrong idea - can I clarify as what you mean by a widget. Do you mean making a widget that appears in the tools palette instead, that users can drop into their stacks?
There's lots of ways you could get Https data, using commands through the shell function that are common to all OSs (or at least return identical data with slightly varying shell syntax).
That way, you don't have to use a browser widget at all. You can also set the hideconsolewindows to true to stop any terminal / shell command windows from popping up.
I wouldn't necessarily advise using the built in URL reading commands included in the IDE as timeouts and things need to be handled. Running the fetch data commands through the shell function takes care of all of that by the OS for you.
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Think a weather forecast getter with a whole lot of other different tabs for notes, all the junk I mentioned... but with a minimalist UI (maybe a tab per thingy)OpenXTalkPaul wrote: ↑Tue Mar 26, 2024 9:42 pmBy 'Widget', I'm guessing you mean using the Browser Widget, and don't mean writing an Extension Builder Widget module?overclockedmind wrote: ↑Tue Mar 26, 2024 7:52 am So I wanna slap together the smallest widget that I can that's got the weather, the news, maybe the stock market, possibly Gemini-esque junk (sounds like I can get an API key) and... that's the problem. If this thing interfaces with the Web, which it'd need to do, is the Web bit of OXT Lite (specifically, I am guessing is what I'll use) up for it? Up to date and Chromium and all that jazz?
I seem to remember talk of OXT Lite either going to another simpler lib, or something. Maybe Paul's edition would be the better idea.
So, instead of having 20 "apps" that all do one thing, I wanna make one that does them all. But it has to be able to fetch info from the Web, securely.
Hopefully that makes sense
Input from tperry2x and OpenXTalkPaul would be appreciated!
I've had the Browser Widget work OK for me on some Linux, but it goes all nutty on others.
Like a 90's version that's UI minimalist that doesn't pop fade whiz bang bounce and etc.
But yes, I do mean the Browser Widget. What's the best way we have for a non-"nutty" Browser Widget? Could we at least update the one we've got?
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Ooooh, see my post back to Paul, but there's some good stuff in here (do it on the command-line, not the Widget.)tperry2x wrote: ↑Tue Mar 26, 2024 10:25 pm I might have the wrong end of the stick here.
I thought of a way to maybe achieve a floating weather forecast stack (if that's what you wanted).
You could have this as a regular stack, with a custom window shape - perhaps a mask PNG, with a subtle blur to fade it into your desktop.
It could read HTTPS data every x minutes from a site that contains open-source weather data.
You could then write some custom script to translate the data into a format you can use and store in variables etc.
Then, have weather graphics that position themselves via script, depending on the data received.
If that's not what you mean, and I've got the wrong idea - can I clarify as what you mean by a widget. Do you mean making a widget that appears in the tools palette instead, that users can drop into their stacks?
There's lots of ways you could get Https data, using commands through the shell function that are common to all OSs (or at least return identical data with slightly varying shell syntax).
That way, you don't have to use a browser widget at all. You can also set the hideconsolewindows to true to stop any terminal / shell command windows from popping up.
I wouldn't necessarily advise using the built in URL reading commands included in the IDE as timeouts and things need to be handled. Running the fetch data commands through the shell function takes care of all of that by the OS for you.
I don't actually mind a bit of visual pizazz, but ALL THE THINGS drives me bonkers; just DO IT FOR CRIPE'S SAKE.
So we're thinking like wget/curl/something?
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
If using a Linux, use 64bit and used a distro that's known to work OK with the Browser Widget.overclockedmind wrote: ↑Wed Mar 27, 2024 12:57 am What's the best way we have for a non-"nutty" Browser Widget? Could we at least update the one we've got?
It works well enough for me use using Ubuntu Studio with KDE Plasma UI, it seems to work OK with XFCE Xubuntu builds too.
Other Linux distros, like ElementaryOS (which I like for its macOS like vibe, but they do a lot of things differently than other distros) it does weird things, seems to have trouble binding rendering to a stack's window. I think some of these problems may be with Wayland (versus the older X-win compositor). We need more testing to narrow these issues down.
I think Tom/OXT Lite may have updated something with the CEF Framework on Linux?
On macOS (since version 8 IIRC) the Browser Widget uses the macOS WebKit (Safari's engine).
Windows uses the Chromium CEF Framework just like the Linux build, but Windows version doesn't have any of the problems Linux version exhibits.
I don't use OXT for anything that needs to be secure or confidential, but for mixing some HTML /JS embedded within xTalk stack, and for just pulling some weather data available to general public from some site, even a two year old version of CEF Framework should be fine for that sort of thing.
Since you're mostly planning on just pulling data from Web APIs, probably JSON formatted, and then flowing the data into your own UI, you could and you might be better off using libURL or CURL CLI or similar instead of Browser Widget.
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Mentioning secure and confidential, I don't roll that way either, but say we wanted to save the app state / prefs outside the app in something like an AES-256 file that's password protected (so we could get "more" sensitive.) Any ideas on that kinda nonsense?OpenXTalkPaul wrote: ↑Wed Mar 27, 2024 1:36 amIf using a Linux, use 64bit and used a distro that's known to work OK with the Browser Widget.overclockedmind wrote: ↑Wed Mar 27, 2024 12:57 am What's the best way we have for a non-"nutty" Browser Widget? Could we at least update the one we've got?
It works well enough for me use using Ubuntu Studio with KDE Plasma UI, it seems to work OK with XFCE Xubuntu builds too.
Other Linux distros, like ElementaryOS (which I like for its macOS like vibe, but they do a lot of things differently than other distros) it does weird things, seems to have trouble binding rendering to a stack's window. I think some of these problems may be with Wayland (versus the older X-win compositor). We need more testing to narrow these issues down.
I think Tom/OXT Lite may have updated something with the CEF Framework on Linux?
On macOS (since version 8 IIRC) the Browser Widget uses the macOS WebKit (Safari's engine).
Windows uses the Chromium CEF Framework just like the Linux build, but Windows version doesn't have any of the problems Linux version exhibits.
I don't use OXT for anything that needs to be secure or confidential, but for mixing some HTML /JS embedded within xTalk stack, and for just pulling some weather data available to general public from some site, even a two year old version of CEF Framework should be fine for that sort of thing.
I mean, for right now, I'm thinking just for me, so there's little to worry over. But you never can be too sure.
Since you're mostly planning on just pulling data from Web APIs, probably JSON formatted, and then flowing the data into your own UI, you could and you might be better off using libURL or CURL CLI or similar instead of Browser Widget.
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
You can use OpenSSL from shell command, a quick search found this:overclockedmind wrote: ↑Wed Mar 27, 2024 1:50 am Mentioning secure and confidential, I don't roll that way either, but say we wanted to save the app state / prefs outside the app in something like an AES-256 file that's password protected (so we could get "more" sensitive.) Any ideas on that kinda nonsense?
Code: Select all
openssl aes-256-cbc -d -md md5 -in /Users/Desktop/encrypted.txt.enc -out /Users/Desktop/decrypted.txt
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Thanks. I know my way around the command line enough for a home server kinda thing, but every command? Pfft.OpenXTalkPaul wrote: ↑Wed Mar 27, 2024 2:13 amYou can use OpenSSL from shell command, a quick search found this:overclockedmind wrote: ↑Wed Mar 27, 2024 1:50 am Mentioning secure and confidential, I don't roll that way either, but say we wanted to save the app state / prefs outside the app in something like an AES-256 file that's password protected (so we could get "more" sensitive.) Any ideas on that kinda nonsense?Code: Select all
openssl aes-256-cbc -d -md md5 -in /Users/Desktop/encrypted.txt.enc -out /Users/Desktop/decrypted.txt
Should've Googled with the idea "command line" in mind though, my bad.
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Cool, glad to help. After 24+ years of dealing with Unix(es) (mostly the one underneath macOS) and some Linuxese, I'm still discovering new command lines things on a regular basis. I think I've looked at more command line stuff since getting involved with OXT project then ever before. It seems most things you might want a computer to do can be done from command line, which is great if you like typing lots of text at a command prompt (which I do not).overclockedmind wrote: ↑Wed Mar 27, 2024 2:36 amThanks. I know my way around the command line enough for a home server kinda thing, but every command? Pfft.OpenXTalkPaul wrote: ↑Wed Mar 27, 2024 2:13 amYou can use OpenSSL from shell command, a quick search found this:overclockedmind wrote: ↑Wed Mar 27, 2024 1:50 am Mentioning secure and confidential, I don't roll that way either, but say we wanted to save the app state / prefs outside the app in something like an AES-256 file that's password protected (so we could get "more" sensitive.) Any ideas on that kinda nonsense?Code: Select all
openssl aes-256-cbc -d -md md5 -in /Users/Desktop/encrypted.txt.enc -out /Users/Desktop/decrypted.txt
Should've Googled with the idea "command line" in mind though, my bad.
Further reading:
https://superuser.com/questions/1329658 ... th-openssl
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
I had an idea on how we can 'open up' making widgets possible for everyone.
Please see post https://www.openxtalk.org/forum/viewtop ... 7796#p7796
Please see post https://www.openxtalk.org/forum/viewtop ... 7796#p7796
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
This isn't flat out *stopping me* from making what I'm thinking of, but I'd sure have it up and running faster. A LOT FASTER.
Re: the thread you sent me to, just so we don't get completely, er, cross-threaded?
Re: the thread you sent me to, just so we don't get completely, er, cross-threaded?
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
I think anything that can help or at least make the process of making widgets easier has to be a good thing. It's only a rough idea at the moment, and nothing may come of it - depends on what Paul thinks. I didn't / wasn't meaning to step on his toes - I mean, he's put pages of info together on LC builder that widgets seem to be constructed in, and I didn't like to say 'sorry, I don't get any of that' (I was trying to be polite, funny really - as I tend to upset people most of the time, unintentionally).
But not meaning to ruffle anyone's feathers, and I'm sure that LC builder info makes sense to someone. It's just that I was investigating a potential easier / simpler way of doing things.
But not meaning to ruffle anyone's feathers, and I'm sure that LC builder info makes sense to someone. It's just that I was investigating a potential easier / simpler way of doing things.
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
On another forum, there was talk about setting up a way to make 'widgers' using ONLY xTalk, and NOT lcb . . .
Of course, at that point one could stop using the slightly ambiguous term 'widget' and simply call them 'new objects'.
Edit by moderator: made some edits to your post, removing a few phrases that we need to be mindful of.
Of course, at that point one could stop using the slightly ambiguous term 'widget' and simply call them 'new objects'.
Edit by moderator: made some edits to your post, removing a few phrases that we need to be mindful of.
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
I'm not against the idea of script-object-based 'Widgets' at all, Extension Builder is not the answer to everything and everyone. Most of the widgets I've made, like the Piano Widget, I had previously implemented in regular xTalk (I even had a HyperCard version of the Piano).richmond62 wrote: ↑Sat Apr 06, 2024 1:51 pm On another forum, there was talk about setting up a way to make 'widgers' using ONLY xTalk, and NOT lcb . . .
Of course, at that point one could stop using the slightly ambiguous term 'widget' and simply call them 'new objects'.
Edit by moderator: made some edits to your post, removing a few phrases that we need to be mindful of.
But we can already make custom controls 'widgets' with just regular xTalk/Grouped Controls, which is exactly what the DataGrid stuff is. I think all we really need to do is make the 'Object Library' into a 'Custom Objects'/User Tools palette so its functionality is more readily accessible.
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
OK. If on another forum...
... call it something else.
However, I don't think that in general, we should be comparing notes with... anyone really, unless they clash directly, then we want no such clash.
So yes, make it like XCMD/XFCN (I just spoke HyperCard 2.x) and give it the properly descriptive name, but not the same name.
*I* said widget. What I meant by it is a thing that gives you info you don't want to have to go obtain with a silly app, like Stocks, News, Weather, et al... to death.
I want to combine them all so I don't need twenty-something "apps" to tell me what I need to know for the day.
... call it something else.
However, I don't think that in general, we should be comparing notes with... anyone really, unless they clash directly, then we want no such clash.
So yes, make it like XCMD/XFCN (I just spoke HyperCard 2.x) and give it the properly descriptive name, but not the same name.
*I* said widget. What I meant by it is a thing that gives you info you don't want to have to go obtain with a silly app, like Stocks, News, Weather, et al... to death.
I want to combine them all so I don't need twenty-something "apps" to tell me what I need to know for the day.
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Certainly the term 'widget' is ambiguous and show GO. 'Widget' is used by MacOS for silly on-screen things that distract you from your work.
here's a few fairly daft alternatives:
1. Strap-on.
2. Sidecar.
3. Enhancement Package.
4. Outrider.
5. Rinaldi.
here's a few fairly daft alternatives:
1. Strap-on.
2. Sidecar.
3. Enhancement Package.
4. Outrider.
5. Rinaldi.
https://richmondmathewson.owlstown.net/
- overclockedmind
- Posts: 362
- Joined: Sat Apr 30, 2022 9:05 pm
- Location: Midwest US
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
A widget was also used in the late 1980s and 1990s (in my locale) to describe the thing that a company spit out. Their product.
That means? OXT is our "widget."
Now, do we have to call it that? No, but it still is.
That means? OXT is our "widget."
Now, do we have to call it that? No, but it still is.
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win10 Pro, Current)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2 and Linux Mint)
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Wanna Make Myself a "Widget"... but (OXT Lite)
Whenever I hear the term widget, I think of the thing that went inside cans of beer (J. Smiths?).
Who is online
Users browsing this forum: No registered users and 0 guests