PhoneGap: Sencha Touch Kitchen Sink app
These steps assume the user has already setup PhoneGap 1.0, Xcode 4 and has configured it correct to build and run a sample app on the iPhone stimulator. For detailed instructions, visit Phone’s Getting Started with Xcode guide.
To build a PhoneGap app of the Sencha Touch Kitchen Sink demo
- Create a new PhoneGap project in Xcode, call it SenchaTouch_KitchenSink.
- In the Project Info section, change iOS Deployment Target to 4.2.
- In the Target Summary section, change Devices to Universal and Deployment Target to 4.2.
- Perform a Build to make sure it compiles and Run to install to iPhone or iPad Simulator.
- Add the PhoneGap’s www folder to the Project.
- Copy the Sencha Touch Kitchen Sink example code to the www folder.
- Copy sencha-touch-1.1.0/senchatouch.js and sencha-touch-1.1.0/examples/autotheme.js to the www folder, same folder as phonegap.js.
- Copy resources/css/sencha-touch.css to the resources/css/ of the PhoneGap’s www folder.
- Adjust path in index.js for senchatouch.js and auto theme.js to reflect the files are now in the same root folder as index.html.
- Edit the index.html in the root www folder to include the css and js for the Kitchen Sink demo.
- Edit the SenchaTouch_KitchenSink-Info.plist file and make sure ‘Supported interface orientations’ have the same options as ‘Supported interface orientations (iPad)’. This will allow the app to handle rotations.
- Item 0 Portrait (bottom home button)
- Item 1 Landscape (left home button)
- Item 2 Portrait (top home button)
- Item 3 Landscape (right home button)
- Perform a Build to make sure it compiles and Run to install to iPhone or iPad Simulator. If all goes well, the Kitchen Sink application should appear on your Simulator.
- For iPhone/iPod devices, If you want to use the Sencha Touch’s app icon and Splash screen:
- Copy resources/img/phone_startup.png from the www folder to the Resouces/splash folder of the Xcode project and rename the file to Default.png.
- Copy resources/img/icon.png from the www folder to the Resources/icons folder of the Xcode project and rename to icon-72.png.
- Take the file icon-72.png and make a 57×57 version of the image and save it as icon.png.
You can download my xCode source at my GitHub repository.
Links
Rule 11: No cutting through parking spaces
This rule is pretty simple and I have seen so many drivers do it. In a parking lot, I can’t drive through parking spaces to get across the lot. I have to drive in the designated driving lanes and not across parking spots.
This rule is more, it is just dangerous because people don’t pay attention and you never know what may happen if you cut across the lot.
Rule 10: Communist countries are off-limits to travel
I would like to travel to China, walk the Great Wall of China or go see the pandas or the Terracotta Army. But I have a rule of not travel to countries whose government is communism. Maybe it is after watching Locked Up Abroad but I worry about doing something that might be considered a crime in a country whose legal system is questionable.
A while back there was this American kid in Singapore who got in trouble for chewing gum. It is not like I am going to travel to communist countries to commit crimes but I would rather not go to jail for something that might be considered a non-issue back home.
Better safe than sorry because I am too pretty for jail.
Day 14: Be a Good Steward of Opportunities
It has been a while since my last post, not because my journey has ended but quite the opposite. My journey with God has grown immensely. I am so blessed by His grace.
There is a recurring theme since I took my leap of faith and changed employers some months back, a friend recently asked if I regret leaving a large corporation to go to a small local start-up. There is no doubt in my mind that I made the right decision and no hesitation to provide an answer and an update.
Where I am today would not be possible if I hadn’t taken care of past opportunities. From what I can gather, it all started 2 employers ago. I had just been placed on a new client project who 4 years later would be the large corporation whom I would leave in a leap of faith moment. That initial project would lead me down a road of incredible opportunities and making some amazing connections.
Most of the opportunities presented to me I like to think I acted correctly. I worked hard and was kind to those around me most of the time. I do realize at times I was not the most pleasant person to be around, I accept that fault and has promised to not repeat the mistakes as I have been given a second chance. Other times it was the result of the environment which lead to some lapse in judgement.
In looking back, I was presented one opportunity at a time and each opportunity I tried to be a good steward. One after another, person after person and here I am.
Every day I look at each opportunity in a different light, even if it is one I would not normally review I keep an open mind and look at it as a stepping stone. God brought it in front of me for a reason and I just hope I don’t screw it up and ruin my chances of the current leading to a future opportunity.
Rule 9: Categorize people I know
I put people I know into friendship categories and based on this category is my interaction with said person. I would do anything and everything I can legally to help out a friend but the degree of help is not all the same.
There is the top category, let’s call it Category A, and if you are in this category and you call me at 3am I will pick up the phone. But if you are in the bottom category, let’s call it Category Z, and you call me at 3am, I probably won’t answer the phone. Another way to look at the category is if you are in Category A and we discuss plans for Happy Hour, even if I don’t feel like going, I will keep the plan. But if you are in Category Z and we make Happy Hour plans, I am likely to flake out on you because I need my alone time, it just depends on what kind of day or week I have had.
The higher category a person is in, the more of an effort I will put forth to keep up social protocol like if you ask me how I am doing, I will say more than the social convention of ‘I am fine, how are you’ or if you ask me what I did this past weekend, I will tell you what I actually did instead of ‘nothing’ or ‘ran errands’.
I am always adjusting this internal category listing. So how many people is in this top category, not many. I can count them in one hand and right now that number is 2 and maybe 3, presently re-evaluating this third person.
Why do I have the need to categorize people I know? Well, it is to protect myself. I find myself always wanting to fix a problem or help out a person. This is not always a good idea because people lie. I do this so I won’t feel too bad for not helping you. I can say to myself since you have wronged me in the past then ‘no, I will not lend you money’ or ‘no, I won’t do that for you’ or ‘no, I can’t make lunch today’ or when you tell me you have a problem my answer will be ‘uh-oh’ even if I have the solution.
