Results 1 to 7 of 7

Thread: how to set the dirty flag?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    11

    how to set the dirty flag?

    now i design a object persistence framework. i hope the O/R mapping class is a pure data class. so the class needn't implement any interface and do not care for anything outside.
    it mostly like this:

    private m_code as string
    private m_name as string

    public property get code() as string
    code = m_code
    end property

    public property let code(newValue as string)
    m_code = newValue
    end property

    public property get name() as string
    name= m_name
    end property

    public property let name(newValue as string)
    m_name = newValue
    end property


    it's all.
    but when i save it in my framework,i must get the dirty flag(poin out user have change the property's value).
    in Java, that maybe be resolved by Dynamic Proxy.

    how can i do in VB?

    is it impossible?

    hope to everyone's answer.

  2. #2

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    11
    help!

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    11
    up

  4. #4
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Im not exactly sure, but maybe this might help a bit:

    Dim Dirty As Boolean

    Private Sub Dirty()
    Set Dirty = False
    End Sub

    Private Sub Form_Load()
    Call Dirty
    End Sub

    Private Sub Text1_Change()
    'Obviously needs changing for your needs
    Set Dirty = True
    End Sub

    I doubt this is right, but hopefully you will get some kind of insight off it

  5. #5

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    11
    i want set/get the dirty flag of each property.
    and i hope the class can be "pure data class".it means that the class do not support any other properties.

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    11
    now this framework only for VB6. it will upgrade to .Net.

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