could be. I never did VB - I went from Delphi straight into C#, via Java. :)
On Mon, Oct 31, 2011 at 21:30, Dean Cleaver <[email protected]> wrote: > Sounds more like VB and late binding. > > Dino > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Nic Wise > Sent: Monday, October 31, 2011 4:17 PM > To: [email protected] > Cc: [email protected] > Subject: Re: [MonoTouch] XCode 4.2 > > BTW, if you are thinking "thats very different to .NET!" - you are right. > > Obj-C is not a method-call model. It's a message passing model. Think of it > like this: > > .NET: > > foo.DoSomething(); > > // COMPILER (or linker, or runtime) error if the version of the DLL which has > foo in it, doesn't have DoSomething() > > in Obj-C, you are not calling a method, you are sending a message, so > > [foo doSomething]; > > sends a message to foo, tells it to run doSomething. If it doesn't have a > doSomething, you get an exception (kinda) or it calls the "missing method" > routine. I think. But the linker doesn't care, nor does the compiler (tho it > checks). It's all dynamic at runtime. > > > > On Mon, Oct 31, 2011 at 21:14, Nic Wise <[email protected]> wrote: >> You dont need both installed. >> >> If you make an app with 4.2 (and MT5), it will work just fine on a >> iOS4 (or 3.1.3) device as long as you dont call any methods which are >> not available in the version your user is using. >> >> So lets say you have a class called UIMyCoolView. It has the following >> methods: >> >> void DoABasicFunction(); (available for 3.0 onwards) void >> DoSomethingSlightlyCooler(); (4.1 onwards) void >> DoSomethingInTheCloud(); (5.0 onwards) >> >> if you call >> >> var coolview = new UIMyCoolView(); >> coolview.DoABacicFunction(); // this will work on all devices >> coolview.DoSomethingSlightlyCooler(); // this will crash / throw an >> exception on 4.0 or 3.x, but work on 4.1 or better >> coolview.DoSomethingInTheCloud(); // will cash on 4.x or 3.x, workd on >> 5.x >> >> So, this piece of code is going to be VERY useful to you: >> >> public static bool IsIOS41OrBetter >> { >> get >> { >> string version = >> UIDevice.CurrentDevice.SystemVersion; >> >> string[] versionElements = >> version.Split('.'); >> >> if (versionElements.Length > 0) >> { >> int versionInt = 0; >> int minorVersion = 0; >> if >> (Int32.TryParse(versionElements[0], out versionInt)) >> { >> if >> (Int32.TryParse(versionElements[1], out minorVersion)) >> { >> if (versionInt >> >= 5) return true; >> >> return >> (versionInt >= 4 && minorVersion >= 1); >> } >> } >> >> return false; >> >> } >> >> return false; >> >> } >> >> } >> >> (4.1 is my minimim) >> >> this lets me doing things like this: >> >> public static UIKeyboardType DecimalKeyboardType >> { >> get >> { >> if (IsIOS41OrBetter) >> { >> return >> UIKeyboardType.DecimalPad; >> } >> return >> UIKeyboardType.NumbersAndPunctuation; >> } >> } >> >> UIKeyboardType.DecimalPad only exists in 4.1 or newer. >> >> Does that make sense? >> >> This is why iPod Touch 3rd gen (basically, a 3G without the phone) are >> so valuable - you can keep them on 4.2 for testing, or better yet, >> keep them on 4.0 or 3.1.3 if you need to support that far back. >> Personally, I stop at 4.0 now. >> >> >> >> 2011/10/31 Andreas Ploetzeneder <[email protected]>: >>> Hi, >>> how can i make Adhoc distributions for devices with ioS 4 with Xcode >>> 4.2 or can i install it parallel to XCode 4.1 >>> >>> -- >>> >>> >>> >>> >>> >>> Mit freundlichem Gruß, >>> >>> Andreas Plötzeneder >>> CEO >>> ihr ploetzeneder it-solutions Team >>> Mobile Development – Desktopanwendungen – Webanwendungen >>> Tel: +43 720 30 30 24 10 >>> Fax: +43 720 30 30 24 20 >>> Email: [email protected] >>> web: http://www.ploetzeneder-it.com >>> >>> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich und >>> ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der >>> vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so >>> löschen sie diese bitte und informieren Sie den Absender. Jede Form >>> der Verbreitung oder Veröffentlichung der E-Mail, sei es in ihrer >>> Gesamtheit oder in Teilen, die nicht ihrem Zweck dient, ist >>> unzulässig. Das Internet kann die Unversehrtheit dieser Mitteilung >>> nicht garantieren. ploetzeneder it-solutions übernimmt daher keine Haftung, >>> falls die E-Mail geändert wurde. >>> >>> >>> >>> _______________________________________________ >>> MonoTouch mailing list >>> [email protected] >>> http://lists.ximian.com/mailman/listinfo/monotouch >>> >>> >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken | >> http://www.linkedin.com/in/nicwise >> b. http://www.fastchicken.co.nz/ >> >> Nearest Bus: find when the next bus is coming to your stop. >> http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your >> pocket. >> http://goo.gl/IuBU >> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa >> London Bike App: Find the nearest Boris Bike, and get riding! >> http://goo.gl/Icp2 >> > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise > b. http://www.fastchicken.co.nz/ > > Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your > pocket. > http://goo.gl/IuBU > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London > Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
