What is UpdateCounter for?

Add-in Express™ Support Service
That's what is more important than anything else

What is UpdateCounter for?
 
Sven Heitmann




Posts: 193
Joined: 2004-08-23
hi,

i wonder what is the UpdateCounter Property of the Class ADXCommandBarControl and childs for?

in the designer generated code it has a value of 2 or 3 for buttons/bars...

best regards
Best regards,

Sven Heitmann
Posted 24 Aug, 2004 07:16:49 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
Sven,

I was expecting this question only from you :-)

If you change your ADXCommandBar (add a button, or replace a button image, or something like that) this counter increases per 1. Then ADX refreshes your command bar. If you didn't change anything ADX doesn't refresh it which speeds up loading of the hostapp.

The add-in module designer tracks UpdateCounter automatically.
Posted 24 Aug, 2004 07:28:00 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
i'm not sure to understand the sense behind this...

what i understand so far is, that every time when i change a setting of a button this property is increased

if UpdateCounter = 4 does that mean adx refreshes the bar 4 times?
is this necessary?

i have a commandbar with 10 buttons and when i start word i see each button with the image added, it's really slowly

Best regards,

Sven Heitmann
Posted 24 Aug, 2004 07:49:45 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
yes, it is slow on the first start. try not to change anything and start for the second time.
Posted 24 Aug, 2004 08:03:37 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
it seems its cached somewhere... what i also like is that the position and enabled/disabled status is stored between word seesions... i really need this... thanks a lot :)

will safe me a lot of time =)

do adx compares that updatecounter value wit han stored one to decide "draw the buttons new"?
is it for caching?
Best regards,

Sven Heitmann
Posted 24 Aug, 2004 08:26:36 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
Hmm... I have just created a test Word add-in, added to it one command bar with one button, set adxMsoBarTop, built the add-in project and run Word.

My comamnd bar has appeared in adxMsoBarTop. I have dragged and docked it to the right and closed Word. When I opened Word for the second time my command bar appeared at the place where I had left it.

Sven, doesn't it work with you?
Posted 24 Aug, 2004 08:49:15 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
> do adx compares that updatecounter value wit han
> stored one to decide "draw the buttons new"?
> is it for caching?

Yes, it does. Look at the add-in regkey. You can find here the Controls subkey where all controls tag and counters are stored.
Posted 24 Aug, 2004 08:52:55 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
Hmm... I have just created a test Word add-in, added to it one command bar with one button, set adxMsoBarTop, built the add-in project and run Word.

My comamnd bar has appeared in adxMsoBarTop. I have dragged and docked it to the right and closed Word. When I opened Word for the second time my command bar appeared at the place where I had left it.

Sven, doesn't it work with you?

i'm sorry, english is not my first language... what i tried to say is "i love this feature" =)

it is really important for me and fortunately i don't need to implement it by myself now :)

thank you
Best regards,

Sven Heitmann
Posted 24 Aug, 2004 09:22:44 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
oh... I see. This feature is embedded to Office :-)
If a command bar is not temporary its prosition is stored to... special file (different for different hostapps).

> english is not my first language
Neither is mine :-)
Posted 24 Aug, 2004 09:31:56 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
oh... I see. This feature is embedded to Office :-)
If a command bar is not temporary its prosition is stored to... special file (different for different hostapps).

ok... let me see if i understand your system of storing/updating/deleting command bars right

in case of word

adx will add the command bars to word when it is first called... they are stored in the normal.dot of word then
when word shuts down the command bars are not removed, right?

wenn word starts again adx checks if there was an update for an command bar and replaces it then, right?

when the addin is uninstalled, adx removes the commandbars fom word, right?

now i see why the command bars stay when the addin is removed by deleting the registry keys... ;)

when the addin is uninstalled by the installer, will it also remove the commandbars from word?
the same for using regasm /u ?
Best regards,

Sven Heitmann
Posted 24 Aug, 2004 09:44:51 Top