FEZ Hydra T35 touch support in 4.2

Is FEZ Hydra touch support on the T35 still broken?

This doesn’t do anything:


        void ProgramStarted()
        {
            window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.mainWindow));
            GlideTouch.Initialize();
            Button button = (Button)window.GetChildByName("instance478");
            button.TapEvent += new OnTap(button_TapEvent);
            Glide.MainWindow = window;
            Thread.Sleep(-1);
        }

        void button_TapEvent(object sender)
        {
            Debug.Print("Tap!");
        }

My FEZHydra assembly file is version 1.1.1.0.

Take a look at this sample program http://www.tinyclr.com/codeshare/entry/349

Touch initialize is at a different position in the code.

Plus in a Gadgeteer app you cannot do a thread.sleep forever in programstarted(). You have to let it return.

Thanks for the suggestions Mike and Brett. Unfortunately, it still doesn’t work. Here’s the full Program.cs:

Note that I’m compiling Glide and running the project against 4.2. A lot of the examples I’ve found are for 4.1 (like the sample project you sent me, Mike).


using System;
using Microsoft.SPOT;
using GHIElectronics.NETMF.Glide;
using GHIElectronics.NETMF.Glide.Display;
using GHIElectronics.NETMF.Glide.UI;

namespace GadgeteerApp2
{
    public partial class Program
    {
        static Window window;
        void ProgramStarted()
        {
            GlideTouch.Initialize();
            window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.mainWindow));
            Glide.MainWindow = window;
            Button button = (Button)window.GetChildByName("instance478");
            button.TapEvent += new OnTap(button_TapEvent);
        }

        void button_TapEvent(object sender)
        {
            Debug.Print("Tap!");
        }
    }
}

…anyone?

What is your window looks like?

FEZ Hydra and I think G120 have a known issue w/ T35 & TE35 touch where touch up is fired immediately after touch down, whether you have are still touching the screen or not. This could easily affect taps in Glide. No releases have been made since the issue was found. Hopefully soon?

andre, I tried your code. The event never fires.

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;

namespace GadgeteerApp2
{
    public partial class Program
    {
        static Window window;
        void ProgramStarted()
        {
            window = display_T35.WPFWindow;
            window.TouchDown += new Microsoft.SPOT.Input.TouchEventHandler(window_TouchDown);
        }

        void window_TouchDown(object sender, Microsoft.SPOT.Input.TouchEventArgs e)
        {
            Debug.Print("Does it work?");
        }

    }
}

Any other ideas?

Make sure you read the notes on that one, there’s no calibration on it.

Lame.