You have two independent initializers in your class.
You should have one designated initializer which is called by all other
initializers in your class.
Quoting from The Objective-C Programming Language
In the implementation of a custom initializer, you must ultimately invoke a
designated
On Aug 17, 2011, at 04:34 , Arno Oesterheld wrote:
I am a beginner with Xcode and Objective-C and stuck with a quite simple
thing for over two days now. I hope you can help me.
My Project is deployed for OS X 10.6, it uses Garbage Collection and I am
using Xcode 4.0.1.
I made a multi
On Aug 17, 2011, at 6:14 PM, Jerry Krinock wrote:
On 2011 Aug 16, at 16:17, Andy Lee wrote:
I haven't tested with bindings,
I would test thoroughly, particularly in Lion. See list archives for July
29, thread with subject Lion doesn't like tricky.key.paths in bindings?
Thanks, Jerry. In
Am 15.08.2011 um 22:53 schrieb Sean McBride:
On Sun, 14 Aug 2011 10:53:28 -0700, Chris Hanson said:
If you're targeting Mac OS X 10.6 or later, you can set arbitrary
properties on your objects in Interface Builder that will be set via KVC
at nib load time.
I just discovered this last
Dear Quincey,
thank you very much for your infos and hints.
What you write makes sense to me.
I've read the documentation that you pointed me to before. And on
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Tasks/ImplementingDocApp.html
in the section
Dear Peter,
thank you for your details.
It is true that I am confused about the initializers.
Which initializer should I call from my initWithCoder method?
I can not call [super initWithCoder] because NSDocument does not have
such a method. Should I call [self init] instead oder [super init]?
Hey all,
I've got a problem with using Autolayout in a NIB containing a window which
itself contains a split view. Now I've had no issue with adding views to a
splitview that use constraints, or even using constraints to say how those
views should fill the splitview's subviews. But I now want
On Wed, 17 Aug 2011 03:17:30 -0600, Michael Vannorsdel said:
Apologies if this has been covered in the past but my searches did not
turn up anything as specific as I'm looking for.
Are you talking about on Lion? If so, there hasn't been much discussion of
this new feature here yet.
Is there a
___
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)lists.apple.com
Help/Unsubscribe/Update your Subscription:
On Aug 18, 2011, at 7:50 AM, Arno Oesterheld wrote:
I can not call [super initWithCoder] because NSDocument does not have such a
method. Should I call [self init] instead oder [super init]?
The advice you’ve gotten so far does not, unfortunately, address your basic
problem, which is: Don’t
See QLPreviewPanel
http://developer.apple.com/library/mac/#documentation/Quartz/Reference/QLPreviewPanel_Class/Reference/Reference.html
On Wed, Aug 3, 2011 at 6:10 AM, Rick Corteza rickcort...@gmail.com wrote:
Hi again,
I double-checked but isn't it that this one is just to create
Is there a way to find the frame rectangle of an item/row in an
NSOutlineView?
Looking through the table of contents of the NSOutlineView reference, I saw
Getting the Frame for a Cell
– frameOfOutlineCellAtRow:
which sounded like what I wanted, but it turns out that it just gets the
On Aug 18, 2011, at 12:47 , James Walker wrote:
Is there a way to find the frame rectangle of an item/row in an NSOutlineView?
Looking through the table of contents of the NSOutlineView reference, I saw
Getting the Frame for a Cell
– frameOfOutlineCellAtRow:
which sounded like what
Haven't tried it, but AppKiDo tells me that NSOutlineView inherits the
following method from NSTableView:
frameOfCellAtColumn:row:
as well as
rectOfColumn:
and
rectOfRow:
Am 18.08.2011 um 21:47 schrieb James Walker:
Is there a way to find the frame rectangle of an item/row in an
Hi guys,
I'm having some trouble by trying to convert a C String to NSString, I'm
currently using:
NSString *mystring = [NSString stringWithUTF8String:cstring];
But I don't know which encoding the string is using... And when it has some
latin or other kind of characteres, the return is nil.
In
On Aug 18, 2011, at 1:02 PM, Wilker wrote:
I'm having some trouble by trying to convert a C String to NSString, I'm
currently using:
NSString *mystring = [NSString stringWithUTF8String:cstring];
But I don't know which encoding the string is using... And when it has some
latin or other
On Aug 18, 2011, at 2:02 PM, Wilker wrote:
Hi guys,
I'm having some trouble by trying to convert a C String to NSString, I'm
currently using:
NSString *mystring = [NSString stringWithUTF8String:cstring];
But I don't know which encoding the string is using... And when it has some
latin
If the C strings are being read in from a file, you can use the
stringWithContentsOfFile:usedEncoding:error: or
initWithContentsOfFile:usedEncoding:error: methods which will
try to guess the encoding and return the string and the encoding
it used back to you. But even these methods are just
On Aug 18, 2011, at 1:02 PM, Wilker wrote:
But I don't know which encoding the string is using... And when it has some
latin or other kind of characteres, the return is nil.
In my case I really don't care about these characters, if I can just remove
non-ascii from C String and them convert
The Shawn solution worked really well for me :)
In my case I'm hacking an Zip library that I'm using, this zip library has
problems when inside the zip the name of files are using crazy encodings...
In my case, all I need to know about the file name is it extension (this is
why I don't care
{Apologies for the slightly off-topic post, but the apple-cdsa list has been
pretty dead for a long time, and I’m not confident I’ll get any answer there,
so I’m cross-posting here too. And I think it’s not too unlikely that some
people here who develop on iOS have done some Keychain stuff with
On Aug 18, 2011, at 1:22 PM, Wilker wrote:
I did some hacks on it, using the [NSString stringWithFormat:%s, theString]
and it worked as I needed :)
Yikes — you should never, ever use ‘%s’ with NSStrings, unless you’re certain
that the C string is 100% ASCII. The reason is that the
I have a project that compiles fine, but I get a slew of warnings about
depreciated stuff in a few .a files in the project. I don't know what .a
files are (assembly?) - how can i edit such files with Xcode? It shows as a
binary file (I think)?
Thanks,
Eric
On Thu, 18 Aug 2011 16:50:35 -0400, Eric E. Dolecki said:
I have a project that compiles fine, but I get a slew of warnings about
depreciated stuff in a few .a files in the project. I don't know what .a
files are (assembly?)
See:
http://filext.com/file-extension/a
Probably a static lib.
What
On Aug 18, 2011, at 1:50 PM, Eric E. Dolecki wrote:
I have a project that compiles fine, but I get a slew of warnings about
depreciated stuff in a few .a files in the project.
That’s weird; usually it’s the C/ObjC compiler that warns about deprecation,
not the linker. Are you using any 3rd
I'll be able to do that tomorrow when I get back in the office. I actually
*think* they might have been linker warnings (wrong about the depreciated
stuff) - not sure until I see them again. I might have had depreciation on
the brain as I was fixed tons of those in inits, etc.
Thanks,
Eric
On
Xcode 3.2.6, iOS 4.3 (8F190 simulator)
I'm calling -indexPathsForRowsInRect:, which always works correctly if the
table isn't scrolled. But if the table is scrolled, and the supplied CGRect is
not necessarily over a row in the table. I still get back what appears to be a
valid array with a
It sounds like you're getting the index path you expect, but you're just
surprised that cellForRowAtIndexPath: with that index path returns nil when
it's scrolled out of view. If I'm reading that correctly, then this is correct
behavior. Note the comment in UITableView.h:
- (UITableViewCell
Huh. So it does. Thanks!
--
Rick
On Aug 18, 2011, at 14:47 , Luke Hiesterman wrote:
It sounds like you're getting the index path you expect, but you're just
surprised that cellForRowAtIndexPath: with that index path returns nil when
it's scrolled out of view. If I'm reading that
After lots of playing and reading of obscure documentation, it looks like Lion
creates a duplicate library in the Containers folder so even a sandboxed app
with no read or write file access still has access to its own Application
Support, Caches, and Preferences folders, among others. The file
On 8/18/2011 12:54 PM, Quincey Morris wrote:
'frameOfCellAtColumn:row:', 'rectOfColumn:', 'rectOfRow:'?
(Don't forget NSOutlineView is a subclass of NSTableView.)
Thanks. That seems to work, though what I'm ultimately trying to do
(get an image of a row from an outline view) doesn't. I
Sorry here is the Shawn solution he used, I did not post to list the first time
:*)
From: shashan...@hotmail.com
To: wilkerlu...@gmail.com
Subject: RE: Safe way to convert C String to NSString
Date: Thu, 18 Aug 2011 16:11:45 -0400
have you tried:
[[NSString alloc]
Hi,
I'm implementing drag drop functionality on one of my views, and I'd like to
autoscroll the containing view when the user lingers near an edge. Is there any
support built-in to iOS 4+ for this?
If not, what is the recommended approach? I thought I'd do something like this:
If the user
Let's say I have an NSImage that contains some representation other than
an NSBitmapImageRep, and I want to play with the pixel values. My plan
was like this:
Create a NSBitmapImageRep of the same size as my source image.
Make a new NSImage and add my new representation to it.
Lock focus on
On Aug 18, 2011, at 4:16 PM, James Walker wrote:
Let's say I have an NSImage that contains some representation other than an
NSBitmapImageRep, and I want to play with the pixel values.
Create your NSBitmapImageRep
Create a NSGraphicsContext from that rep and make it current
Draw your
On Aug 18, 2011, at 4:26 PM, Kyle Sluder wrote:
I'd point you at the Snow Leopard AppKit release notes, which contain a very
long discussion about this topic (presumably written by David), but it seems
there are only the Lion and Leopard versions available online. :(
I can't take credit
Hey David,
Why not just use the
CGDataProviderCopyData(CGImageGetDataProvider(imageRef)) to create a
new NSBitmapImageRequest with the image's original data? Is drawing it
more performant or gives you a better more compact data
representation?
_Karl
On Thu, Aug 18, 2011 at 4:23 PM, David Duncan
On Thu, Aug 18, 2011 at 4:23 PM, David Duncan david.dun...@apple.com wrote:
On Aug 18, 2011, at 4:16 PM, James Walker wrote:
Let's say I have an NSImage that contains some representation other than an
NSBitmapImageRep, and I want to play with the pixel values.
Create your NSBitmapImageRep
I have an NSTableView in a scrollview, and on Lion it's now smearing all of the
drawing when scrolling:
http://sethwillits.com/temp/upshot/upshot_nHnDbrLB.jpg
Some things to note:
A) This doesn't happen on Snow Leopard
B) Yes, I am using a custom cell in the table view, but using a standard
I have view that I use for printing.
knowsPageRange is called
rectForPage is called
BUT
drawRect is not called
What in the name of HP am I missing?
-koko
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
On 8/18/2011 4:23 PM, David Duncan wrote:
On Aug 18, 2011, at 4:16 PM, James Walker wrote:
Let's say I have an NSImage that contains some representation other than an
NSBitmapImageRep, and I want to play with the pixel values.
Create your NSBitmapImageRep
Create a NSGraphicsContext from
shrugs
Show your code. How are we supposed to debug something we can't even see?
perhaps -rectForPage: is returning an empty rect? Perhaps you're not setting up
the printing view correctly? Perhaps you've written the code in a strange
dialect of Swahili?
--Graham
On 19/08/2011, at 10:45 AM,
Short version: Have any of you ever used NSCache in a GC-enabled app? If so,
then how did you get the garbage collector to collect them?
Long version: I have a framework that is used in a traditional retain-release
app and a different GC-enabled app. The framework creates NSCache objects for
I have an iOS app where I'm storing files in the app's Documents directory,
and occasionally downloading new versions from the server to replace them.
The actual code is split across a number of files and classes, but the end
of the process goes like this:
- The download of the new data to a
On Aug 18, 2011, at 21:24 , Sixten Otto wrote:
That method returns NO for failure, so I check the error... but it's nil.
There's nothing there to tell me what the heck is failing. (In fact, when I
wasn't initializing my error pointer to nil, it was left as a garbage
pointer, and crashed my
On Aug 18, 2011, at 11:24 PM, Sixten Otto wrote:
- The download of the new data to a temporary file in NSTemporaryDirectory()
finishes successfully.
- I calculate the path I want to copy it to.
- I see that there's already a previous version of the file at that path.
- I try to use
On Aug 19, 2011, at 12:38 AM, Ken Thomases wrote:
Although it is easy to interpret a temporary directory as provided by the
OS being compatible with NSTemporaryDirectory(), I suspect it really means a
directory returned by
-URLForDirectory:inDomain:appropriateForURL:create:error: with
47 matches
Mail list logo