Mono And The Touch Screen


Pleng

Well-Known Member
Joined
Dec 28, 2006
Messages
3,030
I've finally decided to build my idea for an application in VB.Net, in the hope that I will be able to compile it for Pandora using Mono.

I was wondering if it is possible within Mono to access the touch screen? Or, will the touch screen automatically be recognized by the underlying Pandora's OS as mouse commands? ie will touching a part of the screen automatically create a 'click' event, or will I need to do additional coding to recognize these events in my application? Or, in the worst case scenario, is the touch screen totally out of bounds when using Mono?
 
Last edited by a moderator:
Pleng said:
I was wondering if it is possible within Mono to access the touch screen?
My opinion (just guess, not knowledge) is that the same way, as touch screen in original MS .NET (compact) framework. If you don't find solution, send me PM, I'll like to help you with this (as I'll migrate to .NET early anyway).
 
Last edited by a moderator:
Pleng said:
I was wondering if it is possible within Mono to access the touch screen? Or, will the touch screen automatically be recognized by the underlying Pandora's OS as mouse commands? ie will touching a part of the screen automatically create a 'click' event, or will I need to do additional coding to recognize these events in my application? Or, in the worst case scenario, is the touch screen totally out of bounds when using Mono?
The touch screen does behave from a programatic point of view like a mouse by default.
 
Last edited by a moderator:
Eniko said:
Is it going to be practical programming in .NET/Mono for the Pandora? I mostly rejected this but I admit I haven't done any actual research into it.
It should be possible at least, and it's already ported to nokia tablets (http://www.mono-project.com/Maemo)
 
Last edited by a moderator:
peca said:
Pleng said:
I was wondering if it is possible within Mono to access the touch screen?
My opinion (just guess, not knowledge) is that the same way, as touch screen in original MS .NET (compact) framework. If you don't find solution, send me PM, I'll like to help you with this (as I'll migrate to .NET early anyway).


Thanks. I'll have a scout around and see what I can find out. If I don't find anything I'll take you up on your offer and send a PM.


Eniko said:
Is it going to be practical programming in .NET/Mono for the Pandora? I mostly rejected this but I admit I haven't done any actual research into it.
It's probably not practical, and I wouldn't reccomend it anybody else. But I don't have the time to learn another language, especially as I can't find any development tools on Linux which is even remotely as friendly as Visual Studio.

sindbad said:
The touch screen does behave from a programatic point of view like a mouse by default.
In that every tap on the screen is treated as a left mouse click?
 
Last edited by a moderator:
Pleng said:
especially as I can't find any development tools on Linux which is even remotely as friendly as Visual Studio.
You can do C++ SDL development and do all your dev in Visual Studio on a PC, then just build for the Pandora once in a while for comparision (assuming you don't do anything windows specific in your code)
 
Last edited by a moderator:
For all intents and purposes, mono programming is the same as java programming, it's supported and a good way to whip up an app and build on it later.
for VB.NET you will need the compiler VBNC, I have no idea if it's included by default now. you compile VBNC on a MS box with the MS VB compiler and then you use it on linux/mono.

The touchscreen is a standard mouse in X (by default).
just remember, in linux EVERYTHING is a file, reading hardware is as easy as opening a file and parsing strings in 85% of cases.

EDIT:
There is nothing (free) on linux that even remotely compares to Visual Studio. I like monodevelop but it looks like it's written by toddlers compared to VS2008 (especially with a good refactor plugin installed).
Some would say Eclipse rivals VS, but I say it only does for java programming
 
benjymous said:
Pleng said:
especially as I can't find any development tools on Linux which is even remotely as friendly as Visual Studio.
You can do C++ SDL development and do all your dev in Visual Studio on a PC, then just build for the Pandora once in a while for comparision (assuming you don't do anything windows specific in your code)


But I can't do C++ or SDL...


Yannick said:
For all intents and purposes, mono programming is the same as java programming, it's supported and a good way to whip up an app and build on it later.
As far as see it's the pnly way to 'get the job done' without taking a massive amount of time out to learn a whole new language.

I'm well aware that the end-result will be a lot moreresource-hungry than had it been coded using another method, but that's not too much of an issue for this application; it's not something that you're really going to need to multitask with, so as long as it runs on the hardware then I'm happy.

At the end of the day, I'm only coding this as it is an app that I would find useful. If others also find it uselful then that's great. But I'm not going to learn a whole new langauage/development system just so that other users can play quake whilst taking lecture/meeting notes with their Pandora (!) :p
 
Last edited by a moderator:
Pleng said:
But I'm not going to learn a whole new langauage/development system
Hi Pleng,

Your app looks like a great idea and if you can do it in Mono more power to you! However, I'd just like to put in a quick word to encourage you to maybe consider learning other languages. It's really not all that hard - unless you switch from procedural (e.g. basic, c++, java, pascal etc.) to declarative (lisp etc.) then the concepts are mostly all the same. About the one thing that will trip you up most is going from a language with a garbage collector (mono, java etc.) to a language without (c++, c etc.)

As far as IDEs go - consider taking the time to learn Eclipse. Eclipse exists on all major OSs and is an IDE that can has been adapted to a wide variety of languages. The advantage of this is that when you start learning a new language you don't have to learn a new IDE as well. Thus, your investment of time to learn Eclipse might be more future proof than learning another IDE (but I have to admit when I started using Eclipse it threw me for a loop!)

If you're dead set on learning only one language then Mono might not be a bad choice. However, I'd actually suggest you choose one of the scripting languages like Python or Ruby - they're available on a wide platform, they're powerful languages and they have good support for underlying libraries.

Just my 2 cents worth (I've been programming for a LONG while now - perhaps one day I'll get it right!)

All the best.

John H.
 
Last edited by a moderator:
If memory wasn't a concern I'd say that Mono would be a great choice for this application. However, I have no real objective way to say that Pandora's amount of ram is actually going to be a problem since I have no experience with mono on portable devices. I think you could tentatively go with Mono as long as you are willing to start over if Mono performance is poor on Pandora.

If I was doing the development and Mono didn't end up cutting it, I'd probably learn python. Python seems to be really useful with a low barrier to entry.
 
As someone who's programmed extensively in both C# and Python I'd have to echo the support for Python if you find that Mono doesn't work out for you. While there obviously are a lot of differences for me the two languages top my list of preferred languages due to ease of use, readability and encouraging proper coding practices. (although with Python it's best if you already have those)

Though I'm still really curious to see how Pandora/Mono will work out, obviously. :)
 
The memory overhead is going to be low. a couple of megabytes.
The JIT phase during assembly loading could be very slow if you use alot of libs, due to the slow storage of the pandora. This gets solved by installing a *native image* in the GAC, this does require running a post install script.


for people that want to learn C++ if you already know C#, i'd recommend:
google boost & stl, the name of your next love is shared_ptr
don't be afraid to do strict OOP in one part of your program and throw the rules out the window in another part
 
Hi guys thanks for all the feedback

Learning another language simply isn't an option, as far as I'm concerned. I've got too much on board studying for uni. If I can't get it working with Mono on Pandora then I'll either switch to WinCE and develop it for another device or (more probably, as I doubt I'll be able to afford a WinCE device any time soon) shelve it completely.

I've developed the user interface (attached an image below) and most of the functionality is working (minus the actual recording and playback of any audio file - I think I'm going to interface an external command-line application for that). There are a couple of minor bugs that crept in today but I should be able to fix them pretty easily.

audionote.jpg
 
Yannick said:
There is nothing (free) on linux that even remotely compares to Visual Studio. I like monodevelop but it looks like it's written by toddlers compared to VS2008 (especially with a good refactor plugin installed).
Some would say Eclipse rivals VS, but I say it only does for java programming
I've been using Eclipse in a professional environment for two years now. All of our development is done using Eclipse except for one Windows .NET app. Eclipse does indeed rival VS. Both have their advantages and disadvantages. Eclipse is a memory hog (due to the Java VM) and somewhat slow but the number of plugins and shear functionality it offers makes up for those deficiencies. VS on the other hand is quick and lean and has a very intelligent auto complete functionality but it has a limited nubmer of (free/affordable) add-ins.

Many people think Eclipse is for Java development only but here's a list of what I've personally used Eclipse to develop for:

* Java desktop app
* Java EE web app for the apache geronimo j2ee server
* Javascript
* JSP
* Php
* C/C++ for x86 (mingw and cygwin)
* C/C++ for arm including JTAG debugging from eclipse
* Nesc for TinyOS wireless sensor nodes
* Android

Being able to seamlessly develop for all of these applications from one IDE is incredibly nice. Eclipse is far from perfect and I know some people won't even consider it due to the resources it requires but its better than any other light weight IDE I've tried.
 
Last edited by a moderator:
Back
Top