|
-
Dec 9th, 2003, 12:21 AM
#1
Thread Starter
New Member
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.
-
Dec 9th, 2003, 06:04 AM
#2
Thread Starter
New Member
-
Dec 14th, 2003, 05:12 AM
#3
Thread Starter
New Member
-
Dec 14th, 2003, 06:11 AM
#4
Supreme User
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
-
Dec 14th, 2003, 02:19 PM
#5
progame, is this for.Net?
-
Dec 17th, 2003, 02:28 AM
#6
Thread Starter
New Member
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.
-
Dec 17th, 2003, 02:35 AM
#7
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|