Yata - 2da editor


#41

Weird, I didn’t have to reorder them to make it happen.

If I see it trigger via another method I will let you know, have had my eyes peeled for the name changes after it made me have to rewrite a few 2da files lol.


#42

y, sorry bout that

sure, i simply tried it without re-ordering tabs and nothing went wrong; then simply dragged a tab to a different position and boom. It’s a deeper prob

The truth is, each tab stores a “Tag” (c#/.NET variable) and in order to keep track of table-per-tab relationship the the table-object is assigned to that tab-Tag each time a tab is created.

i’ll try to make it happen without re-ordering tabs, since that would simplify (what the heck I’m) looking for


#43

Okay I just tried to do it again, and this is what happened:

I opened file 1, then 2, then 3, then 2 again. The first instance of file 2 will be called 2a, and the second will be called 2b.

I tried saving file 3, and nothing happened. So I tried saving file 1, and file 1 overwrote itself with file 3. I then tried saving both 2a, and 2b, and they both overwrote themselves with file 3 as well, not the file that had a duplicate.

Edit:
No worries about having to rewrite things man, risks of using beta software. Had lots of backups anyways so it was only a few minutes of work lost each time.


#44

+100

minimum reproducable: 2 files. save one, then save the other, and the filename changes to the one saved.

now i’m embarrased

 
okay i see the fault and think i nailed it – update should be in the Vault in ~30min


#45

IMPORTANT Update ver 2.7

fixed save bug when multiple files are open (ie, one file is saved then another file is saved)

https://neverwintervault.org/project/nwn2/other/tool/yata

 
tks Mairn

 
 
 
Ps. on a new front, have been putting in time on Undo/Redo … quite frankly it’s a mind***k the first time trying it.


#46

getting there …


cell-changes seem solid, row insert/delete needs more attention

 
EDIT: getting closer … I think i understand the Undo/Redo system i’ve set up (yeh, that I set up…)

hopefully all that’s left to do is implement it for specific actions other than those that’ve been used for testing (various insert row/delete row operations) – and refactor out a now redundant State variable (that now seems to track merely the “changed” state of the 2da)

basically it turns out i’ve been overthinking it, making things more complicated than they need to be.

 
EDIT_2: methinks the UndoRedo class is complete. but have yet to implement it in several row-insert/delete functions.

 
EDIT_3: nope. It still needs an Overwrite(row) action … but the system (if not [yet] concise) has become understandable.

 
EDIT_4: O its getting good – action Overwrite() slid in like a charm  :)
next … and hopefully last … multi-row insert/delete

 
EDIT_5: Undo/Redo is basically done. There’s a few things i want to make friendlier before building another release version. :nerd_face: :snowman_with_snow::cookiemonster:

 
 
EDIT_6: DESIGN_FLAW. Since Undo/Redo identifies cells/rows by position it all screws up when cols are sorted.

for now i’ll probly just disable UR when the table is sorted by anything other than id-ascending ->

 
EDIT_7: think i patched it up by updating the row-ids in the Restorables – those ids ought remain current after a Sort.

tests indicate it works but permutations are through the roof


#47

ver 2.8
https://neverwintervault.org/project/nwn2/other/tool/yata

Undo/Redo + tweaks and nuances

keep an eye on things especially if you’re sorting columns and using Undo/Redo in various combinations – inserting or deleting multiple rows in particular.