gcanyon / navigator

The amazing small powerful plugin for Livecode that makes you a better, faster developer.
12 stars 4 forks source link

group relayer problem #9

Closed anilhavuc closed 5 years ago

anilhavuc commented 5 years ago

Dear gc,

please look this movie for this case: http://www.comel.com.tr/rev.mov

case description: I selected the phonenumber group and replaced it with drag and drop before the lastname group. The phonenumber group goes into the firstname group. this is the case in all groups.

Regards, Anil Havuc

gcanyon commented 5 years ago

Thanks for the report!

This is a tough problem, and LiveCode doesn't give me a particularly good way to resolve it.

There is a setting called relayerGroupedControls, which is either true or false.

If you are dragging something in the way you show, but the group you are dragging toward is not within another group, then you can hold down the option key and Navigator will not set relayerGroupedControls to true, and you will see the behavior you want.

The problem comes in when you want to drag into one group, but not into a smaller group within that group. relayerGroupedControls needs to be true to get into the first group, but if it is true, it's impossible not to drag into the inner group if you relayer just below it.

As long as there is at least one control in the containing group below the inner group, you can work around this. If this is the setup:

A1 ...B1 ...B2 ......C1 ......C2 ......C3 ...B3 A2 A3 D

Where the B controls are in a group, and the C controls are in a group within the B group. You want to get control D into group B above B3, but not into group C. You can do it in two steps:

  1. Drag D between B3 and A2. That places D into group B, like this:

A1 ...B1 ...B2 ......C1 ......C2 ......C3 ...B3 ...D A2 A3

  1. Then drag B3 just below D, which results in this, which was the goal:

A1 ...B1 ...B2 ......C1 ......C2 ......C3 ...D ...B3 A2 A3

This is challenging to do with code, and without B3, impossible as far as I know. I'll think about it -- maybe I'm wrong and there's a way to do it.

gcanyon commented 5 years ago

FYI, I am working on an update to the relayering code that should (mostly) address this.

anilhavuc commented 5 years ago

Thanks, revnavigator is very usefull for me.

Regards, Anil

gcanyon commented 5 years ago

I should add that I'm very gratified that I can barely recognize the display setup you have in Navigator! When I first realized a few months ago that it would be possible to let the user provide a custom display string, I did it because it was fairly straightforward to do, but to see it in practice is awesome!

gcanyon commented 5 years ago

FYI, there are still a few bugs in the new relayering code that I am working on, but it will definitely address the issue you showed in your example movie.

gcanyon commented 5 years ago

This should be fixed now.