URL drop events on MacOS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

URL drop events on MacOS

Eliot Miranda-2
 
Hi All,

    I'm plumbing in support for launching the macos application via URL scheme drop events/apple events.  I'm asking for review.  I think the right way to go is to piggy back off of EventTypeDragDropFiles rather than add another kind of event.  If so there's a fork in the road.  Either use SQDragDrop (see sq.h) and dropRequestFileName and have dropRequestFileName answer a name prefixed with 'url:', or add e.g. SQDropUrl and add primitiveDropRequestURL/dropRequestURL to the DropPlugin.  Opinions?
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: URL drop events on MacOS

johnmci
 
When we did Sophie we just passed every reference to an asset as a URL  so a file: or a url: or a memoryFile: which was very handy to push a blob of data as a file or zip entity. The concrete class for streaming the URL would do the right thing. 

Sent from ProtonMail Mobile


On Mon, Jan 4, 2021 at 20:01, Eliot Miranda <[hidden email]> wrote:
Hi All,

    I'm plumbing in support for launching the macos application via URL scheme drop events/apple events.  I'm asking for review.  I think the right way to go is to piggy back off of EventTypeDragDropFiles rather than add another kind of event.  If so there's a fork in the road.  Either use SQDragDrop (see sq.h) and dropRequestFileName and have dropRequestFileName answer a name prefixed with 'url:', or add e.g. SQDropUrl and add primitiveDropRequestURL/dropRequestURL to the DropPlugin.  Opinions?
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: URL drop events on MacOS

Eliot Miranda-2
 
Hi John,

On Jan 4, 2021, at 9:43 PM, John M McIntosh <[hidden email]> wrote:

 When we did Sophie we just passed every reference to an asset as a URL  so a file: or a url: or a memoryFile: which was very handy to push a blob of data as a file or zip entity. The concrete class for streaming the URL would do the right thing. 

Good to know; thanks.  That suggests to me I should add a primitiveDropRequestURL/dropRequestURL primitive to the DropPlugin and that that would answer results in url format, prepending file:// for files etc. primitiveDropRequestFile would remain for backwards compatibility. Make sense?


Sent from ProtonMail Mobile


On Mon, Jan 4, 2021 at 20:01, Eliot Miranda <[hidden email]> wrote:
Hi All,

    I'm plumbing in support for launching the macos application via URL scheme drop events/apple events.  I'm asking for review.  I think the right way to go is to piggy back off of EventTypeDragDropFiles rather than add another kind of event.  If so there's a fork in the road.  Either use SQDragDrop (see sq.h) and dropRequestFileName and have dropRequestFileName answer a name prefixed with 'url:', or add e.g. SQDropUrl and add primitiveDropRequestURL/dropRequestURL to the DropPlugin.  Opinions?
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: URL drop events on MacOS

johnmci
 
Yes

Sent from ProtonMail Mobile


On Tue, Jan 5, 2021 at 08:55, Eliot Miranda <[hidden email]> wrote:
Hi John,

On Jan 4, 2021, at 9:43 PM, John M McIntosh <[hidden email]> wrote:

 When we did Sophie we just passed every reference to an asset as a URL  so a file: or a url: or a memoryFile: which was very handy to push a blob of data as a file or zip entity. The concrete class for streaming the URL would do the right thing. 

Good to know; thanks.  That suggests to me I should add a primitiveDropRequestURL/dropRequestURL primitive to the DropPlugin and that that would answer results in url format, prepending file:// for files etc. primitiveDropRequestFile would remain for backwards compatibility. Make sense?


Sent from ProtonMail Mobile


On Mon, Jan 4, 2021 at 20:01, Eliot Miranda <[hidden email]> wrote:
Hi All,

    I'm plumbing in support for launching the macos application via URL scheme drop events/apple events.  I'm asking for review.  I think the right way to go is to piggy back off of EventTypeDragDropFiles rather than add another kind of event.  If so there's a fork in the road.  Either use SQDragDrop (see sq.h) and dropRequestFileName and have dropRequestFileName answer a name prefixed with 'url:', or add e.g. SQDropUrl and add primitiveDropRequestURL/dropRequestURL to the DropPlugin.  Opinions?
_,,,^..^,,,_
best, Eliot