MarshalByRefObject

  • Thread starter Thread starter Atmapuri
  • Start date Start date
A

Atmapuri

Hi!

My Component contains an object derived
form the System.MarshalByRefObject.

But when I add this component on the Form,
the object inspector does not display the public
properties of the MarshalByRefObject.

Only those of the component are present
and the child object is grayed out.

How can I display the properties of the child
object in the object inspector?

Thanks!
Atmpuri.
 
Atmapuri said:
My Component contains an object derived
form the System.MarshalByRefObject.

But when I add this component on the Form,
the object inspector does not display the public
properties of the MarshalByRefObject.

Only those of the component are present
and the child object is grayed out.

How can I display the properties of the child
object in the object inspector?

Which properties are you thinking of? MarshalByRefObject doesn't *have*
any public properties.
 
Hi!

My Component contains an object derived
form the System.MarshalByRefObject.
The derived class also introduces
new public properties.

Thanks!
Atmapuri.
 
Atmapuri said:
My Component contains an object derived
form the System.MarshalByRefObject.
The derived class also introduces
new public properties.

I'm not sure where MarshalByRefObject comes into it though - why do you
think that's an important factor in the problem?

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

See the code below. I would like to change the property

MyComponent.MyObj.Number

with the Object Inspector during the design time
on winform. Currently the property is dimmed out
in the object inspector.

Thanks!
Atmapuri

public class MyObj: System.MarshalByRefObject
{
private int number = 0;
public int MyNumber
{
get
{
return number;
}
set
{
number = value;
}
}

}

public class MyComponent: System.ComponentModel.Component
{
public MyComponent()
{
aField = new MyObj();
}
public MyObj NumberField
{
get
{ return aField; }
set
{
}
}
}
 
Hi!

But I posted fully compilible code
below my signature in the previous
email...

Thanks!
Atmapuri.
 
Atmapuri said:
But I posted fully compilible code
below my signature in the previous
email...

But it didn't demonstrate the problem, did it? We need to be able to
cut and paste your code, compile it, run it and see the problem. Your
code wasn't runnable - it was just two classes without Main methods.
 
Hi!
But it didn't demonstrate the problem, did it? We need to be able to
cut and paste your code, compile it, run it and see the problem. Your
code wasn't runnable - it was just two classes without Main methods.

Even then you wont be able to see the problem. You will still
have create an assembly, compile it and add it to the Toolbox
with Add/Remove Toolbox Items from the menu Tools->Options.

Then you will have to insert the component in to the form and
check that not all properties can be edited.

Thanks for your help.
Regards!
Atmapuri.
 
Atmapuri said:
Even then you wont be able to see the problem. You will still
have create an assembly, compile it and add it to the Toolbox
with Add/Remove Toolbox Items from the menu Tools->Options.

Ah, so it's only in the designer that things are going wrong? That
wasn't clear. I thought you had a properties page embedded in your
application.
Then you will have to insert the component in to the form and
check that not all properties can be edited.

I'm afraid I don't know much about the VS.NET property pages... I don't
think I'll be able to help you.
 
Back
Top