grom: "nothing happens when I click another tab." Advanced Trade Skill
Window's side tabs cast the other profession's opener and rebuild on
TRADE_SKILL_SHOW alone — its update arm is `UpdateCount = UpdateCount + 1`
and nothing else — so the book swapped underneath it and nothing redrew.
The open is `0x4fc910` and it carries three rules we had one of:
* one event per *open*, not per change: a changed line while a book is up
is a fresh TRADE_SKILL_SHOW (`0x4fc99f`), never an update. The update is
a change *within* one open book — a filter, a fold, an item count.
* the opener is the window's toggle (`0x4fc918`): casting the profession
already open closes it, which is what ATSW2's `this.Name ~= <current>`
guard exists to avoid tripping.
* an empty rebuilt list signals nothing (`0x4fc997`, the count at
`0xbde04c`): the line is open and no window appears. Written over the
list about to be pushed rather than as the literal count read, because
ours can be a frame late where the reference builds its list inside the
open call — a book that arrives empty and fills next frame still fires
exactly one show, on the frame it fills.
`0x4f6000` is the Craft window's same function, keyed on the craft type at
`0xbdcfb8` and with no empty guard; both of its rules land in `feed_craft`
and `open_trade_skill` too, since CRAFT_SHOW is the arm ATSW2 takes for
Enchanting. The filter reset on a line change was already right —
`set_trade_skill` keys it on `trade_skill_last_line`, the `0xbde064` above.
Verified end to end offline with $WOW_CAPTURE_SPELLS seating a real book:
Blacksmithing open with 24 recipes, `ATSWFrameTab3:Click()`, and the window
comes back title=Cooking line=Cooking rows=9 with the check moved to tab 3.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn