Comments (16)
Here's some code:
onMouseDown of my cxGridView:
`myFileDropSource.Files.Clear; // = tEmptyDropSource where a tvirtualdataformatadapter is connected
TVirtualFileStreamDataFormat(myVirtualDataformatAdapter.DataFormat).FileNames.Clear;
TVirtualFileStreamDataFormat(myVirtualDataformatAdapter.DataFormat).FileNames.add(vdatei); // add some virtual filenames
// manage also a internal list with these filenames, which will be created at myEmptyDropSourceGetData..
// Start the drag operation.
myEmptyDropSource.Execute();`
On the other side, at the form2 i have a tDropComboTarget where the onDrop event is never gets called after your change.
from the-drag-and-drop-component-suite-for-delphi.
can you check the new sources again please
from the-drag-and-drop-component-suite-for-delphi.
you find my email on my github profile
from the-drag-and-drop-component-suite-for-delphi.
do you have a sample application please?
i changed it, because it produces a memory leak
from the-drag-and-drop-component-suite-for-delphi.
I use this in my big project so no small demo but changing it back solved problems on my side, don't know why but now it works
from the-drag-and-drop-component-suite-for-delphi.
i can't reproduce it without any informations about the code in the involved eventhandler. the best way is, you can provide a little demo.
from the-drag-and-drop-component-suite-for-delphi.
With your latest changes drag&drop within same app from two different forms is working again. So it seems that this bug is solved.
from the-drag-and-drop-component-suite-for-delphi.
Stop. Not solved. Crazy. Within same app it works without problems. If i start the same app twice and try to Drag&Drop from one to the other, sometimes it works, sometimes it does not.
from the-drag-and-drop-component-suite-for-delphi.
And it seems that the last started app can Drag&Drop TO the first started app but the first started can't Drag&drop files TO the last started app.
from the-drag-and-drop-component-suite-for-delphi.
ok, i will switch back to the origin code
from the-drag-and-drop-component-suite-for-delphi.
And both apps can drag&drop within the same app from different forms without any problems inkluding our own clipboardformat and dataformat. from one app to the other the own clipboard- and dataformat is not available
from the-drag-and-drop-component-suite-for-delphi.
and the origin code works as expected in both cases?
from the-drag-and-drop-component-suite-for-delphi.
Will try to do the same, two started exe files and drag&drop between them between different forms within the applications. I had not tested this before your update. After your change it started working within same app and different forms ... as i can remember i had no problems from different apps but will try it again.
from the-drag-and-drop-component-suite-for-delphi.
If i drag and drop to second app, than the debugger (second started app) shows that the on getStream of virtualdataadapter is called and it returns the stream without problems but this stream is never received on app where drop is made:
procedure TmxDateianlagen.VirtualDataAdapter_OnGetStream(Sender: TFileContentsStreamOnDemandClipboardFormat; Index: integer; out AStream: IStream);
var
Stream:tStream;
vMemStream: TMemoryStream;
vFileStream: tFileStream;
vmindex:longint;
begin
// This event handler is called by TFileContentsStreamOnDemandClipboardFormat
// when the drop target requests data from the drop source (that's us).
try
try
AStream := nil; vMemStream:=tdateianlagen.FastSave2Memorystream(vmindex); // get the stream of file
Stream:=vMemStream;
if Stream.Position=0 then begin
Stream.position:=Stream.size;
end;
// ...and return the stream back to the target as an IStream. Note that the
// target is responsible for deleting the stream (via reference counting).
AStream := TFixedStreamAdapter.Create(Stream, soOwned);
finally
setlength(vlist,0);
end;
except
on e:Exception do begin
bottompanel.caption:=bottompanel.caption+',Ex:'+e.message;
if assigned(Stream) then Stream.Free;
raise;
end;
end;
end;
from the-drag-and-drop-component-suite-for-delphi.
Can i send you a private demo, i have extracted a some functions into a demo but don't want that to be online. It is a demo with two cx-grids. You can drop a file from explorer into both + drag&drop links between them (internal clipboardformat, dataformat). If you start this app again and try to drag&drop from first app grid to second app grid it does not work.
from the-drag-and-drop-component-suite-for-delphi.
thank you, i need to modify your demo, i must remove the components, that i don't have
from the-drag-and-drop-component-suite-for-delphi.
Related Issues (20)
- readme.md outdated
- "VirtualFileStream" demo Source to browsers triggering "OnGetStream" many times
- donot work in win7 win8 win10 with UAC HOT 2
- TDropComboTarget; Bitmaps
- TDropFileTarget: Abort notification? HOT 2
- Evicense of "Use after free" HOT 1
- Two annoying memory leaks reported
- Assertion error in latest DragDrop.pas
- Memory leak: TDataFormatClasses
- Need help to generate C++Builder files HOT 2
- TDropFileTarget.MultiTarget fails in some cases HOT 4
- When a file is dragged from within 7-zip to my target, TDropPIDLTarget returns parent folder PIDL instead of item PIDL HOT 2
- Delphi 12 Packages? HOT 2
- Please Put it in GetIt
- Installation / Delphi XE2 and Delphi 11.3 HOT 9
- Please make the installation instructions a little more helpful
- TDropComboTarget: Full Filename path of outlook attachments
- Errors installing in Delphi 12.1 and 11.3 HOT 2
- Issue: Drag Drop Suite needs Outlook and the File Explorer to have Administrator rights to work
- TDropComboTarget : Unable to drop the zip file from the disk to application and Data.Count is zero
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from the-drag-and-drop-component-suite-for-delphi.