Matt,
The result differs not only on simulator, but also on iphones running 4.3 and
5.0.
I have also found out that ONLY some of the known time zones work fine on 5.0.
e.g. PDT, PST, GMT ...etc. However, all time zones work fine on iOS 4.3.
In fact, I have already reported this as a bug to apple
Using properties significantly increased the size of my executable
file. If I had something like this:
float a = [self foo: self.scale];
float b = [self bar: self.scale];
I could cut down the size of my code quite a bit by caching the return
value of self.scale:
float theScale = self.scale;
flo
On Nov 16, 2011, at 01:08 , Stefan Werner wrote:
> Any application compiled today will have a constant number in place of
> NSWindowCollectionBehaviorFullScreenPrimary. If the OS at some point changes
> the meaning of that number, it will break all applications compiled before
> that date.
Yes
Hello,
I create my movie this way:
QTMovie* qtMovie = [[QTMovie alloc] initToWritableFile: path error:
&nserror];
NSDictionary* attributes = [NSDictionary dictionaryWithObjectsAndKeys:
@"mp4v", QTAddImageCodecType,
On Nov 16, 2011, at 01:00 , Don Quixote de la Mancha wrote:
> Using properties significantly increased the size of my executable
> file. If I had something like this:
>
> float a = [self foo: self.scale];
> float b = [self bar: self.scale];
>
> I could cut down the size of my code quite a bit b
One way: Save your PCM audio to an AIF file, then open it as a QTMovie. Set the
attribute 'QTMovieEditableAttribute' to TRUE. It will just have one audio track.
Then:
QTTimeRange videoRange = QTMakeTimeRange(QTZeroTime, [videoTrkOnlyMovie
duration]);
[
Hi,
I have a NSCollectionView in which selection changes are observed by a
viewcontroller object, that will in turn change its view according to the
nature of the selection change.
(Think of it as a image browser or something similar)
In some circumstances however, I want to alert the user bef
Thanks, I'll try that.
(Sorry Robert for the msg to your address...)
However, I don't like creating temporary files :)
Would it work if I put the sound (with a prepended AIFF header) into a NSData,
creating a movie from that (movieWithData:error:), and inserting that
movie's audio track into the
One other advantage to using properties over direct ivar access internally is
KVO compliance.
Usually I prefer to declare properties backed by ivars of a different name,
then use getters/setters everywhere except inside initializers and dealloc.
Frees me from having to worry about willChangeVal
On Nov 16, 2011, at 1:00 AM, Don Quixote de la Mancha
wrote:
> Using properties significantly increased the size of my executable
> file. If I had something like this:
>
> float a = [self foo: self.scale];
> float b = [self bar: self.scale];
>
> I could cut down the size of my code quite a bi
Hello,
How would I go about getting an apps memory usage via a PID?
Thanks,
tom
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)li
On Nov 16, 2011, at 8:45 AM, TomJones wrote:
> How would I go about getting an apps memory usage via a PID?
There’s a low-level API for getting info like this about processes. The
standard response I’ve seen is “go to the darwin source archive and download
the code for the top tool to see how
On Wed, Nov 16, 2011 at 8:03 AM, Kyle Sluder wrote:
> On Nov 16, 2011, at 1:00 AM, Don Quixote de la Mancha
> wrote:
>> Calling accessors is also quite slow compared to a direct iVar access,
>> because it has to go through Objective-C's message dispatch mechanism.
>
> objc_msgSend isn't very slo
On Nov 16, 2011, at 9:31 AM, Don Quixote de la Mancha
wrote:
> I've been trying to beat these arguments into the heads of my fellow
> coders since most of you lot were in diapers. Just about always the
> responses are that "Premature Optimization is the Root of All Evil,"
> as well as that prog
Your memory space is divided into several sections.
The .bss section stores your uninitialized global and static data, as
well as data that is initialized to zero. Actually it is all
initialized to zero, it's just that data is put there and initilized
to zero if you don't initalize it to some oth
Hi
I am trying to implement a behavior of an NSTextView, so that I can have
NSTextView scrolled that way, so the text being entered is always displayed
in the middle (vertically) of the control, to help the user focus his
attention on what he is entering at the moment.
What I don't know - is how t
On Nov 16, 2011, at 10:31 AM, Don Quixote de la Mancha wrote:
> I've been trying to beat these arguments into the heads of my fellow
> coders since most of you lot were in diapers. Just about always the
> responses are that "Premature Optimization is the Root of All Evil,"
> as well as that progr
SUMMARY
I'd like to know when a document is in the "locked" state. Cocoa provides
-[NSDocument checkAutosavingSafetyAndReturnError:]; but this only seems to tell
me when the heuristics think the document should be locked, not when the user
has deliberately locked the document. Is there any way t
On 14.11.2011, at 19:20, Quincey Morris wrote:
> Don't follow the advice to define NSWindowCollectionBehaviorFullScreenPrimary
> yourself. It's really, really dangerous to replicate a fragment of one SDK in
> a build against an earlier SDK. What if the value changes in a later 10.7.x
> SDK, or
On Nov 16, 2011, at 10:05 AM, Don Quixote de la Mancha wrote:
> Your memory space is divided into several sections.
>
> The .bss section stores your uninitialized global and static data, as
> well as data that is initialized to zero...
Whoa — this info-dump is total overkill for what the OP is
On Wed, Nov 16, 2011 at 10:29 AM, Preston Sumner
wrote:
> Can you confirm that the reason the particular software you use is huge,
> bloated, and slow is specifically because of objc_msgSend() and not
> shortcomings in the application's design or the addition of new,
> resource-intensive featu
On Nov 16, 2011, at 10:09 AM, Nick wrote:
> Is there any
> way I could make NSScrollView (which is a container for my NSTextView) be
> able to scroll the textview even if there are not too many lines?
Embed the text view in a taller NSView and put that view into the scrollview.
Or you could jus
On Nov 16, 2011, at 3:08 AM, Stefan Werner wrote:
>
> On 14.11.2011, at 19:20, Quincey Morris wrote:
>
>> Don't follow the advice to define
>> NSWindowCollectionBehaviorFullScreenPrimary yourself. It's really, really
>> dangerous to replicate a fragment of one SDK in a build against an earlie
I am sympathetic with your reasoning, but I don't think it's what your
users will expect. Most text-entry areas in most apps on most
platforms start the text entry at the very top when they are empty,
with the text entry advancing downwards.
I suggest that you do not start scrolling your text unt
On Nov 16, 2011, at 9:31 AM, Don Quixote de la Mancha wrote:
> Despite that I implemented my own most time-critical routine in C,
> objc_msgSend takes up two percent of my run time. I expect it would
> be a lot more if I didn't implement that grid update routine in C.
Definitely. Time-critical
On 16 Nov 2011, at 11:31 AM, Don Quixote de la Mancha wrote:
> objc_msgSend is slow as Alaskan Molasses compared to a simple C function call.
Cocoa uses Objective-C for I/O and user-interaction libraries, to respond to
events that take place over periods of milliseconds.
For those purposes, I c
On Nov 16, 2011, at 10:52 AM, Don Quixote de la Mancha wrote:
> Did you ever use any of the early releases of Mac OS X? It was so
> slow as to be largely unusable until 10.3 (Panther).
I was working on OS X at that time. The main reasons for poor performance
weren’t micro-level stuff like ob
On Nov 16, 2011, at 11:40 AM, Matt Neuburg wrote:
> Luke:
>
> (1) Thx!
>
> (2) Any memory of when that happened? Just curious, no biggie.
Snow Leopard for OS X. I think iOS 4 in my land.
>
> (3) Want me to file a bug on the docs?
Go for it.
Luke
>
> m.
>
> On Nov 16, 2011, at 11:38 AM,
On 11/16/11 9:31 AM, Don Quixote de la Mancha wrote:
> End-user time is even more expensive than programmer time.
Clearly if you are writing an operating system or other
performance-critical software it's exceedingly important to optimize
things are far as possible. One reason that the iPhone and
On Nov 16, 2011, at 9:31 AM, Don Quixote de la Mancha wrote:
> According to Instruments, my iOS App now spends about half its time in
> a C (not Objective-C) void function that updates the state of a
> Cellular Automaton grid, and the other half in a low-level iOS Core
> Graphics routine that fills
On Nov 16, 2011, at 11:52 AM, Don Quixote de la Mancha wrote:
> On Wed, Nov 16, 2011 at 10:29 AM, Preston Sumner
> wrote:
>> Can you confirm that the reason the particular software you use is huge,
>> bloated, and slow is specifically because of objc_msgSend() and not
>> shortcomings in the a
The change in parsing of abbreviated time zone names in iOS 5.0 is a result of
an intentional change in the open-source ICU 4.8 library (and the open-source
CLDR 2.0 data that it uses), a modified version of which is used to implement
some of the NSDateFormatter functionality.
The issue is this
On 17/11/2011, at 4:31 AM, Don Quixote de la Mancha wrote:
> You all speak as if you think I'm a clueless newbie, but I was a
> "White Badge" Senior Engineer in Apple's Traditional OS Integration
> team from 1995 through 1996. For most of that time I worked as a
> "Debug Meister", in which I iso
To answer the first part of my question…
This (deliberately set) locked state is the same as the Finder's locked state.
You can get it using -[NSURL getResourceValue:forKey:error:] with the key,
NSURLIsUserImmutableKey.
So you need to check both the NSURLIsUserImmutableKey file-attribute and the
On 2011-09-09, at 6:05 PM, Kyle Sluder wrote:
> Unfortunately, it doesn't look like there's any public API to force a
> document to be locked. The closest I've come is -[NSDocument
> checkAutosavingSafetyAndReturnError:], but it doesn't seem to be
> called at all the times I'd expect it to be cal
35 matches
Mail list logo