Few Questions about Glide

I’m using a ChipworkX Development Kit and I tried Glide, and have few questions

  1. Can I use a database for the dropbox menu and also for the data that will show up if an option is chosen? If yes, how?

  2. Can I use the directional pad as a controller aside from the touch feature that the Glide offers?

  3. Can I use a background image, for my work using the image option in Glide Designer?

Thank you. Help is very much appreciated.

[quote]1. Can I use a database for the dropbox menu and also for the data that will show up if an option is chosen? If yes, how?
[/quote]

I poked around the documentation and looks like the dropdown menu does not have a method to add items at runtime. This is work in progress and you should see something soon from GHI.

[quote]2. Can I use the directional pad as a controller aside from the touch feature that the Glide offers?
[/quote]
I think you can program the logic for this. Look at http://www.ghielectronics.com/glide/example/5/ as an example and see how the events are passed.

Yes you can.

Thanks for the help. :smiley:

  1. What I mean about the dropdown menu is that, can i retrieve the choices from a database?

Yes you can.

how can I do that? Can you give a sample code? please. thank you so much!

Rather than pass in dropdown.Options just do this

ArrayList options = new ArrayList()
{
    // Each object array contains Label, Data
    new object[2] { "Option #1", 1 },
    new object[2] { "Option #2", 2 },
    new object[2] { "Option #3", 3 },
    new object[2] { "Option #4", 4 },
    new object[2] { "Option #5", 5 }
};
list = new List(options, 150);

You can either keep the options in the XML, or use both XML and dynamic content, or just dynamic content. If you choose the later be sure to remove the options from the XML like this

<Glide Version="x.x.x">
  <Window Name="window" Width="320" Height="240" BackColor="dce3e7">
    <Dropdown Name="dropdown" X="100" Y="104" Width="120" Height="32" Alpha="255" Text="Select:" Font="4" FontColor="000000" />
  </Window>
</Glide>

@ Explore Did it help or you were looking for code to deal with database as well?

@ Architect, i need the code to deal with database if you may give me an example… please. help is very much appreciated! Thanks!

Have you seen this wrapper?

http://code.tinyclr.com/project/192/sqlite-wrapper/

Architect, no I haven’t. Thanks for the link though. Should I just use this library?
Btw, I have done database on Visual Studio Windows Application format, is the format the same as for NETMF? :slight_smile:

It is a bare minimum wrapper. If something is missing it should be easy to add. ;D

Apology for being naive. What do you mean by it should be easy to add incase something is missing?

No problem. All I am saying is that the code is all there and can be extended if needed.

@ Architect, sorry to bother you. but I don’t know how to start using the link you gave me. I downloaded it already. And now, I’m stuck on how to use it in my program. I badly need you help and it’s greatly appreciated! I hope you’ll reply Thanks!

@ Architect, I think I am somehow getting it. I tried to test it using the your Usage Example and I’m getting this error… I hope you can help me. :slight_smile:

Hi Explore

I am out of town. I will be back tomorrow and I will be able to help then.

Okay then Architect, i’ll be waiting for your help then.
Have a nice trip! :smiley:
Thank you.

Alright, I am back. Can you please show me your code?

I just tried the example in the link you gave me. Anyway, first am i doing this right.? Can you check the solution explorer.? as well as the breakpoint because of the unhandled exception. Thanks

This error comes up whenever i tried to run it.
An unhandled exception of type ‘System.NotSupportedException’ occurred in GHIElectronics.NETMF.SQLite.dll

Disclaimer: I don’t have a CWX device nor any interest in a datrabase :slight_smile:

I’d start by establishing the few statements work as you would expect - start a new project, select the ChipWorkX application template.

Add in SQLLite into the project references.
Add “using GHIElectronics.NETMF.SQLite;” in program.cs
then in your main app add:

            Database db = new Database();
            db.Open("SD:\file");

and see if you hit the same kind of errors?

(I noticed you didn’t have the GHIelectronics.netmf.hardware.ChipworkX reference in the image; perhaps you need it too?)