473,473 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

(WTF)Assignment Operator Not Working!

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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Nov 16 '05 #1
3 1436
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

"x0td" <x0****@hotmail-dot-com.no-spam.invalid> wrote in message
news:41**********@Usenet.com...
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Nov 16 '05 #2
x0td <x0****@hotmail-dot-com.no-spam.invalid> wrote:

<snip>
(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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
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,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"x0td" <x0****@hotmail-dot-com.no-spam.invalid> wrote in message
news:41**********@Usenet.com...
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas Pfaff | last post by:
Hello all, I started using the nice Pythonwin IDE together with Python 2.3 (I have come to prefer its editor to IDLE). My problem is, that when I want to run a script in the debugger, I can...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
13
by: Mike MacSween | last post by:
Well, I suppose it was only 20 minutes work, but it would have been nice if I'd been prompted to save that new code module. After all, they ask you if you want to save new forms, reports etc.
20
by: jason | last post by:
hello everyone. can anyone tell me why this chunk of code: if (Convert.IsDBNull(oCommand.Parameters.Value)) { p_nErrorCode = 10; p_sErrorMessage = "Login failed, no matching credentials found";...
9
by: CJ Taylor | last post by:
Ok... someone help me understand this... Now I've been reading a couple articles on the GC in .NET and wondering why my application is sucking up memory, I release the resources (even call...
6
by: comp.lang.php | last post by:
I'm involved in a rather nasty debate involving a strange issue (whereby the exasperated tell me to RTFM even after my having done so), where this is insanely possible: print_r(is_int('1'));...
4
by: Dave Mennenoh | last post by:
Can anyone explain to me what I'm doing wrong here? These three lines are my upload script. As it's shown here it works - except that I'm not using the $folder variable, which I need. I just have...
4
by: Scott Durrett | last post by:
I have 2 pages. Page1 is a .html page with a form, hidden input, and a submit button. I have the action set to Post. <form id="form1" action="paymentcatch.aspx" method="post"> <input...
6
by: skanemupp | last post by:
so i used py2exe and i have the build and the dist-folders. in the distfolder there is a Calculator.exe file. when i run it it just says "Calculator.exe has stopped working" in a popup but the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.