> The problem is probably that theScannedString has never been initialize
> it. Always initialize when you declare, because otherwise your value could
> be nonsense and can't be logged. So, minimally, you'd say this:
Good advice regarding initialization, but...
> NSString *theScannedString = nil;
On Wed, 13 Oct 2010 16:57:22 -0700, G S said:
>Turns out to be a simulator bug, or a bug in the way Xcode is loading
>apps into the simulator.
>
>The simulator was showing a UI from a XIB that had long since been
>deleted from disk and removed from the project. And yet the compiled
>nib from it wa
On Fri, 15 Oct 2010 11:44:26 -0700, Chris Tracewell
said:
>NOTE :: GC Enabled
>
>I am using an NSScanner in an NSString category but am crashing whenever
>I try to log the string I scanned into or to return it. If I comment out
>the NSLog there are no problems.
>
>NSString *theScannedString;
>NSSc
Thanks all. I got it working, indeed the Scanner was failing, which as Kiel
suggested, must have led to an invalid pointer by the time I tried to
log/return it. Once I checked the BOOL it quit crashing and then with some
reworking of my NSScanner code it processed and returned the string I wante
Hi Martin,
On 15/10/2010, at 20:48, Martin Wierschin wrote:
>> Well, in a normal situation the array would contain conforming objects.
>> However, as it can happen once in a while, one can add an object to an array
>> thinking it's of one type when in fact it's another.
>
> When you say "one c
Well, in a normal situation the array would contain conforming
objects. However, as it can happen once in a while, one can add an
object to an array thinking it's of one type when in fact it's
another.
When you say "one can add", do you mean that the user chooses these
objects in the GUI
Both copiesOnScroll and drawsBackground are turned on.
I tried another little experiment and turned the layer backing for the subviews
off, and the only times that the drawing code for the subviews was called is
when they are coming on to the visible rect - when they are already there, the
draw
On Oct 15, 2010, at 12:00 PM, Hank Heijink (Mailinglists) wrote:
>> NSString *theScannedString;
>
> I would set theScannedString to nil here to avoid your crash below.
That would be making the assumption that the implementation of
scanCharactersFromSet:intoString: does not muck with the pointe
Hi Corbin,
On 15/10/2010, at 16:55, Corbin Dunn wrote:
> If it is instead some array input that the user provided, and it is a user
> error to provide the wrong input, then you should return a user-presentable
> NSError and the caller should present the error on failure.
This sounds right to
On 15 Oct 2010, at 21:42, Tito Ciuro wrote:
Hello,
I'm implementing a method and I'm not sure what the behavior should
be when detecting an anomaly.
Case in point: I have a method that iterates through an array of
objects. As I traverse the array, I'm, checking whether the object
in th
On Oct 15, 2010, at 3:42 PM, Tito Ciuro wrote:
> Hello,
>
> I'm implementing a method and I'm not sure what the behavior should be when
> detecting an anomaly.
>
> Case in point: I have a method that iterates through an array of objects. As
> I traverse the array, I'm, checking whether the obj
Hey Tito,
It depends. Does your method require all objects in the array to conform to a
protocol? If yes, and one doesn't, then throw an exception, since it is a
programming error. If no, meaning you allow some to pass through with nothing
happening, then you should define the behavior in a hea
Hello,
I'm implementing a method and I'm not sure what the behavior should be when
detecting an anomaly.
Case in point: I have a method that iterates through an array of objects. As I
traverse the array, I'm, checking whether the object in the array conforms to a
custom protocol. If it does, e
http://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSScanner_Class/Reference/Reference.html#//apple_ref/occ/instm/NSScanner/scanCharactersFromSet:intoString:
You pass by reference to the - [NSScanner scanCharactersFromSet:intoString:]
method an uninitialised p
On Oct 15, 2010, at 2:44 PM, Chris Tracewell wrote:
> NOTE :: GC Enabled
>
> I am using an NSScanner in an NSString category but am crashing whenever I
> try to log the string I scanned into or to return it. If I comment out the
> NSLog there are no problems.
>
> NSString *theScannedString;
I
NOTE :: GC Enabled
I am using an NSScanner in an NSString category but am crashing whenever I try
to log the string I scanned into or to return it. If I comment out the NSLog
there are no problems.
NSString *theScannedString;
NSScanner *theScanner = [NSScanner scannerWithString:theNewHTML];
NSC
On Fri, Oct 15, 2010 at 6:59 AM, Ron Olson wrote:
> Hi all-
>
> I am writing a service that grabs some data from a selected file and
> displays it in a pop-up HUD-style window a la Quick Look. I have been
> searching around but haven't figured out a way to display a HUD window
> (or any kind of wi
On Oct 15, 2010, at 8:50 AM, Gideon King wrote:
> Thanks for the suggestion Uli.
>
> The subviews are layer backed views. I've stripped them down to simply
> drawing the color into a path - absolutely nothing unusual or complex there.
>
> Now this is rather embarrassing, but I found out that th
Thanks for the suggestion Uli.
The subviews are layer backed views. I've stripped them down to simply drawing
the color into a path - absolutely nothing unusual or complex there.
Now this is rather embarrassing, but I found out that the cause of the visual
slowdown was entirely due to running i
Hi all-
I am writing a service that grabs some data from a selected file and
displays it in a pop-up HUD-style window a la Quick Look. I have been
searching around but haven't figured out a way to display a HUD window
(or any kind of window, for that matter) outside the context of an
application,
On Oct 5, 2010, at 12:25 PM, Trygve Inda wrote:
> Is there a way to have a window with a 50% opaque background, but several
> odd-shaped views that are 100% opaque? The dock does this but seems be one
> window per icon. Can I do it all as one window?
Look into NSBorderlessWindowMask. You may also
On Oct 9, 2010, at 1:22 AM, Jason Slack-Moehrle wrote:
> I need to integrate Carbon and Cocoa so that I can replace the existing
> Carbon GUI elements with Cocoa equivalents. Mostly Dialog Boxes, etc.
>
> I know that I need to write C-ACllable Wrapper Functions for the Cocoa stuff
> that I need,
Ah ok I did not know about mutableArrayValue.
BTW is there any difference (performance or otherwise) between what you
suggested (using mutableArrayValue) and what I did earlier?
Thanks
Hrishi
On 15-Oct-2010, at 3:40 PM, Chris Hanson wrote:
> My apologies - I dashed off my last email to you too
On Oct 15, 2010, at 3:12 AM, Gideon King wrote:
> Hi, I am trying to get a large view to scroll smoothly in an NSScrollView
> using an animation on the scrollpoint. The first time I do this, the
> scrolling is quite jerky, especially when I get to places where there are
> subviews. Once it has s
My apologies - I dashed off my last email to you too quickly and made a
significant mistake in it.
I intended to suggest using -mutableArrayValueForKey: rather than
-valueForKey:. For example:
- (void)awakeFromNib {
[[self mutableArrayValueForKey:@"myListRoot"] addObject:foo];
Thank you for the suggestion. I changed the code to use KVC like you suggested
but it still makes no difference. But doing what you said along with calls to
willChangeValueForKey and didChangeValueForKey
This worked:
-(void) awakeFromNib
{
NSTreeNode *tn = [NSTreeNode treeNodeWithRepresent
Hi Dave and Laurent,
>Did you try fb [NSException raise]? fb stands for future break and
you can set it by pausing the debugger as soon as your app launches.
No, I didn't try that. Will give it a try ...
Try breaking on objc_exception_throw() instead.
This worked like a charm!
Thanks a
27 matches
Mail list logo