News:

  • October 16, 2026, 02:01:10 PM

Login with username, password and session length

Author Topic: UDT editing bug  (Read 32886 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
UDT editing bug
« on: April 03, 2021, 03:40:03 PM »
When creating/editing a UDT Structure, if you press the Delete key while cursor on the Structure Name text input, it will prompt to delete the "selected" Field.  It will also delete the character in the Structure Name text input, as expected.  So there's a focus/key shortcut issue, it's performing 2 actions.  Another inconsistancy on this page is the fact that the Delete key Deletes a Field, but the Insert key does not insert a Field. "A" Adds, "I" Inserts, "D" Duplicates, "Delete" Deletes, but "E" does not Edit.  Would almost expect spacebar to perform Edit.  Can't find a shortcut for Move Up or Move Down, which would be useful when working in a large list.  Renumber is not a big deal to not have a shortcut, realy only used once if used at all.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: UDT editing bug
« Reply #1 on: April 03, 2021, 03:56:29 PM »
What's even more concerning to me is that when I went to click on Okay to close System Configuration, DmD froze up on me.  And, I had accepted my project, but not saved...
10 minutes of my life down the drain doing Find and Replace getting back to where I was.  And that poses a question, could you alter the Replace dialog to have buttons for Find Prev, Find Next, Replace, Replace All?  I had to do a ton of Ctrl+Shift+F, Space, Ctrl+V, Enter, repeat.  I know you can drill down to code block, rungs, etc, but that's cumbersome.  Sometimes you just want to watch it Replace one by one, to make sure you don't change them all, like when copying code blocks and trying to preserve to old one, etc.
« Last Edit: April 03, 2021, 07:42:06 PM by Bolt »

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: UDT editing bug
« Reply #2 on: April 05, 2021, 09:23:35 AM »
Duplicated the duplicate DEL key action.  Will figure it out...

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: UDT editing bug
« Reply #3 on: April 05, 2021, 10:53:53 AM »
Fixed.

I changed the behavior so that focus must now be on the report grid control for the INSERT and DELETE keys to work since those also function for the edit control for the Structure Name.  Focus now also gets pushed back to the report grid control after most button actions (rather than staying on the button) to help leverage the usage of those keystrokes.

The Alt+ Accelerator keys are there and work - see the attached screen shot.  You must press down on the Alt key while hitting the accelerator.

Windows hides the underscore that reveals the Alt+ Accelerator keys, until you hit the Alt key.  The attached screenshot shows the underscores because I hit the Alt key to reveal them.

Here's the ones you asked about:

So Edit is Alt+E
Move Up is Alt+U
Move Down is Alt+W
Renumber is Alt+R

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: UDT editing bug
« Reply #4 on: April 06, 2021, 12:50:39 PM »
Thanks, I was overlooking the Alt + keystroke, clarifies it.

Any comments on my second rambling?

...could you alter the Replace dialog to have buttons for Find Prev, Find Next, Replace, Replace All?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: UDT editing bug
« Reply #5 on: April 06, 2021, 01:49:38 PM »
What's even more concerning to me is that when I went to click on Okay to close System Configuration, DmD froze up on me.  And, I had accepted my project, but not saved...
10 minutes of my life down the drain doing Find and Replace getting back to where I was.
Let me know if you can duplicate this WITHOUT using the DEL key.  I am guessing/hoping that the dual processing of that action caused this issue.  Note that Alt+D accelerator is OK, it's the DEL key that was the problem.

Quote
  And that poses a question, could you alter the Replace dialog to have buttons for Find Prev, Find Next, Replace, Replace All?  I had to do a ton of Ctrl+Shift+F, Space, Ctrl+V, Enter, repeat.  I know you can drill down to code block, rungs, etc, but that's cumbersome.  Sometimes you just want to watch it Replace one by one, to make sure you don't change them all, like when copying code blocks and trying to preserve to old one, etc.
The current implementation is "batch mode".  Like you mentioned, you can limit the scope of the batch Replace to a specific set of Rungs or a specific code-block.  A more interactive Replace would be very useful, but non-trivial to implement.  :-\

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: UDT editing bug
« Reply #6 on: April 06, 2021, 03:58:46 PM »
Let me know if you can duplicate this WITHOUT using the DEL key.  I am guessing/hoping that the dual processing of that action caused this issue.  Note that Alt+D accelerator is OK, it's the DEL key that was the problem.
I have had it happen to me on more than one previous occasion, but not sure if Delete was used at the time.  Will keep an eye out for it.

Quote
The current implementation is "batch mode".  Like you mentioned, you can limit the scope of the batch Replace to a specific set of Rungs or a specific code-block.  A more interactive Replace would be very useful, but non-trivial to implement.  :-\
Okay, fair enough.  I tend to consider Find and Replace to be (almost) the same thing, because programs such as Notepad++ and most MS products tend to treat them similar, even in the same pop up box.  Your search box is pretty full featured, I figured you could spin it into the Replace structure.  But I realize it's much more complicated with ranges, structures, etc.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: UDT editing bug
« Reply #7 on: April 06, 2021, 04:42:25 PM »
Yeah, Replace has a super-batch mode, and also a "swap" capability, and copy/move/swap documentation, so it's slightly different than Notepad++

It would be like doing this in one step:

Replace "Dog" with "Cat"
Replace "Horse" with "Mule"
Replace All CaSe forms of "Cars" with "Auto"
Swap "Tree" with "Plant" (Tree becomes Plant, Plant becomes Tree), and swap any attached hyperlinks (or not)

I don't think even Notepad++ supports the "swap" option.  When swapping in a text editor, I use ~~, e.g. replace Tree with ~~Plant~~, replace Plant with Tree, replace ~~Plant~~ with Plant, because you typically do not use two ~~ in a row anywhere, although even that's not foolproof.

Swapping is useful when you have hard-wired I/O, e.g. and X0 is actually wired as X1 and vice versa - do you get an electrician to re-wire the panel, or do you use the Replace/Swap feature in Designer?

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: UDT editing bug
« Reply #8 on: April 06, 2021, 07:24:27 PM »
It would be like doing this in one step:

Replace "Dog" with "Cat"
Replace "Horse" with "Mule"
Replace All CaSe forms of "Cars" with "Auto"
Swap "Tree" with "Plant" (Tree becomes Plant, Plant becomes Tree), and swap any attached hyperlinks (or not)

I agree, it's pretty powerful.  But if you'd do all that one Replace List, you'd be a gluten glutton for punishment.  Every time I try to do that many Replaces in one List, I inadvertently hit Enter halfway through typing my 5th list entry, and it runs the partial batch, and I'm left figuring out just which entry I was one and picking up where I left off.

Could you make the "Replace Summary" dump to an Output Window of sorts?
« Last Edit: April 07, 2021, 07:05:40 AM by Bolt »

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: UDT editing bug
« Reply #9 on: April 07, 2021, 03:28:35 AM »
Do you have celiac's?  IBS?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: UDT editing bug
« Reply #10 on: April 07, 2021, 03:33:33 AM »
Swapping is useful when you have hard-wired I/O, e.g. and X0 is actually wired as X1 and vice versa - do you get an electrician to re-wire the panel, or do you use the Replace/Swap feature in Designer?

I don't think I'd ever edit a program (and consequent drawing Rev with Rev block entry) to fix a wiring error.  Even in a union shop where I can get busted for working, I'd probably just wait till nobody's looking.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: UDT editing bug
« Reply #11 on: April 07, 2021, 07:06:02 AM »
Do you have celiac's?  IBS?
Har har har.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: UDT editing bug
« Reply #12 on: April 07, 2021, 07:08:20 AM »
Swapping is useful when you have hard-wired I/O, e.g. and X0 is actually wired as X1 and vice versa - do you get an electrician to re-wire the panel, or do you use the Replace/Swap feature in Designer?

I don't think I'd ever edit a program (and consequent drawing Rev with Rev block entry) to fix a wiring error.  Even in a union shop where I can get busted for working, I'd probably just wait till nobody's looking.
Sounds like you've never had to wire analog inputs to a GE PAC...  Huge PITA.

What if it's not a wiring error, but programmer's misunderstanding of electrician's intentions?  Not every install/modification/upgrade has drawings.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: UDT editing bug
« Reply #13 on: April 07, 2021, 09:51:17 AM »
Could you make the "Replace Summary" dump to an Output Window of sorts?

A confirmation dialog?  Definitely.  Good idea, especially for the "list" mode

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: UDT editing bug
« Reply #14 on: April 07, 2021, 10:16:52 AM »
Sounds like you've never had to wire analog inputs to a GE PAC...  Huge PITA


Nope, I've not had that pleasure.   Done very little GE stuff at all.

Quote
What if it's not a wiring error, but programmer's misunderstanding of electrician's intentions?  Not every install/modification/upgrade has drawings.

Yup, fair point.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.