Re: Slow down a scroller?

2013-09-11 Thread Richard Somers
The Change Time Scale slider in Apple's Instruments application implements a novel self centering time based algorithm. A very interesting approach to a slider. Perhaps you also need to think outside the box and implement the desired behavior in a custom control. --Richard Somers On Jul 31

Re: Exiting non-POSIX threads?

2013-08-01 Thread Richard Somers
{ dispatch_async(_queue, ^{ for ( ... ) { if (_isQueueCanceled == YES) { break; } else { // do work } } }); } When invalidateQueue returns the thread has been canceled. Richard Somers

Re: Core Data Reverse Engineering KickStarter Project

2013-06-26 Thread Richard Somers
Just curious. Which Core Data document format are you trying to reverse engineer: XML, binary, SQLite, or all of them? Richard Somers On Jun 25, 2013, at 8:31 PM, Michael Crawford mdcrawf...@gmail.com wrote: Take a guess at the document format. Write an importer that reads that format. Put

NSArrayController Added /Removed Objects

2013-06-03 Thread Richard Somers
when adding objects to the managed object context. Does anyone have any insight on how to determine what objects are added or removed from an NSArrayController? Thanks, Richard Somers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: book for n00b

2013-01-16 Thread Richard Somers
, at 12:10 PM, Erik Stainsby erik.stain...@roaringsky.ca wrote: I'd also recommend Scott Stevenson's Cocoa and Objective-C: Up and Running and follow that with Stephen G. Kochan's Programming in Objective-C That would also be a good choice. --Richard Somers

Re: HiDPI retina issue with multi-screen overlay window and Core Animation

2013-01-12 Thread Richard Somers
image, and then somehow tell the system to use that. --Richard Somers ___ 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

Re: HiDPI retina issue with multi-screen overlay window and Core Animation

2013-01-12 Thread Richard Somers
offscreen rendering machine updating or replacing the cursor image every so often. --Richard Somers ___ 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

Re: Does anyone find Restore Snapshot kind of weak?

2012-11-29 Thread Richard Somers
directory and start fresh again. The whole process takes about a minute and has been bullet proof. I still use Git for reviewing history, managing branches, merging changes from one branch to another, etc., but this modified workflow has made my day to day development go much faster. --Richard

Re: Scalability of CALayers

2012-10-27 Thread Richard Somers
--Richard Somers ___ 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: https

App Sandbox Container or Data Directory

2012-10-23 Thread Richard Somers
of preference plist file aliases. One of the items is an alias to com.apple.iWork.Pages.plist. Why would my app need default access to the Pages preference plist file? This seems like a violation of sandboxing. A lot of this simply does not make sense. What am I missing? --Richard Somers

Re: App Sandbox Container or Data Directory

2012-10-23 Thread Richard Somers
plist file is readable but not writable. --Richard Somers ___ 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

Re: App Sandbox Container or Data Directory

2012-10-23 Thread Richard Somers
panel let the user choose a location where a save was not allowed and subsequently would result in failure. --Richard Somers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?

2012-09-28 Thread Richard Somers
try swizzling. --Richard Somers ___ 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

Re: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?

2012-09-10 Thread Richard Somers
On Sep 10, 2012, at 5:59 AM, Motti Shneor wrote: Although I don't need such heavy-weapons, and I don't at all deal with programmatic bindings here, I'd still like (if possible) to learn some more about the implementation of your internal tools. I didn't yet have a chance to work with

Re: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?

2012-09-09 Thread Richard Somers
On Sep 9, 2012, at 3:32 AM, Motti Shneor wrote: - (NSUInteger)isObserver:(id)object on keyPath:(NSString *)keyPath withContext:(void *)context]; // the returned number is the count of same observances with 0 as not-observing). and something like - (BOOL)removeObserver:(id)object;

Re: Malloc Error: pointer being freed was not allocated

2012-09-08 Thread Richard Somers
On Sep 7, 2012, at 3:55 PM, Jens Alfke wrote: On Sep 7, 2012, at 12:01 PM, Richard Somers rsomers...@awinets.com wrote: MyApp(469,0x1009fbcc0) malloc: *** error for object 0x12f6b19a0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Following

Malloc Error: pointer being freed was not allocated

2012-09-07 Thread Richard Somers
I have an intermittent error that I can not make any progress on solving so I thought I would ask for some help from someone more experienced than myself in debugging. Program execution halts in Xcode with the following error: MyApp(469,0x1009fbcc0) malloc: *** error for object 0x12f6b19a0:

Re: NSTextView scrolling

2012-07-30 Thread Richard Somers
On Jul 30, 2012, at 12:19 PM, ecir hana wrote: when jumping from line to line in a textview with up and down keys, it exhibits this scrolling behavior - when the cursor is at the very top and I hit up (and vice versa), it scrolls the document half page up, that is, the current line is now in

Window-Frame Controls in Lion

2012-07-05 Thread Richard Somers
Controls in the window-frame area (that is, in the toolbar or bottom bar) normally have a textured style as stated in the OS X Human Interface Guidelines. In 10.7 Lion textured controls became semi-transparent with some of the background showing through. This results in most window-frame

Re: Trap mouse and keyboard events

2012-06-25 Thread Richard Somers
On Jun 24, 2012, at 11:56 PM, Abhijeet Singh wrote: I want to perform some action in my application whenever user presses any key on keyboard or uses the mouse. How can I trap these events. One way to do this would be to subclass NSApplication and override sendEvent:. The documentation

Demo Version

2012-06-14 Thread Richard Somers
The Mac App Store guidelines indicates that Apps that are beta, demo, trial, or test versions will be rejected. So if potential customers need to go to my website to download a demo version then I might as well offer the retail version for sale on my website also. Why use the Mac App Store?

Re: Managed Objects and Contexts

2012-05-31 Thread Richard Somers
John and Mikkel, Thanks for the insight on multiple contexts in Core Data. It helps a bunch. --Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Managed Objects and Contexts

2012-05-30 Thread Richard Somers
I have a question about multiple contexts. First a quote from the Core Data Programming Guide - To consider this from a different perspective, a given object in a persistent store may be edited in more than one context simultaneously. Each context, however, has its own managed object that

Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 3:01 AM, ecir hana wrote: I create a window like this: id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease]; [window cascadeTopLeftFromPoint:NSMakePoint(20,20)];

Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 8:51 AM, ecir hana wrote: Yes, document-based. However, not sure if it is an issue, but I have my own subclassed window controller. The docs also say that the default for shouldCascadeWindows is YES. I tried to set it to YES in setShouldCascadeWindows:, without luck.

Re: Minimal document-based app

2012-05-02 Thread Richard Somers
On May 2, 2012, at 7:19 AM, ecir hana wrote: - I saw that Xcode named the Info.plist differently (it prepends my project name to it) - is it ok just to call it Info.plist? Is there any convention?

Re: Minimal document-based app

2012-05-01 Thread Richard Somers
On May 1, 2012, at 8:50 AM, Fritz Anderson wrote: NIBs _are_ how it works. They don't contain or generate code. They don't contain or generate scripts. They don't exercise much of the API you're trying to use. They contain archived objects and their connections. True, but the beginner may

NSKeyValueBindingCreation Protocol

2012-04-28 Thread Richard Somers
I have a number of controls with custom bindings that are programmatically added to a view hierarchy in a window. Calling –unbind: on these controls when the window is closes is a challenge. But it actually does not seem to matter. If –unbind: is never called and the window is closed there are

Re: NSKeyValueBindingCreation Protocol

2012-04-28 Thread Richard Somers
On Apr 28, 2012, at 1:30 PM, Quincey Morris wrote: To get an answer on this, you'll probably need to say which memory model you're using: GC, ARC or traditional RR. I am using traditional retain and release. --Richard ___ Cocoa-dev mailing list

Re: NSKeyValueBindingCreation Protocol

2012-04-28 Thread Richard Somers
On Apr 28, 2012, at 1:30 PM, Quincey Morris wrote: To get an answer on this, you'll probably need to say which memory model you're using: GC, ARC or traditional RR. Actually now that I have done a little more research it appears that my question regarding programmatically calling -unbind:

Re: NSKeyValueBindingCreation Protocol

2012-04-28 Thread Richard Somers
, 2012, at 10:17 AM, Richard Somers rsomers...@awinets.com wrote: I have a number of controls with custom bindings that are programmatically added to a view hierarchy in a window. Calling –unbind: on these controls when the window is closes is a challenge. Why? Someone has to have called -bind

Re: Core Data Automatic Lightweight Migration

2012-04-04 Thread Richard Somers
On Apr 2, 2012, at 11:01 PM, Jerry Krinock wrote: That is expected behavior. The tildefied document, as I call it (tilde = ~) is in fact the old document, prior to migration, which Core Data has renamed. It is an undocumented feature of Core Data. Apparently, the idea is that, with help

Re: Core Data Automatic Lightweight Migration

2012-04-02 Thread Richard Somers
On Apr 2, 2012, at 4:20 PM, Richard Somers wrote: Can anyone shed some light on this? It appears that others have also recently experienced frustration with automatic lightweight migration and have come up with zero answers. Jan 26, 2012 http://stackoverflow.com/questions/9014668/core-data

NSTextField Selected Text

2012-03-30 Thread Richard Somers
When tabbing into a text field containing text, the text is selected. When clicking into a text field containing text, the I-beam cursor indicates the insertion point. How can I make clicking into text field containing text, initially select all the text just like tabbing does? Thanks for

Re: NSTextField Selected Text

2012-03-30 Thread Richard Somers
On Mar 30, 2012, at 3:22 PM, Richard Somers wrote: When tabbing into a text field containing text, the text is selected. When clicking into a text field containing text, the I-beam cursor indicates the insertion point. How can I make clicking into text field containing text, initially

Re: How to get max size of view according to constraints?

2012-03-20 Thread Richard Somers
On Mar 19, 2012, at 10:20 PM, Charles Srstka wrote: As everyone knows, if you have a view with a bunch of subviews and you’ve got NSLayoutConstraints set up for everything, in many cases you might end up with a minimum or maximum size for the view beyond which the constraints are

Re: There's obviously something I don't understand about autorelease.

2012-03-17 Thread Richard Somers
On Mar 17, 2012, at 6:12 PM, Roland King wrote: So often I find I start with @synthesize foo=_foo; and by the time I get to the end of the project I've written custom foo: and setFoo: methods which do something else too. I have also done that but I recently read a blog where the

Re: UIKit-additions and class references

2012-03-07 Thread Richard Somers
On Mar 6, 2012, at 2:28 PM, Mikkel Islay wrote: Does anyone know the reason why the UIKit-additions for NSString, NSValue etc. aren't mentioned in the respective class references in the Apple documentation for iOS? It appears that the same NSString Class Reference documentation for the Mac

Re: HELP!! Big problem with relationships and saving in iOS core data

2012-03-01 Thread Richard Somers
On Mar 1, 2012, at 7:12 AM, Eric Giguere wrote: I'm on the verge of loosing my sanity... I've been hitting this error for a long time now. If I try deleting the C object before saving the new stuff, I get this error: Domain=NSCocoaErrorDomain Code=134030 The operation couldn’t be

Re: Make Custom Struct Key-Value Coding Compliant

2012-02-15 Thread Richard Somers
SOLVED - Thanks for all the comments. On Feb 11, 2012, at 11:56 PM, Graham Cox wrote: Making it an object is easy and usually it turns out that the desire to resist doing that is misguided, based on some faulty assumptions. I decided to resist no longer and make my custom strut an object. I

Re: Make Custom Struct Key-Value Coding Compliant

2012-02-12 Thread Richard Somers
On Feb 12, 2012, at 1:28 AM, Kyle Sluder wrote: Hmm. The Foundation Release Notes for 10.5 indicate that KVC supports arbitrary structs (see section titled Support for Arbitrary Types in KVC and KVO) Yes I have read that several times. It seems to be at odds with the Core Data

Make Custom Struct Key-Value Coding Compliant

2012-02-11 Thread Richard Somers
Core Data Question I have a custom struct that I would like to make key-value coding compliant so it will work with Core Data as a non-standard persistent attribute. Is it possible to make a custom struct key-value coding compliant? I would rather not store it in the managed object as an

Re: Core Data Entity And Attribute Names In XML Store

2012-01-31 Thread Richard Somers
On Jan 30, 2012, at 6:27 PM, Jens Alfke wrote: On Jan 30, 2012, at 1:34 PM, Richard Somers wrote: Why does Core Data change entity names to upper case and attribute names to lower case in the XML store? I don’t know; but the format of that XML is supposed to be private to CoreData

Core Data Entity And Attribute Names In XML Store

2012-01-30 Thread Richard Somers
Why does Core Data change entity names to upper case and attribute names to lower case in the XML store? --Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Mysterious File exists message logged to console

2011-12-15 Thread Richard Somers
On Dec 15, 2011, at 8:29 AM, Mike Abdullah wrote: I'm trying to track down a bug and have a copy of a customer's console log to help me. There's rather a lot of messages like this: open on /Users/foo/bar/mydocument.package/DSC_0221.jpg: File exists Searching the web has been

Re: NSView mouseDown truncated coordinates

2011-11-28 Thread Richard Somers
On Nov 25, 2011, at 6:17 PM, Steven Spencer wrote: I'm using a NSTrackingArea in a view to receive mouseMoved events. The cursor location in the mouseMoved and mouseDragged events have non-integer coordinates (as expected). e.g. x:140.601562 y:128.082031 However, the mouseDown and mouseUp

Re: Weird NSTextField behavior on MBA.

2011-11-22 Thread Richard Somers
On Nov 22, 2011, at 1:59 AM, Gustavo Pizano wrote: I will make some debugging on my friend MBA and see if something's wrong in the code, if not, then I guess I will be filling up a Bug report, because this issue makes no sense to me. Is this done completely in Interface Builder or in code.

Re: NSTableView - preventing user moving with mouse

2011-11-21 Thread Richard Somers
On Nov 21, 2011, at 5:11 AM, Peter Hudson wrote: I have an NSTableView whose position I want to control purely programatically. How do I stop the user from changing its position using the mouse - including two finger swipe gestures ? The position of the NSTableView is set with

Re: Weird NSTextField behavior on MBA.

2011-11-21 Thread Richard Somers
On Nov 21, 2011, at 3:08 PM, Gustavo Pizano wrote: So im wondering what its going on because I have tried the behavior on 2 iMacs, 2 MPB and 2 MBA, on the latest one is the only one that doesn't behave as expected. What can it be? Perhaps it is a graphics card issue. One way to check out

Re: awakeFromInsert called twice with nested contexts

2011-11-20 Thread Richard Somers
On Nov 16, 2011, at 6:16 PM, Tom Harrington wrote: I'm finding that if I use nested managed object contexts, awakeFromInsert will be called twice on new objects. On Mac OS X 10.7 NSManagedObjectContext can have a parentContext. Perhaps this would be applicable. --Richard

Retained Outlet

2011-11-18 Thread Richard Somers
The normal pattern for Interface Builder Outlets is assign but I have an outlet that must be retained to work corectly. The outlet is not in File's Owner but is in a custom view in a window. // Interface @property (retain) IBOutlet NSArrayController *myController; // Implementation @synthesize

Re: Retained Outlet

2011-11-18 Thread Richard Somers
On Nov 18, 2011, at 9:31 AM, Kyle Sluder wrote: On Fri, Nov 18, 2011 at 8:23 AM, Richard Somers wrote: The normal pattern for Interface Builder Outlets is assign but I have an outlet that must be retained to work corectly. The outlet is not in File's Owner but is in a custom view

Re: Retained Outlet

2011-11-18 Thread Richard Somers
On Nov 18, 2011, at 12:42 PM, Kyle Sluder wrote: It means that NSWindowController will balance NSNib's extra -retain. It doesn't balance the additional -retain from calling your setter. Consider the following case. The additional -retain from calling setter is not balanced. The outlet is not

Re: Retained Outlet

2011-11-18 Thread Richard Somers
On Nov 18, 2011, at 1:33 PM, Corbin Dunn wrote: You are probably orphaning (which is a leak), your window controller subclass. Make sure it's dealloc is called; I'm guessing it won't be. This isn't shown in leaks, since it isn't a true leak. Good suggestion. I just checked and the window

Re: Retained Outlet

2011-11-18 Thread Richard Somers
On Nov 18, 2011, at 9:23 AM, Richard Somers wrote: The normal pattern for Interface Builder Outlets is assign but I have an outlet that must be retained to work corectly. The outlet is not in File's Owner but is in a custom view in a window. // Interface @property (retain) IBOutlet

Re: Variable window size based on screen resolution

2011-11-14 Thread Richard Somers
One way would be to subclass NSWindow and override the designated initializer -initWithContentRect:styleMask:backing:defer: method. In the initializer you could query the screen resolution and set the window frame accordingly. --Richard On Nov 14, 2011, at 8:10 AM, Koen van der Drift wrote:

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Richard Somers
Do something like this. - (void)prepareWindowCollectionBehavior { if (MySystemVersion_10_07_OrLater()) { #ifdef MAC_OS_X_VERSION_10_7 NSWindowCollectionBehavior behavior = [_window collectionBehavior]; behavior = behavior | NSWindowCollectionBehaviorFullScreenPrimary;

Re: About iVars declaration and property

2011-11-13 Thread Richard Somers
I find that not having explicit instance variable declarations lets me focus the class interface. I think that focusing on the interface is more helpful in the long run. --Richard On Nov 13, 2011, at 12:16 AM, ico wrote: If so, is it a better approach that just declare the property and let

Re: How does LaunchServices decide which version of an app to open?

2011-11-11 Thread Richard Somers
This can be very confusing but I think it goes something like this. The default application launched is the version with the highest CFBundleVersion where CFBundleVersion is a monotonically increasing string, comprised of one or more period-separated integers. In the Xcode 4 target summary

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Richard Somers
On Nov 9, 2011, at 9:36 AM, Andy O'Meara wrote: Well, if you have a serial number/license scheme, copy-protection scheme, crypto, or payment mechanisms that use objC, then realize they're on display for everyone to see. Use functions instead of a class to restrict the amount of information

Re: Logging in Xcode 4.2

2011-11-10 Thread Richard Somers
On Nov 10, 2011, at 9:13 AM, Matt Neuburg wrote: Sometimes it pops up a little way. Sometimes it pops up a long way. Sometimes it fails to pop. Sometimes it pops but when you stop the app it doesn't pop back down. It's non-deterministic programming! Xcode animation! I think they

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Richard Somers
On Nov 9, 2011, at 12:46 AM, Greg Parker wrote: Note that Shuttle missions carried ordinary laptops running ordinary operating systems to do the science work other than flying the spacecraft. The scientists couldn't afford Shuttle-grade development costs nor Shuttle-grade development

Re: NSArrayController Update Delay

2011-10-17 Thread Richard Somers
SOLVED On Oct 13, 2011, at 4:55 PM, Mike Abdullah wrote: I'm pretty sure the array controller is observing NSManagedObjectContextObjectsDidChangeNotification to arrange its objects. Normally, this doesn't fire until the end of the runloop. But you can force it to by calling

Re: NSArrayController Selection and Managed Object Context Undo

2011-10-17 Thread Richard Somers
SOLVED On Oct 6, 2011, at 8:40 AM, Keary Suska wrote: AFAIK you will need to manage selection restoration semantics yourself, and it may not be easy and it may be fragile. Note also that the preserve and avoid empty selection settings will also have an effect. That being said, the

NSArrayController Update Delay

2011-10-13 Thread Richard Somers
Consider a NSArrayController in entity mode. When a managed object is inserted into the managed object context the controller's arrangedObjects property is not updated immediately. Calling a controller 'fetch:' immediately after inserting the managed object into the managed object context does

Re: NSArrayController Update Delay

2011-10-13 Thread Richard Somers
On Oct 13, 2011, at 3:12 PM, Keary Suska wrote: How is this happening? Via code? or Via the NSArrayController (add: or insert:)? In the latter case the docs say, Beginning with Mac OS X v10.4 the result of this method is deferred until the next iteration of the runloop so that the error

Re: NSTreeController with bindings and core data - still an issue?

2011-10-10 Thread Richard Somers
On Oct 10, 2011, at 9:05 AM, Koen van der Drift wrote: I'm looking to implement a simple iTunes/Mail like source list in an app, and have been rummaging through the internets for some decent tutorials and sample code. I found some, but they are all a bit outdated. Basically, I want to

NSArrayController Selection and Managed Object Context Undo

2011-10-06 Thread Richard Somers
It is very common for Applications to update the selection during undo operations. By default NSArrayController automatically selects objects as they are inserted. This works if objects are added using one of the controller's add or insert methods. If objects are added directly to the

Re: Writing a simple vector graphics editor - how to implement?

2011-10-05 Thread Richard Somers
On Oct 5, 2011, at 1:39 PM, Nick wrote: I have a task to write a simple vector graphics editor, which has a window, a sheet (which can be bigger than the window), and some objects (triangles, rectangles) to be placed on this sheet (and then, edited, e.g. rotated, stretched) by their

Re: NSDocument-oriented app and -keydown

2011-09-29 Thread Richard Somers
On Sep 29, 2011, at 8:42 AM, Nick wrote: how can I get a keydown (and keyup) events in an NSDocument-oriented application for a particular document's window? I'd like to get a control activated/deactivated on the window, depending on whether the specific key is pressed or released. Key

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-26 Thread Richard Somers
On Sep 25, 2011, at 11:13 PM, Jerry Krinock wrote: I'm debugging a corner case wherein undoing a group containing deletion of a managed object causes a Core Data could not fulfill a fault exception on this object. It would help to understand exactly how managed objects are un-deleted.

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-26 Thread Richard Somers
On Sep 26, 2011, at 12:34 PM, Jerry Krinock wrote: Note: It looks like we have a private discussion going on here. I'm not sure if that was intentional. Anyhow… Another individual took it private for some reason. As I said, nothing is being fetched at this point. As I said in my other

Symbolic Breakpoints

2011-09-21 Thread Richard Somers
Is there a secret to getting symbolic breakpoints to work? Set symbolic breakpoint 'keyDown:' (without the quotes) and nothing happens. Set a breakpoint in the gutter and it works fine. I am using Xcode 4.1 with the LLDB debugger. When I try to switch to the GDB debugger Xcode crashes. The

Re: Symbolic Breakpoints

2011-09-21 Thread Richard Somers
On Sep 21, 2011, at 9:43 AM, Jens Alfke wrote: Is there a secret to getting symbolic breakpoints to work? Set symbolic breakpoint 'keyDown:' (without the quotes) and nothing happens. The name has to be like “-[MyView keyDown:]”, otherwise it’s ambiguous which -keyDown: method you mean —

Re: Symbolic Breakpoints

2011-09-21 Thread Richard Somers
On Sep 21, 2011, at 12:10 PM, Quincey Morris wrote: I'm not seeing this behavior in gdb (with Xcode 4.2). In Xcode 3, if you tried to set a breakpoint on (say) 'keyDown:', Xcode would pop up a sheet listing all the different matching symbols (all the methods in the various classes where

Re: Symbolic Breakpoints

2011-09-21 Thread Richard Somers
On Sep 21, 2011, at 1:49 PM, Quincey Morris wrote: I made a brand new project in Xcode 4.1 and got the same results as before. gdb crashes when just using a method name like 'keyDown:' for the symbolic breakpoint. It would appear that this has been fixed in Xcode 4.2. Also you have

Re: SDK 10.5 on XCode 4.1

2011-09-15 Thread Richard Somers
On Sep 15, 2011, at 8:13 AM, Leonardo wrote: I need to build using SDK 10.5. I work on Lion and XCode 4.1 If you need the MacOSX10.5.sdk one way to do this is to make a unix hard link to the sdk included with Xcode 3. To make a hard link use the following commands from the Terminal

Re: SDK 10.5 on XCode 4.1

2011-09-15 Thread Richard Somers
On Sep 15, 2011, at 10:40 AM, Scott Ribe wrote: Minor nit, that's a symlink, not a hard link. One important difference is that a symlink can cross volume boundaries... Correct. Second important difference is symbolic links may refer to directories which this is. --Richard

Re: Responder-Chain question.

2011-09-13 Thread Richard Somers
On Sep 13, 2011, at 6:01 AM, Motti Shneor wrote: Event Programming guide says: ... It appears that Apple's guidelines are on the safe side, something that will always work. Cocoa Design Patterns by Buck and Yacktman says: It is possible to manually manipulate the Responder Chain to insert

Re: nonatomic vs atomic assign/retain

2011-09-06 Thread Richard Somers
On Sep 6, 2011, at 9:30 AM, Torsten Curdt wrote: So what should one use e.g. for normal IBOutlets with AppKit? The answer is in the 2010-12-21 revision of the Memory Management Programming Guide. It seems to be missing however from the current 2011-03-24 revision of this document. Here is

Re: Sample code using the new document model?

2011-08-27 Thread Richard Somers
in the Mac Dev Center, none of them use either of these much-touted but quite complicated new features. Have you looked at TextEdit 1.7 (Lion) in the Examples folder? --Richard Somers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Sample code using the new document model?

2011-08-26 Thread Richard Somers
Autosaving in Place, NSDocument Autosaving Changes (Section updated since WWDC 2011), Things to Watch For When Enabling NSDocument Autosaving in Place (New since WWDC 2011), NSDocument Asynchronous Saving, NSDocument UI and File Access Serialization, and NSDocument Duplicating. --Richard Somers

Re: How does Apple want us to deal with custom elements in Xcode 4, with IBPlugins having been killed?

2011-08-15 Thread Richard Somers
On Aug 14, 2011, at 12:36 AM, Eli Bach wrote: I wonder what the FinalCutPro and the rest of those apps guys do with all their custom UI. I have often wondered about that question myself. If you look inside the Xcode bundle you will find a single nib file (MainMenu.nib). So it would appear

Re: Xcode 3.2.6 on Lion ?

2011-07-24 Thread Richard Somers
On Jul 23, 2011, at 4:32 PM, Jerry Krinock wrote: The last time I looked at Services, it only allowed you to access the selected (highlighted) text. Is there any way to get and replace the text of an entire document? I don't know. On Jul 23, 2011, at 4:44 PM, Jerry Krinock wrote: Is

Re: Xcode 3.2.6 on Lion ?

2011-07-23 Thread Richard Somers
On Jul 23, 2011, at 11:36 AM, Jerry Krinock wrote: That being said, primarily because of the lack of User Scripts support in Xcode 4 which I find intolerable, I'm using Xcode 3.2.5 for my daily work, and of course running Lion. I converted all my user scripts to automator services. It took

Re: Lion changes

2011-07-21 Thread Richard Somers
On Jul 21, 2011, at 11:33 AM, vincent habchi wrote: But anyhow, as somebody pointed out, there are far better ways to get the MAC address of the en0 port than executing BSD commands in a subprocess. Apple sample code GetPrimaryMACAddress works well with Lion.

User Defaults Controller Binding

2011-07-08 Thread Richard Somers
I have a binding to the User Defaults Controller in Interface Builder in Xcode 4. The binding entries look like this. Controller Key values Model Key Path MyProperty At the end of the MyProperty entry there is a round dark circle with an exclamation mark. I

Display Letterboxing Pillarboxing

2011-06-29 Thread Richard Somers
In System Preferences a user may select a specific display resolution. Some display resolutions will stretch the visible area to fill the display as needed. But some display resolutions will pillarbox where a black bar is placed on the left and right of the visible area. Is it possible to

Re: Event Objects Return 1-Based Y Coordinate Values

2011-06-27 Thread Richard Somers
this unusual behavior exists or what purpose it has. --Richard On Jun 27, 2011, at 11:26 AM, Raleigh Ledet wrote: Cocoa coordinates are all 0,0 based. If you have a reproducible test case that says otherwise, please file a radar and attach it. -raleigh On Jun 25, 2011, at 7:59 AM, Richard Somers

Re: Event Objects Return 1-Based Y Coordinate Values

2011-06-27 Thread Richard Somers
On Jun 27, 2011, at 1:13 PM, Jens Alfke wrote: It makes sense to me. Integer coordinates denote the grid lines between pixels, not the pixel centers. Likewise, the hot-spot of the cursor is in between pixels, not in the center of a pixel. In the case of the default arrow cursor, the

Event Objects Return 1-Based Y Coordinate Values

2011-06-25 Thread Richard Somers
The Cocoa Drawing Guide states Cocoa event objects return y coordinate values that are 1-based instead of 0-based. Thus, a mouse click on the bottom left corner of a window or view would yield the point (0, 1) in Cocoa and not (0, 0). Only y-coordinates are 1-based. Why are the y-coordianate

Re: Detect shift key down

2011-06-25 Thread Richard Somers
On Jun 24, 2011, at 1:19 AM, Bernard Desgraupes wrote: I need to detect if the shift key is pressed by the user during the startup of my app. How would I do that in Cocoa (targetting 10.5 and greater) ? Try this.

Re: Is it possible to create a Finder-like icon in Dock?

2011-06-12 Thread Richard Somers
On Jun 12, 2011, at 6:22 PM, Nick wrote: Finder behaves differently... Would it be possible to create a similar icon? Probably not. At least I would hope I would be impossible or at least very difficult for a developer to do this. From a users perspective I don't think I would appreciate a

Re: Controller Selection Synchronization

2011-04-10 Thread Richard Somers
On Apr 9, 2011, at 18:00, Richard Somers wrote: I have a primary view which displays all objects using a primary controller. Both 'A' and 'B' objects are included in the controller content. This is accomplished by using an abstract class in the managed object model that is a parent of both

Controller Selection Synchronization

2011-04-09 Thread Richard Somers
suggestions on how to approach this issue? Thanks in advance for anyone willing to think about this. --Richard Somers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: NSNotFound

2011-01-17 Thread Richard Somers
was almost on the right path but got confused with 32-bit/64-bit and NSInteger/ NSUInteger. Thanks for stating this with such clarity. --Richard Somers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

NSNotFound

2011-01-15 Thread Richard Somers
NSNotFound is formally defined as NSIntegerMax. But the framework methods returning NSNotFound are typically typed NSUInteger. Is there a technical reason why NSNotFound is not defined as NSUIntegerMax? --Richard Somers ___ Cocoa-dev mailing

Re: sending a message from an initializer method

2011-01-13 Thread Richard Somers
, and aids in debugging and refactoring. It works very well. --Richard Somers ___ 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

Re: Custom View with Interface Builder Bindings

2011-01-12 Thread Richard Somers
On Jan 3, 2011, at 9:27 AM, Richard Somers wrote: I would like to establish bindings in Interface Builder between the objects created by the custom view and some standard Interface Builder widgets. The problem is 'awakeFromNib' is called AFTER the bindings are established so the bindings

Custom View with Interface Builder Bindings

2011-01-03 Thread Richard Somers
MyDocumentWindowController *windowController; windowController = [[MyDocumentWindowController alloc] init]; [self addWindowController:windowController]; [windowController release]; } @end Any suggestions? Thanks. --Richard Somers ___ Cocoa-dev mailing list

  1   2   3   >