DragnDropBegin doesn't catch the selected item [6.0.0.2]

Started by stephan_35, September 01, 2009, 04:04:12 AM

Previous topic - Next topic

stephan_35

Hello Owen,

After several try, getSelectedItem return item after the Drag & Drop Action, so , it's feel like DragnDropFromControl event before modification.

With 6.0.0.1 DragnDropbegin always gave back the good GetSelectedItem because it was impossible to move an item !!! (CTRL & SHIFT Key inibited)

Sometimes DragnDropBegin event  failed, and never be called again , can't really know why !!!

More strange, giving back these string "(_>" again, without textbox ???

Thanks again ;)

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

You provide a lot of excellent feedback, but your posts would be much more readable if you slowed down, used less punctuation and fewer emoticons, and instead concentrate on providing information. Your English is fine; that is not a problem. I have a rough idea what you are talking about here, but please rephrase your problem clearly, with step by step instructions to reproduce it.

stephan_35

Quote from: owenwengerd on September 01, 2009, 08:12:08 AM
You provide a lot of excellent feedback, but your posts would be much more readable if you slowed down, used less punctuation and fewer emoticons, and instead concentrate on providing information. Your English is fine; that is not a problem. I have a rough idea what you are talking about here, but please rephrase your problem clearly, with step by step instructions to reproduce it.

Ok !

I promise you to try to use fewer emoticons .

Thanks for my english .

As you explain me in this post : http://www.opendcl.com/forum/index.php?topic=896.msg4458#msg4458
When the TreeControl event invoke is set to asynchronous, when i *press* the mouse on a unselected item, and move it to another item in the tree, after *release* the mouse boutton, the OnDragnDropBegin is call ! but not OnDragnDropFromControl.

But the action of move was already finished, so , impossible to catch the selected item.

That was i wanted to explain to you, because OnDragnDropFromControl was not called !



For these string "(_>" , i think you answer me at this post http://www.opendcl.com/forum/index.php?topic=894.msg4460#msg4460

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

Yes, for your purposes, you must use 'Synchronous' events, otherwise the event handlers will be called after the drag and drop operation is complete. Once the new evant handler code and drag/drop code are working without problems, it will be easier to add new events for giving more control over drag/drop operations.

stephan_35

Hello owen.

So, that's a problem for me to say if this post is solved or not.

Because of event invoke must be set to synchronous, otherwise DragnDropBegin cannot catch the correct selecteditem at the beginning of drag and drop .

If any idea or suggest to catch item and return it to autocad lisp without modify eventinvoke may be usefull ... i think.

Anyway , 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

stephan_35

Hello owen,

Maybe the beginning of an issue :

I tried with some more events asynchronous :
OnClicked, OnSelChanged, OnDragnDropBegin, OnDragnDropFromControl, OnDragnDropToAutocad.

Onclicked always return the new selected item after move action.
OnSelChanged return the selected item before action !
OnDragnDropBegin return the new selected item after move action.
OnDragnDropFromControl return the drop position as it have to do !
OnSelChanged (again) return the newer selected item after action.

OnSelChanged can be my issue !

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

owenwengerd

Do you understand why it works that way? It's not clear from your post.

stephan_35

#7
Quote from: owenwengerd on September 01, 2009, 02:40:58 PM
Do you understand why it works that way? It's not clear from your post.

Hello owen.

I wrote the event in the order of displayed messages .
Displayed with (alert "") order.

Now, i really understand the difference of all of them, some send back data keeped in memory (i suppose), and some send back data use by my order (dcl_getselecteditem) !
And (dcl_getselecteditem) send data in actual position of treeControl .... that was my error !

Your new arx correct also some bug, and it's now possible to use more event on the same control.

Can i suggest you something ?
Maybe shoulb not be better to send back data of OnClicked event like OnSelChanged Event ?
I mean keep in memory item wich was clicked .
OnClicked(label key / )

and let user the choice of use it or no .....

Anyway, Thanks for all

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

Yes, modifying OnClicked would solve the latency problem, but it would also introduce an incompatibility that would require existing code to be changed. In any case, since OnClicked is common, I prefer to keep it generic. There could (in theory) be actions that cause OnClicked to fire that are of no interest in your case, so OnSelChanged is more appropriate than OnClicked in any case.

stephan_35

Hello owen,

Just one thing, if DragnDropBegin event is not activate , OnSelectChange doesn't catch the selected item with a Drag & Drop action !

That mean if a want to know wich item was selected, i have to activate DragnDropBegin event, even if I did not need it!

That is not a problem for me at the moment.

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