Questions tagged [transferable]

Transferable objects are JavaScript objects that can be transferred from one context to another without copying the underlying data.

30 questions
0
votes
0 answers

Custom file type is not showing "Open With"

I might be going insane, I followed so many tutorials and still my custom file type is not able to be opened within my app - Here is my custom UTType extension: extension UTType { static let reminderList: UTType = UTType(exportedAs:…
Brejuro
  • 3,421
  • 8
  • 34
  • 61
0
votes
1 answer

How to pass array of transferable objects i.e. buffer along with non transferable object i.e. json obj via web worker in JavaScript - postMessage()?

So, here is what I am trying to achieve: Call a specific function onMessage() in main thread from web-worker. Passing an array of transferable objects i.e. Uint16Array buffer, Float32Array buffer etc. Along with all of above, I want to pass a…
0
votes
1 answer

How to send transferrable object from web worker to parent in javascript?

In JS, I made a web worker, and want to send a transferable object back to parent. In the web worker, I have var NUMS = new ArrayBuffer(3); NUMS[0] = 10; NUMS[1] = 11; NUMS[2] = 12; postMessage(NUMS, [NUMS]); Then in the main thread, I…
omega
  • 40,311
  • 81
  • 251
  • 474
0
votes
1 answer

Is there a way to pass an array of objects to a web worker as a transferable object?

I'm working on a CPU and memory intensive project for which some of the processing is sent to a web worker in order to not hang the browser while its number crunching. The problem I am facing is that I need to send to the web worker instance a few…
0
votes
1 answer

how to pass multiple data in array as a transferable object

to pass single images to a worker thread I do something like the following var image = ctx.getImageData(0, 0, data.width, data.height)); var tData = new Uint8ClampedArray(data.width*data.height*4); tData.set(image.data); let…
ejectamenta
  • 1,047
  • 17
  • 20
0
votes
0 answers

Interoperation Python JavaScript RSA Encryption

Python with PyCrypto on Server, Tom Wu's JavaScript library on Client. http://www-cs-students.stanford.edu/~tjw/jsbn/ I can encrypt and decrypt in Python on Server, and do the same in JavaScript on client. But I cannot encrypt on the client and…
Axel
  • 9
  • 3
0
votes
0 answers

How to convert the whole jcomponent object to transferable?

I have a program in which I want to use drag and drop. I went through the java drag and drop documentation but I could not really find an answer for this. I want to use the TransferHandler. Basically what I am trying to do is transfer the whole…
TenebrisNocte
  • 179
  • 10
0
votes
1 answer

Custom deletion Container for Transferable and Transferhandler on JList

I tried to fix this issue for the past week but somehow I cant seem to find a solution. There is not a lot of information about this topic so its hard to find examples or code to look at. What I have here is a JList which uses a custom…
Dinh
  • 759
  • 5
  • 16
0
votes
1 answer

Javascript: How to use an array buffer with views to send transferable Objects

Lets say I have an arrays called (Arr1,Arr2) and the first array has 2000 objects that have the following {Cyclic:my.parent,string:"imAString",int:10,Position:{bunchofints}} lets say I wanted to define Arr2…
static660
  • 81
  • 1
  • 13
0
votes
1 answer

JavaScript Transferable Objects: Why doesn't the engine preserve the original instance?

I'm reading this article on web workers and I came across this section on Transferable Objects: With Transferable Objects, data is transferred from one context to another. It is zero-copy, which vastly improves the performance of sending data to a…
coder34
  • 403
  • 5
  • 16
0
votes
1 answer

Set clipboard to transparent image

I am creating a program that needs to copy an image to clipboard. The problem is that the image has a transparent background and, whenever I copy it, the image comes out with a black background instead of transparent. I tried lots of things since 2…
KON
  • 91
  • 12
0
votes
1 answer

Get DataFlavor[] from a custom DataFlavor

I want created a program that copies images from a folder into the clipboard, but the images become black. After doing some research, I found this: Clipboard copy from outlook always has black background set when retrieved as image from Java…
KON
  • 91
  • 12
0
votes
1 answer

Create svg DataFlavor in java with dataflavor image/svg+xml

So I want to create a DataFlavor that contains a string and has the mimetype image/svg+xml using java. I am not quite sure I get how the DataFlavor and mimetype are connected. I did not quite understand the Java tutorials 1. What I want is to be…
Kristoffer
  • 456
  • 5
  • 17
0
votes
2 answers

JavaScript Float32Array check if transferable object is neutered

I'm using transferable objects between my main thread and physics worker. The Float32Array is being passed back and forth and it works quite nice. How do I check if Float32Array is neutered? For example this is an array: this.transferableArray = new…
Pawel
  • 16,093
  • 5
  • 70
  • 73
-2
votes
1 answer

Posting Three.js meshes to web worker using javascript

I have an array on objects, meshes created with Three.js, that I want to do some operations in a web worker. So the questions is how do I post them to the worker? From what I understand there's something called transferable objects that uses…
arpo
  • 1,831
  • 2
  • 27
  • 48
1
2