Touch cable when using a Spider with a T35 LCD display

Exception received is
Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
The thread ‘’ (0x3) has exited with code 0 (0x0).
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (4) ####

Etc:

I receive this exception if I touch the LCD screen and assume that it is caused by a unhandled ‘Touch event’.

I have a cable connected between LCD socket T and to Socket 10 (A,I,T,X).

I am NOT using Touch or have I implemented any code to handle a touch event.

My question is, what are the ‘official rules’ when using the T35 with regard to Touch.

Just do not connect the cable?
Handle the event?

I only ask because I have never seen this exception before. Sometimes I have the T cable connected and sometimes not.

If it matters, I am now using a Module Connection Power between the LCD and Spider.

I am just curious and NOT a issue with me.

“Unhandled” touch events shouldn’t raise null reference exceptions.

Based on common sense.
All I am saying is that SDK should be robust enough and check for nulls.

@ Architect -

“Unhandled” touch events shouldn’t raise null reference exceptions.

That is what I thought. I asked because I have never seen the exception before.

Maybe I’ll play around and see if I can track down what code is being called.

@ andre.m - it is a GHI issue since it is in the driver code for the display module.

I am on a train, I will check later.

early in gadgeteer, there would be an exception if the touch cable was not connected.

Looking at the source code for the T35 driver, there are two constructors; one with touch and one without. Try not connecting the T cable in the designer.

@ Mike -

I am not a professional programmer so I just poke around until I find something.

I finally got VS2010 to display something about the exception but I have no idea if it is useful to anyone.

I was just displaying some bitmaps to the LCD and there is nothing ‘fancy’ in the code.

Image shows what I was able to find.

Added:
Try not connecting the T cable in the designer.

I do not have the issue then as I would expect. However, I would still wonder why it breaks the application.

[quote]Try not connecting the T cable in the designer.

I do not have the issue then as I would expect. However, I would still wonder why it breaks the application.[/quote]

I just tried connecting a T35 module to a XXX mainboard, and removed the T cable from the designer. I had no problem with touch and no event registration.

I guess the thought was if you included the T cable then you wanted touch event. If you forgot to register, an exception reminds you to register.

But, still not good programming practice. Should not throw an exception if not registered for touch.

I have added this to the tracker:

https://www.ghielectronics.com/tracker/entry/2