January 2010 - Posts - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

News

Please goy buy 3-4 copies of my book on MonoTouch titled "Professional Android Programming with Mono for Android for .NET/C# Developers." They make great gifts all year round. Plus, I get about $.25 when you buy a copy.

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, MonoTouch, MonoDroid, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

January 2010 - Posts

  • Application running in the iPad Simulator

    I've got some code running in the iPad Simulator.  One thing I discovered is that an application has to be compiled against a specific version of the SDK.  When I created a new iPad application, the updated iPad window for the Interface Builder became available.  Very nice indeed.  Everything was the same as before, so that was good.  I fired up the iPad Simulator, and I got this below:


    The next step was getting my app on there, which was easy.  Then I got my app running on the simulator, and I saw this:


    Basically, everything is filled with goodness and seems to be running correctly.  **fingers crossed**

     

    PS. Somebody on twitter thinks I violated the Apple NDA by putting up an image of what I did. I don't know if I have or haven't, but I've removed them.

  • Developing for the Apple iPad in .NET

    If you are in the technology field, or within the listening range of modern media, you've heard of the Apple iPad.  The fact that it runs an updated version of the Apple iPhone OS is a big plus if you are looking to do development on the platform.  I've already received a bunch of emails about this, so I wanted to share what you can do to do develop on the platform right now.

    First, make sure you mac is running Mac OS 10.6.2.  Next, go get the Apple iPhone SDK 3.2 from the apple developer site. This is beta, so expect updates to it.  Now, go get MonoDevelop Version 2.2.1 for the Mac.  Finally, go get a copy of MonoTouch 1.4.7 (or most recent version).  Once everything is installed, go into MonoDevelop and go to Help -> Updates and check for updates on the experimental channel.  You should find MonoTouch 1.9 alpha.  Download and install it.  Now, you should have everything you need.  From here, you can create an iPhone application with .NET.  This is the same as it is with the shipping versions.  If you look at creating a new solution, you can create an iPad Solution.  Starting and debugging an application brings up the iPad simulator.  Very nice indeed.
  • The iPhone 20 second rule

    If you didn't know it, the iPhone has two twenty second rules that developers need to pay attention to:

    • The iPhone has a startup timer. If an application takes longer than 20 seconds to start up, it is killed by the iPhone OS.
    • The iPhone OS will kill any application that is unresponsive for longer than 20 seconds. To work around this, you will need to perform some type of asynchronous operation.
    The lesson learned on this is that asynchronous processing is a good thing to learn and understand.

    Want to know more about developing with the iPhone?  Check out my Wrox Blox eBook on developing applications with MonoTouch for the iPhone/iPod touch for .NET/C# developers.

  • One thing I don't like about MonoTouch applications

    With .NET, executables are fairly small. Every application shares the .NET Framework, so the applications don’t have their own copy of the framework. MonoTouch is not built into the iPhone. MonoTouch applications must have their own copy of the framework. MonoTouch is compiled into your application. The result is that MonoTouch applications are larger on disk than a comparable .NET application.  Think starting at 5 megabytes for the MT framework and going up from there vs very small with .NET exes.

    Want to know more about developing with the iPhone?  Check out my Wrox Blox eBook on developing applications with MonoTouch for the iPhone/iPod touch for .NET/C# developers

  • Safari and WebKit Development for iPhone OS 3.0

     book cover

    I bought this book a few weeks ago. I've been reading it and trying to absorb the features in the iPhone's version of Safari.   I'm impressed.  This book contains a huge amount of information about Safari on the iPhone.  So, why is this important when you can have apps on the iPhone? Have you tried to get an app onto the iPhone?  Its not an immediate process by any stretch of the imagination.  With a web application, you can deploy applications immediately to the iPhone without having to go through Apple's AppStore process.  Its a great read and is very educational.

  • UIAlertView - the alert box for the iPhone

    There are times when the user needs to be presented with some information or question. MonoTouch has a UIAlertView object. The UIAlertView is instantiated with a set of parameters. On the object instance, the .Show() method is called. For .NET developers, this is similar in concept to the .NET MessageBox. For JavaScript developers, this is similar to the window.alert() and window.confirm() methods. 

                    var av = new UIAlertView("Badness happened"                    , "The scheme '" + prot + "' is not supported on this device.",                    null, "Ok thanks", null);                av.Show(); UIAlertView

    Want to know more about developing with the iPhone?  Check out my Wrox Blox eBook on developing applications with MonoTouch for the iPhone/iPod touch for .NET/C# developers

  • ASP.NET MVP for 2010

    I want to thank Microsoft for naming me an ASP.NET MVP for 2010. 

  • Opening another application on the iPhone using NSUrl

    The NSUrl class is what allows an application to open other applications within the iPhone OS while passing parameters. The calling sequence is fairly simple. There are two steps to making this call:
    1. When the NSUrl class is instantiated, a string representing the URL scheme is called. Note that different applications will have different schemes and use different protocols.
    2. The static method UIApplication.SharedApplication.OpenUrl(ns) is called, where ns is the NSUrl class. When the static method is called, if it is not possible to open a URL, a false is returned. If it is possible to open the URL that is passed, the URL is opened and a true is returned.

     Some code to do this looks like:

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    NSUrl ns = new NSUrl(prot + first + sec.Trim());

    if (!UIApplication.SharedApplication.OpenUrl(ns))

                {

                    var av = new UIAlertView("Badness happened"

                        , "The scheme '" + prot + "' is not supported on this device.",

                        null, "Ok thanks", null);

                    av.Show();

                }

    Ok, this all sounds cool, now lets look at the format of the url schemes that you can pass into NSUrl.  For a list of them, check out: Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} http://wiki.akosma.com/IPhone_URL_Schemes

    Want to know more about developing with the iPhone?  Check out my Wrox Blox eBook on developing applications with MonoTouch for the iPhone/iPod touch for .NET/C# developers.  

2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems