Results 1 to 3 of 3

Thread: Property Persistance in class

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Posts
    10

    Property Persistance in class

    Hello Everyone

    I am trying to have a persistent property in a multiuse, persistable class. Here is the code:

    VB Code:
    1. Option Explicit
    2. Private dbPath As String
    3.  
    4. Public Property Let DatabasePath(path As String)
    5. dbPath = path
    6. PropertyChanged "DatabasePath"
    7. End Property
    8.  
    9. Public Property Get DatabasePath() As String
    10. DatabasePath = dbPath
    11. End Property
    12.  
    13. Private Sub Class_ReadProperties(PropBag As PropertyBag)
    14. dbPath = PropBag.ReadProperty("DatabasePath")
    15. End Sub
    16.  
    17. Private Sub Class_WriteProperties(PropBag As PropertyBag)
    18. PropBag.WriteProperty "DatabasePath", dbPath
    19. End Sub

    The problem is eventhough I invoke PropertyChanged method, none of the ReadProperties or WriteProperties methods are called (although I know the class goes out of scope and is re-instantiated). Any ideas?

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    is the instantiating class trying to save this class?

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Posts
    10
    Sorry!! I am not with you. What do you mean by saving the class?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width