-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BE_ClipboardSetText multiple types #178
Comments
This sounds like a really interesting idea. I'm not sure what the use case is though, whenever I've set a clipboard it's because some other applications wants a specific type, so multiple types has never come up. I don't think we have a multiple type option parameter system for any of the function calls either, so a generic way to handle these, with the [] brackets would be interesting, and could possibly by re-used elsewhere. That said, I'm not sure the plugin API handles them. Let us know how you go. That said, a way to implement this that would be similar to existing functions and easier to implement would be a BE_ClipboardSetText ( text ; format { ; append } ) option. That way we can have the append default to false, and if true it would only overwrite the current format, not the whole clipboard. I don't know if the various Mac/win/ios clipboards allow this easily, but in terms of the plugin end, this would seem a simpler way to go about it. Let us know how it goes, and feel free to submit a patch. Cheers, |
@nickorr Thanks for the comments! Details on Use CaseI have a very advanced sales quote application where I've written a copy/paste implementation inside of a FileMaker portal. Users are able to select multiple lines by SHIFT+click or CTRL+click, and then copy/cut them and paste them elsewhere in the portal. I'm doing that by using a custom clipboard format that contains a JSON object defining all of the parameters needed and BE_ClipboardSetText. In my paste implementation I find out if the clipboard contains my custom format, and then perform a different action than when a user has text on their clipboard. I want to add the ability to also select and copy the lines of a quote to Excel or an HTML version to paste into an email at copy time since I won't know where the user is going to paste. Each of those applications expect a different clipboard "format." I mostly understand what the format is and I can copy out to those applications as long as I put a card window that my users can use to pick which program they're going to copy to, but I'm trying to simulate the same functionality that exists in most other programs for a better UX. Other commentsAh, I like the append option! Let me see how you guys are doing that in other functions and I'll see if I can mirror it. Are you thinking that you'd call |
Excellent, sounds good. Have a look at the other code, and let us know if you have any questions. And yes, I'd expect then that you'd call the set text multiple times, one for each format, and only the first one would have append set to false. Cheers, |
@nickorr - not sure if I should ask to reopen this, or start a new issue. Let me know if I should move this to a new Issue. It is marked as Closed, but I don't think the "append" option has been added, as of version 5.0.0. Are you still possibly considering adding that? Explanation: Again, I'd be happy to start a new Issue instead, if that makes sense. Or, if you don't think this is something that makes sense for BaseElements, I can see that, too. |
I'm happy to re-open this. @belac9615 - did you get anywhere with the fork and looking at the code base for this? I've done a heap of work on docs to compile the plugin it which will be of interest to you - let me know if you want a quick run down. Cheers, |
It would be great if we could set multiple Pasteboard or "clipboard" types all at once, similar to how Excel sets the Pasteboard. That way we as FM developers could increase our interoperability with other apps on the system by writing handlers to copy table/portal text to Excel or an email client. We could also facilitate copy/paste functions within our FM apps using our own custom clipboard types.
The proposed change would take a new input to prevent compatibility issues with existing use of the functions. Something as follows would work and be easily understandable by FM developers :
I'm unfamiliar with the plugin's codebase, and I haven't developed FM plugins in the past so I don't know how hard this will be. I'll fork the repo and see if I can get it working on macOS and Windows.
Do the existing developers have any suggestions? Have you tried this before and run into any roadblocks?
The text was updated successfully, but these errors were encountered: