Perhaps I'm missing something

Nibbie
Posts: 4
Joined: 2008.09
Post: #1
I'm not used to this [underpowered device] programming business, and for simpler applications on the desktop, I'd let an overabundance of computing power deal with a little extra programming overhead. Well, now I'm programming on the [underpowered device] which has a decidedly unpowerful chip inside, and I want to limit unnecessary overhead. Basically, I'm trying to do some animation from within a thread that on a desktop application I would just do from within the Run Loop. It's quite simple, and on the [high powered desktop computer], the animation runs brilliantly, but on the [less powerful device], the UI hangs until the animation and corresponding calculations are finished. I have tried to thread out the animation to a seperate thread, but when i do, none of the animation occurs until the thread completes which is at the end of the animation at which point the animation simply jumps to the end. Is there a trick that I'm missing? Currently, I'm calling the animation method, which resides in a class separate the Main UIView, from within the thread's while loop, with a usleep() to pause between frames. Is there any way to make the animation update in real time?
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #2
The iPhone remains under NDA and you will not be able to ask nor will be able to answer questions under that agreement. If you need code level support you may want to use an Apple support ticket.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2008.09
Post: #3
it's not an iPhone specific question, it's a coreanimation question. And the answer is that in your thread, you have to enclose any updates in a [CATransaction begin]~[CATransaction commit] block, this applies whether you're using appkit or otherwise. Now delete this answer so that it can't be of help to anyone.
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #4
spuy767 Wrote:Now delete this answer so that it can't be of help to anyone.

Why say it in the first place then, if you feel it may be in violation of the NDA? I mean, I'm not trying to be mean or anything, but the fact is that this forum is owned by Carlos, not us, and he doesn't want us going against the NDA (even though he titles the board as though it's okay, go figure), so them's the rules. No need to be upset about it.

Anyway, you're not doing animation correctly if you're using usleep to pause between ticks. Looping constantly is an incredible waste of processing power -- on the desktop or otherwise. Best to use a timer instead. CA uses timers for you, which is why it works.
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2008.09
Post: #5
I said it because it is completely independent of the iPhone sdk. The code works under os x. And the question wasn't iPhone specific. I was merely stating that the iPhone made me notice the issue because of the reduced processing power. I was just kind of miffed that the moderator made it a point to discourage the answering of a question that didn't break the nda.
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #6
Don't feel bad, man, I got smacked too. kodex doesn't like being the NDA cop around here, but somebody has to do it. If anything, it's Apple's fault that we're all going through this B.S. We just get a lot of new guys around here who haven't been informed how serious it is taken around here. Your post did start off with iPhone this and that, and it definitely seemed to lean toward "help me out on the iPhone".

Yes, it is extremely frustrating (to say the least). We all feel the same way about it, so you're not alone.
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #7
I should add: There are many things about iPhone which we can discuss, but we have to be extremely careful. We can talk about things which have been made public by Apple. Like for instance, we can talk about the fact that it uses OpenGL ES, but we can't disclose which version of OpenGL ES it uses. Needless to say, we've had some very creative/strange conversations around here lately.

One thing you pretty much can't talk about at all is anything that exposes iPhone API stuff, like certain technologies, but especially anything prefixed with the iPhone version of AppKit. I *think* it is public knowledge that iPhone uses Core Animation, so you can say that, but you can't talk about it in any specific terms because it may accidentally expose any possible differences between the desktop version and the iPhone version, or it may expose certain capabilities of iPhone which have not been made public by Apple.

If you can talk about a technology in terms of how it's used on Mac OS X, then do that without bringing up iPhone. That's much safer, and you are much more likely to get help. Still have to be extremely careful not to slip up.

And one last thing: There are a couple Apple Engineers who visit once in a while and get to say whatever they want, so if you see someone possibly exposing something and they aren't getting moderated, just look the other way and go about your business. We love it when they throw us a little help once in a while.
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #8
Regardless of whether you approve of this forum's moderation or not you have signed a legal and binding document that forbids you from discussing the iPhone SDK. If you do not wish to abide by your half of this contract then by all means do what you have to do, but the moderators of this forum have been instructed to uphold the NDA and that is what we have been doing.

That being said, I personally may not agree with the terms of the NDA but I have agreed to the NDA. Until Apple lifts it I morally have no choice but to honor that agreement. Apple has made it very clear that they take the NDA seriously.

It is merely my job to uphold the rules that have been placed by the forum's owner who has chosen to follow the rules set forth by the NDA. While the problem you were asking for assistance with may have applied to multiple platforms it was VERY clear that you were speaking about the iPhone.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #9
kodex Wrote:Apple has made it very clear that they take the NDA seriously.

[chuckle snort] ... except on their own forums for some unknown reason. Goofiest situation evar.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  neheX tutorial 4, missing? xDexx 6 2,946 Mar 19, 2003 10:43 AM
Last Post: sealfin