[MonoTouch] RES: RES: Issue with CFRunLoop still in v1.1
José Antonio Leal de Farias
jalf at sharpgames.net
Fri Oct 2 15:42:47 EDT 2009
I send another issue with accelerometer days ago...perhaps it's the same bug..
José.
-----Mensagem original-----
De: Geoff Norton [mailto:gnorton at novell.com]
Enviada em: sexta-feira, 2 de outubro de 2009 16:41
Para: José Antonio Leal de Farias
Cc: <MonoTouch at lists.ximian.com>
Assunto: Re: RES: [MonoTouch] Issue with CFRunLoop still in v1.1
Jose
ok can you file a new bug and attach the sample and I'll take a
look in a bit. Thanks
Geoff Norton
On 2009-10-02, at 3:11 PM, José Antonio Leal de Farias <jalf at sharpgames.ne
t> wrote:
> Well..the log message is different..I think is another bug...
>
> -----Mensagem original-----
> De: Geoff Norton [mailto:gnorton at novell.com]
> Enviada em: sexta-feira, 2 de outubro de 2009 16:05
> Para: José Antonio Leal Farias
> Cc: MonoTouch at lists.ximian.com
> Assunto: Re: [MonoTouch] Issue with CFRunLoop still in v1.1
>
> Jose,
>
> Are you getting the same crash as before? If so can you reopen the
> bug and attach the new test case and I'll take a look
>
> Thanks
>
> Geoff Norton
>
> On 2009-10-02, at 2:45 PM, José Antonio Leal Farias
> <jalf at sharpgames.net> wrote:
>
>> Folks,
>>
>> I'm getting a new error using UIAccelerometer and CFRunLoop together
>> in v1.1. Check this code:
>>
>> using MonoTouch.CoreFoundation;
>> using MonoTouch.Foundation;
>> using MonoTouch.UIKit;
>> using System;
>>
>> namespace LoopTest
>> {
>> public static class Accelerometer
>> {
>> public static void SetupAccelerometer()
>> {
>> // Setup the accelerometer
>> UIAccelerometer.SharedAccelerometer.UpdateInterval = 1/30;
>> UIAccelerometer.SharedAccelerometer.Acceleration +=
>> UIAccelerometerSharedAccelerometerAcceleration;
>> }
>>
>> private static void
>> UIAccelerometerSharedAccelerometerAcceleration
>> (object sender, UIAccelerometerEventArgs e)
>> {
>> Console.WriteLine("Move");
>> }
>> }
>>
>> [Register ("AppDelegate")]
>> class Program : UIApplicationDelegate
>> {
>> public override void FinishedLaunching (UIApplication app)
>> {
>> Accelerometer.SetupAccelerometer();
>> while (true)
>> {
>> while(CFRunLoop.Main.RunInMode(CFRunLoop.ModeDefault,
>> 0,true) ==
>> CFRunLoopExitReason.HandledSource);
>> Tick();
>> }
>> }
>>
>> void Tick()
>> {
>> Console.WriteLine("Tick");
>> }
>>
>> static void Main (string [] args)
>> {
>> UIApplication.Main (args,null,"AppDelegate");
>> }
>> }
>> }
>>
>> My application crash all the times. It's a bug or I'm doing something
>> wrong?
>>
>> José.
>>
>>
>>
>>
>>
>> _______________________________________________
>> MonoTouch mailing list
>> MonoTouch at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
>
More information about the MonoTouch
mailing list