My apologies, then, since I seem to be annoying you.
You're not annoying me. Firaxis, on the other hand, is annoying me. My exasperation in that last post was due to the fact that in patch 674 they tweaked two serial events to the point where tons of stuff broke in my own mods, because they made their changes without considering the effects it'd have on those of us who use their tools for our own mods. A series of mods that I've spent almost two years developing is now in the trash because of their minor tweak to those events.
The problem isn't that you want what you want. The problem is that we haven't been given the tools to do what we want; what we've been given are the functions THEY needed to create the game, and almost nothing else. As a result, a lot of what we want just isn't possible with the tools we've been given, because those tools are constructed with a lot of limitations or quirks aimed purely at the core game's use of them.
If they'd done their jobs right, they'd have released a robust set of events and functions from the start, instead of the extremely specialized (usually UI-oriented) tools we were given. For instance, every Get command should have had a corresponding Set command,
even if nothing in the core game needed that Set, because it'd make things far, far easier for us modders. And they should never have depended on so many locked metatables (YieldTypes and TerrainTypes, for instance) instead of just accessing the GameInfo structures like a rational person would.
At the very least, once something was released to us
it should never be altered again; they ran into problems a year ago when they deleted the ScriptData access functions people were using for various mods, and now we're seeing it again with the CombatSim events. It's just bad programming practices. (Once upon a time I was a software engineer, so this isn't just the rantings of a gamer.)
Bottom line: You just might have to make do with an inefficient design that only updates the city numbers when certain triggers occur (like the window opening/closing), instead of insisting on an always-updated readout. You want something that will constantly update a certain UI window, such that it's immediately correct whenever anything changes; unfortunately, I don't think you can do that without a tremendous overhead cost because the current functions just aren't built for that. This means that you just might need to accept a certain inefficiency in the design; maybe the numbers only update on specific actions, instead of any time any thing changes. That sort of thing.
In my own mod I ran into something similar with my custom "Mandala" window; I couldn't guarantee that the information in the window would be up-to-date, because I have no way of identifying the popup trigger for a nonstandard popup type. In the end I added a half-dozen triggers for the update function (end of turn, city founded, god added, major event occurred, clicked any button in my custom UI window, and so on) and accepted the fact that it wouldn't always be exactly up-to-date when the window is first opened.