Putting this info in the document (whether or not it's in the actual document
itself, or as an extended attribute) is not ideal, since it bakes in the
display settings of the last person to view/edit that document. If I send you
that document, you should either see it in its default state, or
You can just go ahead and invoke -noteNewRecentDocumentURL: on
[NSDocumentController sharedDocumentController]. You don't have to
worry about explicitly creating or managing an NSDocumentController,
or do anything else that requires NSDocument.
TextEdit in Tiger did this (before it was
TextEdit sources in /Developer/Examples/AppKit/TextEdit may be
useful. TextEdit's document types are set up to read/write RTF and
RTFD, in addition to a number of other types.
Ali
On Jul 2, 2009, at 14:04 , Ian Piper wrote:
bump bump :-)
Ian.
--
ianpi...@mac.com
07590 685840 | 01926
This function has not been implemented for the pure-CoreFoundation
case. This is mentioned in the header comments:
(Note: This function is not yet implemented and will return NULL
except for toll-free bridged instances.)
But it is not in the docs; should be.
As the comment implies, you
I am pretty new to objective-c, and I've been going over some stuff
in a book I
bought, and there is just something that is really bothering me. I
can't
really ask the author a question about his paragraph, so I thought
I'd write
here instead.
So--- This has to do with arrays,
One point of the discussion is that there is no need to do this, and
things you think you might want to do the test for are probably invalid.
But, if you wanted to test, you could see if the instance you have
isKindOfClass:[NSCFArray class]. However, this would be fragile,
since NSCFArray
to know I at least have a workaround.
Does this tend to indicate some kind of Apple GC bug?
From: Ali Ozer ao...@apple.com
To: Chris Idou idou...@yahoo.com
Cc: Cocoa Dev cocoa-dev@lists.apple.com
Sent: Tuesday, 31 March, 2009 4:12:55 PM
Subject: Re: EXC_BAD_ACCESS and NSAttributedString driving
Can you try temporarily disabling garbage collection around the
unarchiving of RTFD, and see if it helps?
[[NSGarbageCollector defaultCollector] disable];
... unarchive your RTFD ...
[[NSGarbageCollector defaultCollector] enable];
Ali
On Mar 30, 2009, at 5:25 PM, Chris Idou wrote:
I'm
!
On Mar 23, 2009, at 6:16 PM, Ali Ozer wrote:
NSScanner has
- (BOOL)scanHexInt:(unsigned *)value; // Optionally prefixed with
0x or 0X
- (BOOL)scanHexLongLong:(unsigned long long *)result;
so you can
unsigned yourValueHere;
BOOL success = [[NSScanner scannerWithString:string
NSScanner has
- (BOOL)scanHexInt:(unsigned *)value; // Optionally prefixed with
0x or 0X
- (BOOL)scanHexLongLong:(unsigned long long *)result;
so you can
unsigned yourValueHere;
BOOL success = [[NSScanner scannerWithString:string]
scanHexInt:yourValueHere];
Ali
On Mar 23, 2009, at
There are a number of problems in this code...
- (NSRange)wordRangeForRange:(NSRange)range{
NSString *string = [NSString stringWithString:[[self string]
substringWithRange:range]];
Why do you make yet another copy of the string; you already have the
substring? Maybe you meant to make a
warning. You should either
hang on to the result (assign to string?), or use an NSMutableString
to start with and call replaceCharactersInRange:withString:
Other comments still apply.
Ali
Begin forwarded message:
From: Ali Ozer [EMAIL PROTECTED]
Date: May 10, 2008 7:42:11 PDT
#define SSYInitErrorP(_error_p) NSError* dummyError ; \
if (_error_p == NULL) { \
_error_p = dummyError ; \
} \
* _error_p = nil ;
I use it like this, with an (NSError**)error_p:
SSYInitErrorP(error_p)
Besides setting *error_p to nil, which we agree is not necessary but
I just like, it
When I save a JPEG file in an image editing app, and later open it, I
expect it to open in Preview (or whatever my default image viewer is),
not the image editing app. This is especially true if someone else
opens the image.
Of course the expected behavior may depend on whether I am
Totally agreed that seeing extensions on file names is unfortunate.
But as long as applications are properly setting/using the hidden
extension bit (and many do), most of the time users should not see
extensions on any of their files, except the ones where they want to
(for instance,
Does anyone know if there are some release notes specific for 10.5.2?
I remember reading on some blog that there was an NSTreeController
bugfix.
...
You mean detailed releases notes geared towards developers? I think
they stopped doing that years ago. :( Something like this:
TextEdit calls -[NSLayoutManager setAllowsNonContiguousLayout:YES];
could that be it?
Ali
On Feb 28, 2008, at 20:06 , Steven Degutis wrote:
I have a large (ascii) text file, about 65 MB, which TextEdit loads
instantaneously in about a split second. I've tried to mimic this
behavior using
17 matches
Mail list logo