Click here to Skip to main content
15,916,835 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to convert it to c# Pin
N a v a n e e t h18-Jan-09 19:42
N a v a n e e t h18-Jan-09 19:42 
Questiontrue becomes false, then insanity becomes true. Pin
thrakazog18-Jan-09 16:47
thrakazog18-Jan-09 16:47 
AnswerRe: true becomes false, then insanity becomes true. Pin
Mycroft Holmes18-Jan-09 16:56
professionalMycroft Holmes18-Jan-09 16:56 
GeneralRe: true becomes false, then insanity becomes true. Pin
thrakazog18-Jan-09 18:42
thrakazog18-Jan-09 18:42 
AnswerRe: true becomes false, then insanity becomes true. Pin
«_Superman_»18-Jan-09 16:59
professional«_Superman_»18-Jan-09 16:59 
AnswerRe: true becomes false, then insanity becomes true. Pin
_Maxxx_18-Jan-09 18:23
professional_Maxxx_18-Jan-09 18:23 
GeneralRe: true becomes false, then insanity becomes true. Pin
thrakazog18-Jan-09 18:49
thrakazog18-Jan-09 18:49 
GeneralRe: true becomes false, then insanity becomes true. Pin
_Maxxx_19-Jan-09 0:30
professional_Maxxx_19-Jan-09 0:30 
thrakazog wrote:
the property set I can watch the incoming value set my mIsDirty variable. Once that's been done the next call to get Foo.IsDirty returns false.


But immediately after the Foo.isDirty - true; what is the value of misDirty - i.e. is it EVER getting changed to true?

If it is getting changed to true, then you need to track down where it is getting set to false again - if it is not then you need to find out why.

My suspicion from what you have said would be that the Foo.Isdirty you are SETTING is a DIFFERENT instane to the Foo you are GETting.

try setting the value of mIsDirty to true by default (i.e. private bool misDirty = true;) my guess is that your code will then return true regardless as to what you set it to - because you are 'reading' a different variable to that which you are writing'

as other posters have said, it's probably not best practice to set the property externally tot eh object - better to have it as a read-only property which teh oject sets itself each time another propery is changed. Where child objects implement a similar functionality (hopefully they ll inherit from some base object, or implement a common interface) they could rais an event (sort of an 'ImNowDirty' event, if you like) which other objects can handle - so the parent handles the child event, and sets its IsDirty appropriately

Finally - whatever happens - please reply here when you solve it - I'm intrigued as to teh cause!

Good Luck!

If I knew then what I know today, then I'd know the same now as I did then - then what would be the point?

.\\axxx
(That's an 'M')

GeneralRe: true becomes false, then insanity becomes true. Pin
thrakazog19-Jan-09 6:45
thrakazog19-Jan-09 6:45 
AnswerRe: true becomes false, then insanity becomes true. Pin
CodingYoshi18-Jan-09 18:48
CodingYoshi18-Jan-09 18:48 
GeneralRe: true becomes false, then insanity becomes true. Pin
thrakazog18-Jan-09 18:57
thrakazog18-Jan-09 18:57 
GeneralRe: true becomes false, then insanity becomes true. Pin
CodingYoshi18-Jan-09 19:07
CodingYoshi18-Jan-09 19:07 
GeneralRe: true becomes false, then insanity becomes true. Pin
thrakazog18-Jan-09 19:55
thrakazog18-Jan-09 19:55 
GeneralRe: true becomes false, then insanity becomes true. Pin
CodingYoshi19-Jan-09 3:48
CodingYoshi19-Jan-09 3:48 
AnswerRe: true becomes false, then insanity becomes true. [modified] Pin
Luc Pattyn18-Jan-09 21:40
sitebuilderLuc Pattyn18-Jan-09 21:40 
Question"Checked" property for ToolStripDropDownButton? Pin
la0118-Jan-09 12:38
la0118-Jan-09 12:38 
AnswerRe: "Checked" property for ToolStripDropDownButton? Pin
CodingYoshi18-Jan-09 19:32
CodingYoshi18-Jan-09 19:32 
QuestionMath Analysis Pin
nike_arh18-Jan-09 10:45
nike_arh18-Jan-09 10:45 
AnswerRe: Math Analysis [modified] Pin
Luc Pattyn18-Jan-09 10:57
sitebuilderLuc Pattyn18-Jan-09 10:57 
Questionint? VS int Pin
Mohammad Dayyan18-Jan-09 10:20
Mohammad Dayyan18-Jan-09 10:20 
AnswerRe: int? VS int Pin
Reza Raad18-Jan-09 10:26
Reza Raad18-Jan-09 10:26 
GeneralRe: int? VS int Pin
Mohammad Dayyan18-Jan-09 10:30
Mohammad Dayyan18-Jan-09 10:30 
QuestionWeb Browser Automation and WebBrowserReadyState.Complete cannot view redirect page Pin
JoeJankowski18-Jan-09 9:43
JoeJankowski18-Jan-09 9:43 
QuestionImage size Pin
Blue_Boy18-Jan-09 8:02
Blue_Boy18-Jan-09 8:02 
AnswerRe: Image size Pin
Ravi Bhavnani18-Jan-09 8:09
professionalRavi Bhavnani18-Jan-09 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.