Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

State management of controls in SmartDocument

3 views
Skip to first unread message

Fourge

unread,
Feb 14, 2005, 9:47:02 AM2/14/05
to
Hi
Is there any State Bag or similar concept within a Smart Document that
manages the state of the controls?
Fourge

Scott Bellware [C# MVP]

unread,
Feb 14, 2005, 6:35:03 PM2/14/05
to
My understanding is that such a thing doesn't exist. I was told to declare
class scoped data members, and to store the values of the controls into those
data members in the InvokeControl method. I'm using Vertigo Software's Smart
Documents Wrapper which facilitates the handling of control invocations by
providing event-like syntax for each control. It also provides a pre-render
method for each control whcih can be used to initialize the value of each
control. I'm using a StringDictionary object as a state bag which is keyed
on the control name. Control name is one of the args passed to the
individual control invocation handler methods.

Fourge

unread,
Feb 16, 2005, 10:17:12 AM2/16/05
to
Thanks Scott. I also use the Vertigo SD Wrapper. I was considering using a
NameValueCollection object for my StateBag. Do you have any comment on which
would be better?

Thanks
Fourge

Scott Bellware [C# MVP]

unread,
Feb 16, 2005, 11:33:01 AM2/16/05
to
The major difference between StringDictionary and NameValueCollection seems
to be that the NameValueCollection allows for accessing items by a named key
as well as an interger index. There might also be some differences in the
respect of case sensitivity for the keys. NameValueCollection keys are case
insensitive. I'm not sure if that's the same for StringDictionary. The
documentation has never been enirely clear to me, and I've never done the due
dilligence of testing it. I think either class would be a good bet as a
state bag. If I come accross the need to access the values by index, I'll
likely switch to NameValueCollection. I haven;t really identitfied that need
though (not to say it's not lurking somewhere).

When do you need to have your code behind framework with the state bag done
by? It might be possible that we could share some work on this. I had a
brief email excahnge with the folks at Vertigo regarding adding the work I'm
planning to the Samrt Document Wrapper project and they seemed open to
evaluating what comes of it. I'm not sure if I'll be able to take it that
far (time permitting) but I could certainly give you a look at what I come up
with.

Cheers,
Scott

Fourge

unread,
Feb 18, 2005, 9:01:01 AM2/18/05
to
Hi Scott
I have a pending deadline end of the month, however I would like to stay in
touch and see how we could benefit each other. As I do more development, I
start to see more areas that need improvement in terms of the architecture of
the SD and the Vertigo Wrapper.

How can we get in touch?
Fourge

"Scott Bellware [C# MVP]" wrote:

Peter Huang [MSFT]

unread,
Feb 21, 2005, 12:19:26 AM2/21/05
to
Hi

Sorry to jump in the thread. Fourge, it is a public newsgroup and so it is
recommended to post your question here so that everybody can benefit from
the conversation on it. Scott is MVP and active in the newsgroup. At the
same time, other community member is also willing to share experience with
you in the newsgroup. Surely Scott's blog is available at
http://www.geekswithblogs.com/sbellware.

Thanks very much.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Thomas

unread,
Dec 17, 2009, 3:01:02 PM12/17/09
to
NameValueCollection also allows multiple values to share the same key.

"Scott Bellware [C# MVP]" wrote:

0 new messages