Re: [mono-android] Layout - Activity with ListView and TextView below it

2012-01-25 Thread James Lavery
Hi Andreas, Thanks for the tip - yes this looks a lot cleaner and I agree about 'less being more'. James -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Layout-Activity-with-ListView-and-TextView-below-it-tp5149952p5429728.html Sent from the Mono for Android mailin

[mono-android] Problem binding Sybase SQL Anywhere UltraLiteJNI12.jar

2012-05-14 Thread James Lavery
Hi all, We need to use a Sybase Ultralite database in our Mono for Android app (it's a port of an existing application, synchronising with a Sybase server database). I'm not aware of an existing Mono binding, so I'm setting off on the task of creating a binding library using the new project type i

Re: [mono-android] Problem binding Sybase SQL Anywhere UltraLiteJNI12.jar

2012-05-15 Thread James Lavery
Hi Jon, Thanks - renaming worked. I think I may want to remove it in fact - I'll try that too. Jonathan Pryor-2 wrote > > If you need the package, you may want to rename one of the members by > adding the "managedName" attribute: > > > path="/api/package[@name='com.ianywhere.ultra

[mono-android] 4.2.1 - "Could not find file" ...bin\debug on deploy

2012-05-17 Thread James Lavery
I've got a strange error on deploying a newly-constructed solution and initial test application. The solution builds OK, and gets a long way down deployment, before I get a dialog box saying: /There was an error building and deploying your application, see exception for more details./ Clicking th

Re: [mono-android] 4.2.1 - "Could not find file" ...bin\debug on deploy

2012-05-17 Thread James Lavery
I think I've found the source of my problem. I have references to other projects in my solution which are not targetting .NET Framework 2.0. Changing them to target .NET Framework 2.0 solves the problem. This raises the (probably simple) question - what is the highest .NET Framework which can be

Re: [mono-android] 4.2.1 - "Could not find file" ...bin\debug on deploy

2012-05-18 Thread James Lavery
Ah the penny has finally dropped! My referenced projects were ordinary .NET projects, not Mono For Android projects. That was my mistake. I've changed all projects to Mono For Android, and all is working fine. Apologies for being thick and wasting your time. Next thick question - what's PLP?

[mono-android] TinyIoC and Linking on release build

2012-07-06 Thread James Lavery
Hi All, I'm doing my first Release build, and am having problems with TinyIoC and resolving interfaces used via TinyIoC. The architecture we've got is: Solution Universal.Mobile.Droid.application - main application Universal.Mobile.Droid.Interfaces - contains definition of IUniversalMobileDroi

Re: [mono-android] TinyIoC and Linking on release build

2012-07-06 Thread James Lavery
Hi Atsushi, Thanks - that solved it. I was misreading the meaning of /linking/. I thought 'linking' meant the assemblies to /link/. Am I right in understanding that what it actually means is the assemblies to /remove/ if not needed? Regards, James -- View this message in context: http://mono

[mono-android] only calling code in spinner.ItemSelected handler from user input

2012-08-06 Thread James Lavery
Hi All, I've got a spinner with the following handler: This works fine when I start off with the 1st item selected (this has an ID of -1) - i.e. when first displaying the layout. However, I need to be able to set the spinner's position according to the Task object's previously selected answer, a

Re: [mono-android] only calling code in spinner.ItemSelected handler from user input

2012-08-08 Thread James Lavery
I found a workaround (thanks to a colleague). I've got a boolean which is set the first time the spinner itemSelected event is fired - which will be when the initialisation code is running. After this has been set, I then call the code inside the event. Works like a charm. -- View this messag

[mono-android] Object Reference not set... after GC_EXPLICIT on bound object

2012-08-24 Thread James Lavery
Hi all, I've created a Java Bindings Library, which binds the Sybase Ultralite Android library so that I can use it in Mono For Android. This is up and running and has been working well - until now! What we've found is that as soon as a GC_EXPLICIT is triggered, we're getting "Object reference no

Re: [mono-android] Object Reference not set... after GC_EXPLICIT on bound object

2012-08-24 Thread James Lavery
Jonathan, Thanks for the reply. Yes, I mention GC_EXPLICIT and then don't show it. Stupid me - copied one line too low in the output. Here it is properly: ResultSetConnection does /not/ subclass Java.Lang.Object. It is a plain C# object. ResultSet, PreparedStatement and Connection are supplied

Re: [mono-android] Object Reference not set... after GC_EXPLICIT on bound object

2012-08-24 Thread James Lavery
Jon, Yes - the problem was the fact that I was using a Finalizer when I didn't need to at all. All I needed to do was call ResultSetConnection.Close() in a finally {} block, and for Close() to just call ResultSet.Close(), PreparedStatement.Close() and Connection.Release() with no explicit Dispose(

Re: [mono-android] Problem binding Sybase SQL Anywhere UltraLiteJNI12.jar

2012-11-26 Thread James Lavery
In case others are interested in binding the Ultralite library, I got this working - full details are documented in an article I've written on it here . -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Problem-

[mono-android] Layout - Activity with ListView and TextView below it

2012-01-16 Thread James Lavery
Hi, I'm getting to grips with the layout system in Android, and am probably just being thick here... What I want is to have a ListView which displays a scrolling list of data retrieved from my service, with a TextView below it to show a 'please wait...' message when retrieving data (as in the 'Wri

Re: [mono-android] Layout - Activity with ListView and TextView below it

2012-01-16 Thread James Lavery
Hi Ben, Thanks - that positions them correctly relative to each other, but are there width/height (well, specifically height) attributes which I can use to make the ListView fill the space left by the TextView, or do I have to specify the height specifically, in px, to do this? James -- View this

Re: [mono-android] Layout - Activity with ListView and TextView below it

2012-01-17 Thread James Lavery
Hi Ben, Thanks a lot - that's what I needed to know, that I need to code for each layout/density. Other layout systems have attributes which allow one to specify that an item should fill remaining space, and I thought Android would have this. No problem! Thanks for your help. James -- View this

Re: [mono-android] Layout - Activity with ListView and TextView below it

2012-01-17 Thread James Lavery
Hi Chris, Thanks a lot - I'd looked at gravity, and it looked like what I might want but I wasn't sure. I'll look further into it! James -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Re-Layout-Activity-with-ListView-and-TextView-below-it-tp5152064p5153230.html Se

Re: [mono-android] Layout - Activity with ListView and TextView below it

2012-01-17 Thread James Lavery
Thanks - that's exactly what I wanted! I'd tried /almost/ exactly what you've posted. The crucial parameter was /layout_weight/ which is what I was missing. James -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Layout-Activity-with-ListView-and-TextView-below-it-t