You are here: iTopchiyev »

Blog

Some news about iPhone Python IDE

After spending 2 days i developed main class design and played a bit with UI, and found a name for this app, I colled it “PyIDE” or “pyide”. The attached images are a bit old. But that’s what I have on my iPhone now. Newer screen shots are on my macbook, and I will post them soon.

I have a dream!… :) Python IDE for iPhone

I have in idea to create a new project. The aim is a full featured IDE for Python. It must be able to create projects (I mean to create something like  MyAplication.app in default Applications folder, or somewhere else; then create link to python, put some icon, create all needed .plist files, MyApplication.py and MyApplicaton shell script and all other neded stuff as it’s show by Saurik) and manage its .py files and settings directly on iPhone.

I selected Python becouse python is the only scriptable language available on iPhone and able to implement CocoaTouch. And it doesn’t need compilation, although it can compile the code.

If anyone has some helpful ideas, so please do not hesitate to respond here!

Hello Mac Cocoa

Here I’m gonna introduce you the paradigm of programming for Mac using Cocoa, Objective C.

The aim is to make a calculator app. By the way, the project soon ported to iPhone. And that requred just fiew changes. I mean development for both platforms is mostly identical.

Well, I have a

standard program scheme that I use each time I need to test some new for me platform, that’s “Calculator”.

It looks like this:

  1. We have 1 class, let’s call it MYCalculator.
  2. We have 2 classwide available strings: currentVal and previousVal. Theese strings are for storing current and previous values and manipulate them during operations. Both this variables are initialized with “0″ string.
  3. We have an Int32 to store the operator code that we choose by pressing some operator button. Then we’ll use it on Equals button press event. This variable is initiolized with 0 value.

Also we have a Window for storing user interface. And in it:

  1. We have digit buttons 0 – 9.
  2. We have operator buttons +,-,x,/.
  3. We have equals button.
  4. We have clear button.
  5. We have a single read only text box or label or something like that.

In code we have to:

  1. We have a single event processor for digit buttons. It have to get text of sender button and append it to the currentVal string, If currentVal equals “0″ then we simply replace the string by sender text. Then set the text boxs value to currentVals value
  2. And the last we have a single event processor for operation buttons. First we have to check if the last character of previousVal equals to “.” then we have to remove that char. And if operator variable not equals to 5 then we copy the value of currentVal to previousVal. If operator is between 1 ant 4 then we first execute “=” event processor.   It have to get text of sender button and see if it equals to “+” then set the operator variable to 1, if to “-” then 2, if to “x” then to 3, if to “/” then to 4. Then we set the text box value to currentVal value.
  3. We have an event processor for “=” button. First we look at value of operator variable, and if it’s between 1 and 4 including, then according to that value we execute selected operation (1 is +, 2 is -, 3 is x,  4 is /) using currentVal and previousVal and save it to previousVal. Then we set currentVal to “0″ and operator to 5.
  4. We have an event processor for clear button. Here we set all variables (currentVal, previousVal operator) to “0″. Then we set the text box value to currentVal value.

The souce code can be downloaded here

DOWNLOAD NOW
Downloaded 322 times

WordPress client for iPhone

Today I found a nice client for WordPress blogging on iPhone.

Here is the link

Hello iPhone

Here I’m gonna introduce you the paradigm of programming for iPhone using CocoaTouch, Objective C.

The aim is to make a calculator app. By the way, this app is first created for Mac and then ported to iPhone. And that requred just fiew changes. I mean development for both platforms is mostly identical.

Well, I have a

standard program scheme that I use each time I need to test some new for me platform, that’s “Calculator”.

It looks like this:

  1. We have 1 class, let’s call it MYCalculator.
  2. We have 2 classwide available strings: currentVal and previousVal. Theese strings are for storing current and previous values and manipulate them during operations. Both this variables are initialized with “0″ string.
  3. We have an Int32 to store the operator code that we choose by pressing some operator button. Then we’ll use it on Equals button press event. This variable is initiolized with 0 value.

Also we have a Window for storing user interface. And in it:

  1. We have digit buttons 0 – 9.
  2. We have operator buttons +,-,x,/.
  3. We have equals button.
  4. We have clear button.
  5. We have a single read only text box or label or something like that.

In code we have to:

  1. We have a single event processor for digit buttons. It have to get text of sender button and append it to the currentVal string, If currentVal equals “0″ then we simply replace the string by sender text. Then set the text boxs value to currentVals value
  2. And the last we have a single event processor for operation buttons. First we have to check if the last character of previousVal equals to “.” then we have to remove that char. And if operator variable not equals to 5 then we copy the value of currentVal to previousVal. If operator is between 1 ant 4 then we first execute “=” event processor.   It have to get text of sender button and see if it equals to “+” then set the operator variable to 1, if to “-” then 2, if to “x” then to 3, if to “/” then to 4. Then we set the text box value to currentVal value.
  3. We have an event processor for “=” button. First we look at value of operator variable, and if it’s between 1 and 4 including, then according to that value we execute selected operation (1 is +, 2 is -, 3 is x,  4 is /) using currentVal and previousVal and save it to previousVal. Then we set currentVal to “0″ and operator to 5.
  4. We have an event processor for clear button. Here we set all variables (currentVal, previousVal operator) to “0″. Then we set the text box value to currentVal value.

The souce code can be downloaded here

DOWNLOAD NOW
Downloaded 236 times

Note that this X Code project created using PWNed iPhone temlate profile.