[6.0.0.13] OnDragnDropFromControl Event not called

Started by stephan_35, November 20, 2009, 03:08:48 AM

Previous topic - Next topic

stephan_35

Oops, Sorry, i didn't try the [Shift] key with keypressed Event.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

stephan_35

I tried KeyDown Event, but Failed !!!

Is there any dcl order to catch wich key was pressed [Shift] or [Ctrl] ???

Best regards
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

Quote from: stephan_35 on December 09, 2009, 03:00:54 PM
Is it possible by returning 5 , to enable copy and move, but with no delete the selected node ?

The return value is a bit field, so 5 would not work. It would probably be possible to invent some value with special meaning, but it seems like a lot of work with a lot of potential for problems.

It doesn't seem logical to not delete the original object when the user believes they are moving it. This may be good enough in your specific case, but it's very bad programming in my opinion.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

#48
Quote from: owenwengerd on December 09, 2009, 06:21:02 PM
It doesn't seem logical to not delete the original object when the user believes they are moving it. This may be good enough in your specific case, but it's very bad programming in my opinion.

Is it allowed to give an example?

I have a tree control with layerthemes. In each theme there is a layergroup with all containing layers which are not sorted into other layergroups yet (for drawing order) named "not sorted layers". It's like the layer 0 in each drawing. But the user can create own layergroups in each layertheme and move layers from one group into another within a single layertheme.

Since I see all the layerthemes in the tree, my boss asked me how to copy a layergroup from one layertheme to another. So we came to the conclusion:
- dragging a layergroup within a single layertheme means sorting the moved layergroup to an other position in the drawing order of the layertheme > move method
- dragging the layergroup from one layertheme to an other layertheme means to copy the layergroup with its properties and contained layers into the destination layertheme > copy method
- it is not allowed to copy the layergroup named "not sorted layers" between different layerthemes.

My problem is: to decide whether copy, move or allowing nothing is only possible in the OnDragnDropFromControl event and not yet in the OnDragBegin (because I still don't know, where the user will the picked item drop at).

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

stephan_35

Quote from: Fred Tomke on December 09, 2009, 11:35:49 PM
My problem is: to decide whether copy, move or allowing nothing is only possible in the OnDragnDropFromControl event and not yet in the OnDragBegin (because I still don't know, where the user will the picked item drop at).

Yes Fred, That is our both trouble !!!  ;D

OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

stephan_35

Deleting node on user action should be forbidden !!!

As soon we can check where the user drop node, we can take decision , yes or no , delete selected node .

And delete selected node before knowing if action was authorised doesn't seem logical , isn't it ?

Sorry to insist on this point, but it seems to be the center of our troubles.

Especially this is true for all actions DragnDropFromControl from controls wich it is authorised from ...

Thanks .

Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

Fred, what you describe is exactly as I understand it. The user must be allowed to choose whether to copy or move depending on the response to OnDragnDropBegin, and the developer must be allowed to choose which action(s) are allowed based on the drop point as the user drags (not after it is dropped, as Fred suggests).

I understand the problem that Fred describes. I also know how to fix it by breaking existing code. My goal is to make sure that any solution resolves Stephan's need as well (which as I underestand is slightly different than Fred's).

I'm trying to find a solution that solves the problem without breaking existing code, but that may not be entirely possible. If not, I want to be sure to minimize any breaking changes.

At this point, I think the best way to go forward is for me to implement something, then see if it works for both of you.

Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

Quote from: owenwengerd on December 10, 2009, 08:14:13 AM
[...] I'm trying to find a solution that solves the problem without breaking existing code [...]
Owen, thanks for your efforts and your patience with us, but sometimes new goals cannot be reached without leaving the current position even if some are crying. And I'm sure that it is possible to adjust existing code for everyone who wants to earn the benefits of the new runtime. As you already know, I'd do anything to keep my code working. And I must honestly say, I'd like to play "God of my code" (and anywhere else, of course  ;D ), and the less OpenDCL will do at this point, the less I'd have to manage afterwards. But that is my personal view and so it does not mean anything speacial. But the practice will show that futurely.

Stephan, I'd say, let's wait for the next Build(s) or how long it will take Owen to change and let's create a tutorial for that which also we can follow futurely. This tutorial can be a base to test the new features as well as a sample for adjusting existing code.
Stephan, when I saw you last remembered that it is an Alpha release? I do only use the Alpha just for testing, not for production, and certainly not for deploying, so there's still much time for testing and tuning up the code. We all need the time. We should spend the time. That's my point of view.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

stephan_35

Hello to everyone.

Of course I also thank Owen for all this dedication and all that time spent on developing OpenDCL.

To date, I assume full use made of my use of an alpha version in production, it complies fully with some of my requirements.
And to get there, sometimes with a little programming chivalrous. (not translation)

This will involve rewriting some lines of my code if that happens!

I believe in OpenDCL is a great tool!

Now, from my side, I lean on a test tool for future versions of OpenDCL, like a checklist, it will require some work on my side, but I'll be able to validate the next versions.

Best regards.
Thank you to everyone.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

Fred Tomke

Stephan, I'd be glad to invite you for a small tutorial for a drag and drop sample. Not today, but soon.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

In Alpha 16, I've added a new OnDragOverFromControl event for you guys to test. (I haven't tested it, so be warned that it might not work!)
Owen Wengerd (Outside The Box) / ManuSoft


Fred Tomke

Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

stephan_35

Hello,

I've got this error message ....

I don't really know if it's come from my computer or from opendcl.

Thanks

OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

stephan_35

Failed with :
OpenDCL.Studio.ENU.6.0.0.16

Work with :
OpenDCL.Studio.FRA.6.0.0.16

What is different between them ? (after language  ;D)

Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql