|
-
Sep 17th, 2003, 01:48 AM
#1
Thread Starter
Lively Member
Code to run on change of a property
I have a number of properties that hold configuration style information. I want to "refresh" a connection if any of these properties are changed. Do I have to add a call to my refresh code in each of the "Public Property Let" sections or is there someway to use the "PropertyChanged" method?
Code:
Public Property Let WriteQuePassword(ByVal New_WriteQuePassword As String)
m_WriteQuePassword = New_WriteQuePassword
PropertyChanged "WriteQuePassword"
'DO I DO THIS? -> Call MQSeriesRefresh
End Property
-
Sep 19th, 2003, 10:10 AM
#2
Frenzied Member
Welcome to the wonderful world of non-inheritance
-
Sep 21st, 2003, 06:14 PM
#3
Thread Starter
Lively Member
I take it that means do it for every one - what a pain!
Why oh why isn't their a Property Changed event!
I just don't see the point of the "PropertyChanged" Method because I only change the properties though the Property Page and that already knows the property has been changed, so the method becomes redundant. I think.
-
Sep 22nd, 2003, 09:33 AM
#4
You'll need to call MQSeriesRefresh from every Property Let, if that is what you intend to do.
PropertyChanged is used for when your component is in design time, so that the Properties Window will reflect the most current property values.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|