Quickview for Mac?

All flavors welcome.
Forum rules
Be kind.
micmac
Posts: 121
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Quickview for Mac?

Post by micmac »

Hi there

Would it be possible to add Quickview to Mac version so you could see the first window?

Thanks

Mic
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Quickview for Mac?

Post by richmond62 »

The first window of what?

Can you be a bit more explicit?
https://richmondmathewson.owlstown.net/
micmac
Posts: 121
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Re: Quickview for Mac?

Post by micmac »

The stack window

thanks
Michael
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Quickview for Mac?

Post by richmond62 »

I assume you mean the first CARD of a stack?

This is why I was unclear what you meant.
https://richmondmathewson.owlstown.net/
micmac
Posts: 121
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Re: Quickview for Mac?

Post by micmac »

About 99.9% of my stacks have only one card

Mic
xAction
Posts: 285
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Re: Quickview for Mac?

Post by xAction »

What's Quickview? Like a preview of an application? Like Album covers for apps?
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Quickview for Mac?

Post by tperry2x »

Or, do you mean like quicklook on the Mac, where you can select an icon of a file on the desktop, press space for quicklook? Did you mean you wanted a preview of the contents of card 1 of the stack in the macOS finder?
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Quickview for Mac?

Post by OpenXTalkPaul »

micmac wrote: Fri Mar 01, 2024 2:06 pm About 99.9% of my stacks have only one card

Mic
What is unclear is what exactly do you mean by "add Quickview to Mac version". What is Quickview?
Do you mean a QuickLook preview?
As seen here: https://support.apple.com/guide/mac-hel ... h14119/mac
?
If I recall correctly adding Quicklook would mean creating a .QLImporter for our file type(s) and would mean generating some image to use as a preview for a 'card 1' in QuickLook.
I do think that adding a QuickLook support would be a very useful in the macOS finder and file dialogs.

For some time I've also thought about OXT having something like that Stack/Cards thumbnails view that HyperCard, where it would zoom a stack window out, so you that user could see preview thumbnails of every card in a stack, which was a lot like how multiple virtual desktops (called 'Spaces' on macOS) are managed in some modern computer OSes...HyperCard did that decades early.
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Quickview for Mac?

Post by tperry2x »

Rather more simply, it could also export an image of the rect of the stack and set it as a custom icon, then when previewed via quicklook it'll show that icon.

That could be triggered via an applescript upon the stack being saved on MacOS.

Could be used in Windows too for a preview when hovering over the taskbar, and in Linux when hovering over a window in a panel.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Quickview for Mac?

Post by OpenXTalkPaul »

tperry2x wrote: Fri Mar 01, 2024 4:59 pm Rather more simply, it could also export an image of the rect of the stack and set it as a custom icon, then when previewed via quicklook it'll show that icon.

That could be triggered via an applescript upon the stack being saved on MacOS.

Could be used in Windows too for a preview when hovering over the taskbar, and in Linux when hovering over a window in a panel.
No AppleScript needed! That can be done on MacOS with xTalk + OXT Mac Native Tools library,.
I added the capability to set custom Finder icons on arbitrary files/folders/bundles to that library while I was working on that OXT Apple Imaging library last year.
But I think it's a valid point that creating an actual QuickLook plug in, and dealing with code signing/ quarantine bits that comes with that, is may be more trouble than it's worth. But a QuickLook plugin CAN show more info than just a preview image, such a QLimporter thing could also show script-only stack's script content directly in the Finder, but with an image preview only it would still basically look like this:
ScriptOnly.jpg
ScriptOnly.jpg (28.69 KiB) Viewed 346 times
https://developer.apple.com/documentation/quicklook
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Quickview for Mac?

Post by tperry2x »

So, would you have a preference within OXT that toggled between "show preview image of stack layout in Quicklook" and option 2 "Show preview image of stack script in Quicklook".

As you say, it could then show things like the handlers in a stack, or other info such as number of cards etc.

This is all assuming Quicklook is what Micmac meant, before I get carried away :D
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Quickview for Mac?

Post by OpenXTalkPaul »

tperry2x wrote: Fri Mar 01, 2024 5:31 pm So, would you have a preference within OXT that toggled between "show preview image of stack layout in Quicklook" and option 2 "Show preview image of stack script in Quicklook".

As you say, it could then show things like the handlers in a stack, or other info such as number of cards etc.

This is all assuming Quicklook is what Micmac meant, before I get carried away :D
Well, it's a separate Quicklook plug-in binary (bundle) that gets added along with any other QLplugins, you build it install it, then QuickLook asks it for a preview of one of its file type's contents and it generates the preview, could be image or text or a media player window, depending on file type. So we have two file types, I would think we would want to show an image for a binary .oxtstack/.rev/.livecode preview, and show a script-only .oxtscript / .livecodescript or .lc ( oxt server version) type as text.

Regardless of what was meant, it could be cool feature to have.
https://developer.apple.com/documentation/quicklook
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Quickview for Mac?

Post by OpenXTalkPaul »

QuickLook can be extremely handy if you add in some good general purpose QuickLook plug-ins.

To get a list of all of QL Plugins already currently installed on your Mac,
from OXT use:

Code: Select all

put shell("qlmanage -m plugins")
Good article that lists some handy QL plugins for macOS developers:
https://htr3n.github.io/2018/07/handy-quicklook/

I used to have one that could play MIDI files directly in the Finder, but it used QuickTime Music Instruments so it stopped working after Apple stopped supporting that.
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Quickview for Mac?

Post by tperry2x »

An interesting idea, and good to have in MacOS. What about the equivalent for Windows and Linux though?

Taskbar previews in Windows 7 / 10 and 11, and stack windows shown in a panel in Linux I mean. (although Linux mostly takes care of this itself on some distros, but not all).

Just because custom document icons aren't a thing in Windows or Linux on a per-file basis, so it'd have to write a preview into the stack file I suppose. Would that break compatibility or the entire stack file format I wonder?
micmac
Posts: 121
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Re: Quickview for Mac?

Post by micmac »

tperry2x wrote: Fri Mar 01, 2024 4:59 pm Rather more simply, it could also export an image of the rect of the stack and set it as a custom icon, then when previewed via quicklook it'll show that icon.

That could be triggered via an applescript upon the stack being saved on MacOS.

Could be used in Windows too for a preview when hovering over the taskbar, and in Linux when hovering over a window in a panel.
QuickLook of course, not Quickview

Tom - the method you describe will only give a small view of the window/page... as Paul also have pointed out.
(I had already tried it)

Mic
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Quickview for Mac?

Post by OpenXTalkPaul »

micmac wrote: Fri Mar 01, 2024 10:16 pm
tperry2x wrote: Fri Mar 01, 2024 4:59 pm Rather more simply, it could also export an image of the rect of the stack and set it as a custom icon, then when previewed via quicklook it'll show that icon.

That could be triggered via an applescript upon the stack being saved on MacOS.

Could be used in Windows too for a preview when hovering over the taskbar, and in Linux when hovering over a window in a panel.
QuickLook of course, not Quickview

Tom - the method you describe will only give a small view of the window/page... as Paul also have pointed out.
(I had already tried it)

Mic
OK so I spent a little time today looking into the state of QuickLook plug-ins o macOS.

It seems that the old QuickLook methods of a making 3D party QL plugin by building a provider binary '.QLgenerator plugin', andd then installing it, has been deprecated, but can still be done (remove quarantine bit). Apple has deprecated large parts of or significantly changed the QuickLook system significantly. It seems to be becoming part of their Apple Vision augmented reality thing now. At least Apple is still using the QuickLook, but it seems they're shifting it to force common data types to have the OS decide how to display it (not so much for 3rd party plugins anymore?). I don't know the macOS is so much more locked down then it was in 10.5 (when QuickLook was first introduced).

So the way it seems to work nowadays is that your app can still make custom previews for custom data types that you define, then you provide them as previews either by passing either a special QLView Object, or you can pass data in one of the system supported formats (such as PDF, or .HTML, .PNG etc.). I't's not real clear how it wrks, but I'd say that it could possibly be built as some FFI Extension handlers in and Extension Builder module.

I'm still not sure it's worth the effort, there are existing general purpose Quicklook Plugins that can preview bunches of different data types. Check out the one called "QLStephen", it looks like it allows you to define add your own filetypes and associate them to UTI (like MIME) data type identifiers, so it knows for example that .c is a C source code file and should display those as text (I think that one does syntax coloring as well?).

As for supporting embedding or including in some way a cross platform image preview of a Stack, I'm not sure how we could go about doing that in a cross platform way. I know that HyperCard's stack file format did included embedded 'card bitmap of a card' (in previously undocumented 'WOMBA' format, the name stands for Wrath Of Bill Atkinson ), those hypercard stack converters extract those 1-bit images.
micmac
Posts: 121
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Re: Quickview for Mac?

Post by micmac »

Thank you Paul for your extensive examination

The plugin you mention seams not to exists anymore.
It also looked to be text based.

Thanks
Mic
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Quickview for Mac?

Post by richmond62 »

Actually I cannot see the point of this discussion (at least re Macintosh):
-
Screenshot 2024-03-02 at 10.53.43.png
Screenshot 2024-03-02 at 10.53.43.png (266.15 KiB) Viewed 277 times
-
MacOS 12 Monterey.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Quickview for Mac?

Post by richmond62 »

OOOOOH: this is a bit odd, insofar as when I cracked open Paul's OXT all the OXT Lite stacks suddenly acquired OXT icons rather than OXT Lite ones:
-
Screenshot 2024-03-02 at 11.19.30.png
Screenshot 2024-03-02 at 11.19.30.png (256.81 KiB) Viewed 273 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Quickview for Mac?

Post by tperry2x »

As mentioned previously about having two applications that are both trying to set an icon according to their plists. This type of confusion is common, and it's why I don't keep multiple versions of the same thing.

I don't mean the same thing... let me clarify...

As far as MacOS is concerned, because OXT RCx and OXT Lite both have .oxtstack file extensions, they will fight for control of how the icon is represented. Usually depending on which version you access last being the dominant one. This includes opening the folder containing the app sometimes, or mounting the DMG containing the app, or using quicklook on the app - basically, anything that causes the plist of the app to be read by the OS.

(I can get the same thing with other apps, that have different versions and different icons too). If you have multiple versions of xCode on your computer (as I do at the moment), there's slight differences between the ".xcodeproj" icons between different versions. It regularly alternates between these, depending on what version of xCode I've last opened (or even opened via the Apple + Space shortcut, or via launchpad).

To get around this as far as OXT is concerned, I could / should use a different file extension for oxt Lite. Perhaps ".oxtl" for stacks and ".oxts" for script only stacks, to keep things simple? That way it'll have it's own icon for stacks which will be different to what Paul's ".oxtstack" icons are. This comes back to programs fighting for dominance.

I did mention this once before (can't find the post now), but I think the consensus was that it didn't matter because generally everyone is choosing "File" > "Open" anyway, rather than double-clicking and relying on the OS to work out what program it should open in.

It might be a bit of a moot point anyway, because the chances of a user who isn't doing extensive testing of OXT having both (or multiple versions of OXT) on their computer might be quite low anyway, so might not be an issue that will affect most people.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests