(WTF)Assignment Operator Not Working!

  • Thread starter Thread starter x0td
  • Start date Start date
X

x0td

In a dialog box to which is passed to it an object of type "aliasrow"
derived from datarow, there is a routine that updates the internal
'aliasrow' (termed mar for member alias row), upon the time which the
user clicks a button with the caption 'ok' - the scripture says thus

private void btnOK_Click(object sender, System.EventArgs e)
{
mar.title = txtTitle.Text;
mar.operant = txtOperator.Text;
mar.description = txtDescription.Text;
this.mar.target = txtParameters.Text;
this.mar.enabled = ckEnabled.Checked;
if
((ckEnabled.Checked)!=(this.mar.enabled))
{
throw new Exception("what the hell!");
}
this.DialogResult = DialogResult.OK;
this.Close();
}

as the 'aliasrow' is derived from a hidden base 'datarow' and the
get/set operations are obscured, i am completely dumbfounded by this
problem

there is x
x = true
, but the assigment does not work, so x remains false - and the alias
can never be enabled!


(sobs)...
it's been hours, i can't solve such a simple problem, what the heck am
i to do to make this

mar.enabled = true!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
In your aliasrow class, is "enabled" a property or public variable? If it's
a property, is the set constructor empty?

Thanks,
Michael C., MCDBA
 
Hi,

Post the code for the mar's variable type , especifically the one dealing
with enabled , it's a property or an instance variable?
if it;s a property place a breakpoint in the set method

I believe somewhere, somehow the value of enabled is changed, maybe the Set
is not keeping the value.

cheers,
 
Back
Top