K
Kristof Berger
Hi guys,
if got a little stuck in the last hours and can't find a way out. Maybe you
can.
Imagine class derived from component called "ObjectAccessor".
Next imagine a control derived from Textbox, but extended with a property
called "Accessor" of type "ObjectAccessor" and a property called
"AccessProperty" of type string, using it's own UITypeDesigner.
In the designer I can now drop an Instance of ObjectAccessor onto my page
and set it's properties.
Then I drop an instance of my TextBox-derived thingy onto the page. I can
set the property "Accessor" to the component. Even the UITypeDesigner
displays a combobox, containing all entries I expect (dependant on a
property set in the Accessor-component).
BUT:
In the initialize_components method there is the following code:
this.objectAccessor1 = new ObjectAccessor(this.component);
this.objectAccessor1.DescriptionFile = "any_description_file.xml";
That's fine and works.
But im missing the line, that assigns the component to the control, as set
in the designer.
I see the assignment in the HTML-source (accessor="objectAccessor1"), but
this only produces an error telling me, that no code could be created for on
object of type ObjectAccessor.
I browsed around for hours now, searching for hints. All I saw was dealing
with TypeConverters and/or CodeDomSerializers.
Am I going in the right direction?
Any hintsd would be greatly appreciated!
TIA!
- Kristof
if got a little stuck in the last hours and can't find a way out. Maybe you
can.
Imagine class derived from component called "ObjectAccessor".
Next imagine a control derived from Textbox, but extended with a property
called "Accessor" of type "ObjectAccessor" and a property called
"AccessProperty" of type string, using it's own UITypeDesigner.
In the designer I can now drop an Instance of ObjectAccessor onto my page
and set it's properties.
Then I drop an instance of my TextBox-derived thingy onto the page. I can
set the property "Accessor" to the component. Even the UITypeDesigner
displays a combobox, containing all entries I expect (dependant on a
property set in the Accessor-component).
BUT:
In the initialize_components method there is the following code:
this.objectAccessor1 = new ObjectAccessor(this.component);
this.objectAccessor1.DescriptionFile = "any_description_file.xml";
That's fine and works.
But im missing the line, that assigns the component to the control, as set
in the designer.
I see the assignment in the HTML-source (accessor="objectAccessor1"), but
this only produces an error telling me, that no code could be created for on
object of type ObjectAccessor.
I browsed around for hours now, searching for hints. All I saw was dealing
with TypeConverters and/or CodeDomSerializers.
Am I going in the right direction?
Any hintsd would be greatly appreciated!
TIA!
- Kristof