RSS
 

Archive for the ‘apple’ Category

One good thing in Objective-C

21 Feb

While learning about objective-c. I came across a single feature of objective-c which I think if moved to c++ would make for a lot less coding.

Consider this objective c code for a class declaration:

// .h file:
@interface classname {
// instance variables
}
+(void)classMethod;
@end

// .m file:
@implementation classname
-privateFunction1{}
-classMethod { [self privateFunction1]; }
@end

While if you would have to do something similar in c++, this is how you would do it:


// .h file:
class classname
{
public:
void classMethod();

private:
void privateFunction();
}

// .cpp file:

void classname::classMethod() { privateFunction(); }
void classname::privateFunction() {}

Even if a function in a C++ class is private, you still have to declare it in the class declaration. why ?
It would be so much better if all the private functions can just placed in the cpp file, and we dont have to put them in the class declaration.

Objective C has the benefit of using @implementation … @end to figure out such methods. But if in c++ if we just declare a function in the .cpp file and such function is not present in the class declaration, the compiler can know that its a private function. Like so:


// .h file:

class sample
{
public:
void doSomething();

private:
int x;
};

// .cpp file:

void sample::doSomethingPrivately()
{
// has access to member data.
x = 7;
}

void sample::doSomething()
{
/// ...
doSomethingPrivately();
}

 
 

The iPad SDK aka iPhone OS 3.2 SDK

28 Jan

The iphone 3.2 sdk does not support the iphones and ipod touches.

But there are new apis in the sdk, all of which are just for the ipad. There is an api to handle documents much like a desktop os. Some new kind of views etc. etc.

But this ipad is very iphnoeish down to the OS level. So i believe ra1ndrop would also work on it ????? it can be jailbroken and then we have multitasking on it. wohoo ? not really! official multitasking support would mean $$ opportunities.

They say its another gold rush, i am not sure. I would hope for one but do people have more 500$ to burn after they have already burned/are burning quite a huge sum on the iphone?

But any ways, any other mobile os (except windows mobile and blackberry) would be good on it. Symbian, Maemo, Android or WebOS.

 
No Comments

Posted in ipad

 

iPad, No Multitasking..

27 Jan

Disappointing.

Post Complete.

 
1 Comment

Posted in ipad

 

iPhone OS 4 SDK, the iPad Mania today.

27 Jan

So here we go again, another new product from Apple and the Internets will be getting crazy tonight. A humongous iphone will be great for web surfing on the sofa if nothing else.

But what I am excited about is the background processes in the new sdk (which they are yet to announce, hopefully). Finally we can have some useful applications. What I would want is a nokia step counter kind of software. I already have it on my Nokia E72 and it is so useful. I have my daily goal set to 10 km of walking.

So just waiting for the new sdk to be posted on to the web and weeks of endless night hacking ahead. Time to market is the key.

 
 

Macintosh and Fanboys, a blind faith.

31 May

It seems that Apple and its fanboy have blind faith in themselves and every thing that Apple makes, they just dont want to admit that many of the products that they produce are idiotic and that there are many flaws in their environments, in their closed garden models.  

For starters the mac keyboards dont have a home or end key, which is frustrating and if you dont admit it then you are just lying. Who came up with the idea of Home and End keys on a keyboard ? was it someone form Microsoft or did it exist before ? having to press two keys to get the action of home key wont cut it.

I never really thought much about the iphone app store and the tight control that apple has over developing applications for iphone or ipod until I applied for the apple developer program and it took too long for them to respond, they didnt reject me but  i just got frustrated that I cant even develop an application for myself, for a device which i paid 230 f..ing euros for. So infact apple if they choose so can lock out a particular developer or company from writing applications for iphone, and with iphone market share growing so much i wonder if this is anti competetive behaviour, seeems like what Microsoft did with IE but atleast they didnt stop people from publishing applications for Windows. Apple is getting evil more and more, money makes people evil. Imagine what apple would be like if they had more then 2% of desktop computer market, that is very scary.

So this is a relgion now, apple, a blind faith. 

*this is just an experiment to see how many visitors does an apple bashing post attract*

if you were here because of that apple bashing, please relax. go outside and take a walk, go to movies with your girlfriend or what ever, relax. :)

I dont care much about apple, microsoft or linux. i use them all.