Re: [Monobotics-develop] [ES] Error al acceder a atributo heredado desde objeto hijo.
Brought to you by:
buhochileno
|
From: <buh...@gm...> - 2009-09-14 21:39:25
|
Jaime Alvarado wrote:
> Hola. En la escena hay dos objetos de tipo X10Module y X10Cm11.
>
> X10Module
> {
> private X10Interface interface; // desde el inspector asocio esta
> propiedad con el objeto Cm11 presenta en la escena
> SetAddress() // Esta función la llamo desde el initialicesimulation
> {
> interface.Transmit();
> }
> }
>
> X10Interface
> {
> private serialport Port;
>
> Transmit()
> {
> string msg = this.Port == null ? "null" : "no null";
> ISE.IConsole.Write(msg); // Cuando se ejecuta esta función dice
> que port es "null".
> }
> }
>
Esta clase tiene la parte "Designer" con el "LoadResources" donde se
re-crea el Port verdad?, de donde hereda X10Interface? y necesito ver su
constructor...
> X10Cm11 : X10Interface
> {
> SetInterfaceClock() // Esta funcion la llamo desde el
> initicalicesimulation
> {
> string msg = this.Port == null ? "null" : "no null";
> ISE.IConsole.Write(msg); // Cuando se ejecuta esta función dice
> que port es "no null"
> }
> }
>
> --------------------------------------------------
> From: <buh...@gm...>
> Sent: Monday, September 14, 2009 9:18 AM
> Cc: "monoBOTICS Developers" <mon...@li...>
> Subject: Re: [Monobotics-develop] [ES] Error al acceder a atributo
> heredado desde objeto hijo.
>
>> Necesitaria un extracto de codigo (code snippet) para entender mejor la
>> situacion, pero tal vez el esquema del Sabertooh2x5Kit te ayude, en el
>> proyecto MBF.RobotKit existe el kit SaberTooth2x5Kit que hereda de
>> SaberTooth2x , hay puedes ver que las funcionalidades estan
>> implementadas en la clase padre SaberTooth2x pero los objetos
>> propiamente tal estan y se usan en SaberTooth2x5Kit...
>>
>> Mauricio
>>
>> Jaime Alvarado wrote:
>>> Hola.
>>> Tengo una clase X10Cm11 la cual hereda desde X10Interface la cual
>>> hereda de Domokits y a la vez esta compuesta de un serialport. (No
>>> supe como heredad directamente desde SerialKit).
>>> Pasa que desde la clase X10Cm11 puedo acceder al serialport, no hay
>>> ningun problema pero cuando ocupo las funciones de x10Interface para
>>> acceder al serialport desde X10Cm11, esta dice que: object reference
>>> not set to an instance of an object, lo cual no entiendo ya que el
>>> miembro serialport dice que es null, pero desde los metodos de CM11
>>> dice que no es null pudiendo operar el serialport sin ningun problema.
>>> ------------------------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day
>>> trial. Simplify your report design, integration and deployment - and
>>> focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> Monobotics-develop mailing list
>>> Mon...@li...
>>> https://lists.sourceforge.net/lists/listinfo/monobotics-develop
>>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Monobotics-develop mailing list
>> Mon...@li...
>> https://lists.sourceforge.net/lists/listinfo/monobotics-develop
>>
>
|