Hi,
I think the question was asked and answered but I cannot see a clearance
what is the right way to write init in the cases the arguments are nil or
wrong?
Returning a nil or raising an exception?
- (id) initWithURL: (NSURL *) url {
if ((self = [super init])) {
if (!url) {
// ?
}
if (![
On Apr 4, 2012, at 1:38 PM, Ariel Feinerman wrote:
> Hi,
>
> I think the question was asked and answered but I cannot see a clearance
> what is the right way to write init in the cases the arguments are nil or
> wrong?
> Returning a nil or raising an exception?
Well first, this is my personal o
On Apr 4, 2012, at 4:38 AM, Ariel Feinerman wrote:
> I think the question was asked and answered but I cannot see a clearance
> what is the right way to write init in the cases the arguments are nil or
> wrong?
> Returning a nil or raising an exception?
If the argument values are literally wrong
On Apr 4, 2012, at 8:37 AM, Andreas Grosam wrote:
> In a "debug" version, use NSAssert and friends (ensure Preprocessor macro
> "NS_BLOCK_ASSERTIONS" is not defined). Use Unit tests in order to detect
> *any* possible logic error. In a "release" version where NSAsserts and
> friends may become
Le 4 avr. 2012 à 17:57, Jens Alfke a écrit :
>
> On Apr 4, 2012, at 8:37 AM, Andreas Grosam wrote:
>
>> In a "debug" version, use NSAssert and friends (ensure Preprocessor macro
>> "NS_BLOCK_ASSERTIONS" is not defined). Use Unit tests in order to detect
>> *any* possible logic error. In a "re
The general rule is:
1. If it is considered a programming error, raise an exception (or assert -- it
is the same)
2. If it is normal code flow, then don't log or do anything strange.
However, in general, it is troublesome to have init's return nil.
corbin
On Apr 4, 2012, at 4:38 AM, Ariel Fein
On Apr 4, 2012, at 5:57 PM, Jens Alfke wrote:
>
> On Apr 4, 2012, at 8:37 AM, Andreas Grosam wrote:
>
>> In a "debug" version, use NSAssert and friends (ensure Preprocessor macro
>> "NS_BLOCK_ASSERTIONS" is not defined). Use Unit tests in order to detect
>> *any* possible logic error. In a "r
On Apr 4, 2012, at 9:29 AM, Andreas Grosam wrote:
> The problem on Mac OS X in Cocoa Apps is, that there is no alert. The
> application also does not stop, or terminate gracefully. The default behavior
> of the event loop is to log an error message, and then **continue**.
Not anymore. In Lion
On Apr 4, 2012, at 9:55 AM, Jens Alfke wrote:
>
> On Apr 4, 2012, at 9:29 AM, Andreas Grosam wrote:
>
>> The problem on Mac OS X in Cocoa Apps is, that there is no alert. The
>> application also does not stop, or terminate gracefully. The default
>> behavior of the event loop is to log an er
On Apr 4, 2012, at 9:29 AM, Andreas Grosam wrote:
> The problem on Mac OS X in Cocoa Apps is, that there is no alert. The
> application also does not stop, or terminate gracefully. The default behavior
> of the event loop is to log an error message, and then **continue**.
No, there is an aler
Hi,
If it's a real error, this is what I do:
- (id) initWithURL: (NSURL *) url
{
self = [super init];
if (self == nil)
return nil;
if (url == nil)
{
[self release];
return nil;
}
return self;
}
or in this case, you could just do this:
- (id) initWithUR
On Apr 4, 2012, at 10:33 AM, Corbin Dunn wrote:
> "AppKit now has the ability to report uncaught exceptions. It is controlled
> by a user default: NSApplicationShowExceptions (YES/NO). The default shipping
> value is NO. In general, it is recommend that developers set it to YES during
> develo
Hi,
On 4 Apr 2012, at 19:39, Dave wrote:
Hi,
If it's a real error
...
If it's a programming error
...
Just to be sure what you mean: What is a real error? Simply an error
which is not a programmer's (or programming?) error?
Regards
Klaus
___
On Apr 4, 2012, at 11:48 AM, Klaus Backert wrote:
> Just to be sure what you mean: What is a real error? Simply an error which is
> not a programmer's (or programming?) error?
A runtime error, one that could occur in a valid program. What this means
exactly is up to the designer of the API.
F
Xcode 4.3, Lion 10.7.3
Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed
from NSButton
the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds.
So if I want to stroke the Matrix bounds with a line width of e.g. 4.0 points
it draws over the left a
On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote:
> Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed
> from NSButton
> the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds.
>
> So if I want to stroke the Matrix bounds with a line width of e.g. 4
On 2012-04-04, at 5:02 PM, Fritz Anderson wrote:
> On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote:
>> Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed
>> from NSButton
>> the X origins of column 0 cells seem to be 1.0 point inside the Matrix
>> bounds.
>>
>> So if I w
Hi all,
My Mac app currently has 3 versions of my xcdatamodel. I have explicit
.xcmappingmodels for 1->3 and 2->3 (they pre-date lightweight migration).
I now need to create version 4. Let's assume it's a trivial change from 3.
Thus, I hope to do 3->4 with lightweight migration. In fact, cu
This should "just work", of course that depends on the project. Please file a
bug and attach the project you're seeing this with.
Kevin
On 3 Apr 2012, at 18:11, douglas welton wrote:
> Hi All,
>
> [I've read the Cocoa Autolayout release notes and googled for "NSView
> autolayout fullscreen"
This is odd. I have an app that downloads locations from a web service, and
creates NSManagedObejct (subclass: Location) for them. It's been working fine
on simulator and device. Suddenly, I get a consistent EXC_BAD_ACCESS on device
and simulator every time I create a new location (existing loca
Good people,
How do I go about fielding a mouseDown event in an NSTextField?
Charlie Dickman
3tothe...@comcast.net
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact t
On 2012-04-04, at 6:52 PM, Peter Teeson wrote:
> On 2012-04-04, at 5:02 PM, Fritz Anderson wrote:
>> On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote:
>>> Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells
>>> sub-classed from NSButton
>>> the X origins of column 0 cells seem to be 1.0
Small bit if knowledge to share. The stroke of the border is drawn centred over
the line of the border. So your described 4pt line would intrude 2pts into the
bounded area. I'm know if that will help any with understanding the
left-shifting you have observed.
Erik Stainsby
erik.stain...@roaring
On 05/04/2012, at 9:51 AM, Charlie Dickman wrote:
> Good people,
>
> How do I go about fielding a mouseDown event in an NSTextField?
For what purpose? NSTextField generally works without you having to do anything
special. If you have some unusual requirement, you'll need to tell us what it
24 matches
Mail list logo