Re: NSView mouseDown truncated coordinates

2011-11-27 Thread Steven
mouseDown does. I noticed that NSWindow mouseLocationOutsideOfEventStream does produce the non-integral coordinates when called from mouseDown, though that may not be the right direction to go. Steven ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

NSDocument disc undo stack

2012-03-23 Thread Steven
file document should a temporary directory be used ? I guess the chosen location may need to persist beyond the occurrence of the automatic termination feature. Any advice appreciated. Thanks. Steven. ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: NSDocument disc undo stack

2012-03-25 Thread Steven
Thanks for the info Graham. I'm using NSUndoManager. I thought that many large objects in the stack would cause memory pressure and would be better occupying disc space as they are only needed at undo/redo time. Good to know that the VM system will take care of it. Steven. On 24 Mar 201

Re: NSDocument disc undo stack

2012-04-02 Thread Steven
ation is closed. Steven. > > > On 25/03/2012, at 5:34 AM, Doug Clinton wrote: > >> I don't know if this was the issue that Steven was asking about, but I've >> been wondering if there is a recommended way to persist the undo stack so >> that it's stil

Re: CIImage initWithCGLayer is deprecated in 10.11

2016-06-11 Thread Steven Spencer
From CIImage.h: - (instancetype)initWithCGLayer:(CGLayerRef)layer NS_DEPRECATED_MAC(10_4,10_11,"Use initWithCGImage: instead."); - (instancetype)initWithCGLayer:(CGLayerRef)layer options:(nullable CI_DICTIONARY(NSString*,id) *)options NS_DEPRECATED_MAC(10_4,10_11,"U

Re: NSMenuItem's selectors messages not sent

2009-08-31 Thread Steven Degutis
t the case. In any event, you can use gdb to trace the program's execution flow to find out exactly when certain things are happening, and put breakpoints on questionable lines of code. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Aug 31, 2009 at 4:20

Re: NSUserDefaults

2009-09-03 Thread Steven Degutis
only. (Why they aren't balanced is beyond me.) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Thu, Sep 3, 2009 at 4:05 PM, Oftenwrong Soong wrote: > Hi all, > > Why does NSUserDefaults provide method stringForKey but not a method > setStrin

Re: NSUserDefaults

2009-09-03 Thread Steven Riggs
That's how I do it. I also use setValue:forKey: when passing NSLocalizedString() -Steve On Sep 3, 2009, at 5:05 PM, Oftenwrong Soong wrote: Hi all, Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? Thi

Re: (no subject)

2009-09-04 Thread Steven Degutis
This is a common concept. In fact, it's exactly how nearly all twitter apps on the iPhone work. Usually it can be done manually with NSURLConnection and the like, though you may consider using a third-party framework like ASI-HTTP-Request or CocoaREST. -- Steven Degutis

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Steven Degutis
ory splash screen that explains how to use the app using images (and movie files if needed). Another nice example of this is in the app Things.app That is all. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Wed, Sep 2, 2009 at 10:28 AM, Michael A. Crawford <

Re: capturing a partial screen.

2009-09-04 Thread Steven Degutis
If you're specifically trying to mimic the screenshot-capabilties in Mac OS X itself, you can use the `screencapture` command line utility, coupled with an NSTask object in Cocoa. This is what I use in one of my apps, and what Papaya does. -- Steven Degutis http://www.thoughtfultree.com/

Re: Application main menu title behavior change in 10.6

2009-09-04 Thread Steven Degutis
t least look to see if this is possible using private APIs in AppKit. But that's just me... -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Fri, Sep 4, 2009 at 1:31 PM, Jim Turner wrote: > Hi all, > > I have an application (QuicKeys) that allows the us

Re: Custom Window not receiving "full" shadow

2009-09-04 Thread Steven Degutis
Francisco, Generally this less pronounced shadow is produced by giving an NSPanel the "Utility" style in IB. As I've never had to do it programmatically, I don't know what the relevant method would be to set this style, but I'm sure it's a style on the NSWindow c

Re: Custom Window not receiving "full" shadow

2009-09-04 Thread Steven Degutis
Interestingly, after searching the NSWindow (and NSPanel) docs and google for like 5 minutes, I still can't figure out how to set this small shadow programmatically. Now I'm all curious! Anyone know? -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Fri, Sep

Re: Easy Question re NSWindowController

2009-09-05 Thread Steven Degutis
indowNibName: and pass the name of this second NIB file you've just created. That's how I do it. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sat, Sep 5, 2009 at 7:42 AM, Brad Gibbs wrote: > I've done some testing, but I just can't make t

Re: crash question NSString

2009-09-05 Thread Steven Degutis
This error is not indicating that the receiver is invalid, but rather than your argument is nil. Thus, perform some kind of check to verify it's not nil, before passing it as an argument to the method, lest you get this error. -- Steven Degutis http://www.thoughtfultree.com/

Re: NSMenuItem font size of the keyboard shortcut text

2009-09-06 Thread Steven Degutis
n't bother trying, were I you. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Sep 6, 2009 at 1:23 AM, aaron smith wrote: > Does anyone know of a way to change the font size of the keyboard > shortcut text in an NSMenuItem? > > I use NSAttributed

Re: NSArrayController design/usage question

2009-09-06 Thread Steven Degutis
our example of Now Playing, since it has less to do with your model itself, but it works fairly well when you have a property derived from other properties on your Entity. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Sep 6, 2009 at 10:41 AM, Gregory Holden w

Re: completion handlers?

2009-09-06 Thread Steven Degutis
C and/or Cocoa, but never heard of Blocks before. Here's the link: http://www.degutis.org/dev/2009/08/30/beginners-guide-to-blocks-in-cocoa/ In a nutshell, Blocks are very simple, and greatly improve your code's readability and maintainability. (And yes, they work for C as well as Obj

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Steven Degutis
rt has come back positive (for chlamydia). -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Sep 7, 2009 at 10:14 AM, Joshua Garnham wrote: > How would I do this? > The Outline View is being used with Core Data. > > Cheers, > Josh. > > > > >

Re: mouseDown Event Position Accuracy (was: NSString drawAtPoint and vertical font alignment)

2009-09-07 Thread Steven Degutis
, and see if it is acting "as expected" at that point, by appearing to register clicks inside the bounds and not outside. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Sep 7, 2009 at 11:19 AM, Stephen Blinkhorn < stephen.blinkh...@audiospillage.co

Re: Problem with LSSharedFileListInsertItemURL() usage. (API in LaunchServices/LSSharedFileList.h)

2009-09-07 Thread Steven Degutis
t had no Dock icon, and only used status bar items.) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Sep 7, 2009 at 6:10 AM, Parimal Das wrote: > Hello all, > > I am trying to do the following- "when my app is used for the first > time -

Re: NSTableView doesn't increase the number of elements in table?

2009-09-08 Thread Steven Degutis
t somewhere. But remember, use NSArrayController, not manual bindings, when using Core Data. (Usually.) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Tue, Sep 8, 2009 at 9:55 AM, Rui Pacheco wrote: > Hi all, > I've an NSTableView that uses the controller object

Re: NSArray EXEC_BAD_ACCESS when initalized with strings

2009-09-08 Thread Steven Degutis
For some reason, I really doubt that the creation of the NSArray is causing this exception. Have you run this through the debugger and verified this is the exact line that throws the exception? And is that the exact line of code? -- Steven Degutis http://www.thoughtfultree.com/ http

Re: How can we draw a horizontal line with embossing effect?

2009-09-10 Thread Steven Degutis
Arun, It's just two lines drawn on top of one another, with the top one darker than the background and the bottom one lighter. I use it in my Preference panels all the time. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Thu, Sep 10, 2009 at 4:15 AM, Arun

-NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread steven Hooley
- shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? NSMutableIndexSet *someIndexes = [NSMutableIndexSet indexSet]; [someIndexes addIndex:0]; [someIndexes addIndex:2]; [someIndexes shiftIndexesStartingAtIndex:2 by:-1];

Re: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread steven Hooley
Done. Refrence 7231673. Thanks all. 2009/9/17 Corbin Dunn : > > On Sep 17, 2009, at 6:23 AM, steven Hooley wrote: > >> - shiftIndexesStartingAtIndex:by: and >> -containsIndexesInRange:NSMakeRange: don't seem to play nicely >> together.. >>

Re: Bison/Yacc with Objective-C ?

2010-03-12 Thread steven Hooley
> Bloomin' magic! Thanks, Filip, it worketh well. Hardy souls all. > Tom W. Is it possible to see an example of how this might be used? I'd like to understand Bison/Yacc better and i think an example relevant to Cocoa / Objective-C would really help.

Re: death in dealloc

2010-03-13 Thread Steven Degutis
release an ivar but don't set it to nil afterwards. -Steven On Sat, Mar 13, 2010 at 12:53 PM, Stuart Malin wrote: > I have some code that is throwing EXC_BAD_ACCESS. It does so when an object > is deallocating, in its -dealloc method on a call to [super dealloc]. The > object's

Re: Cut and paste out of/ into text fields in a separate window doesn't work

2010-03-15 Thread Steven Degutis
developers of the host app to ask them what's going on, since they will have more intimate knowledge of their app's "uniqueness". -Steven On Mon, Mar 15, 2010 at 11:04 AM, Brian Postow wrote: > I have a Mozilla plugin which puts up a separate window for login > inform

Re: Cut and paste out of/ into text fields in a separate window doesn't work

2010-03-16 Thread Steven Degutis
otentially confusing plugin authors, and possibly even newer users. -Steven On Mon, Mar 15, 2010 at 2:27 PM, Don Quixote de la Mancha < quix...@dulcineatech.com> wrote: > On Mon, Mar 15, 2010 at 10:15 AM, Steven Degutis > wrote: > > In my experience, Firefox (and thus > > prob

Re: Nil items in NSMutableSet

2010-03-16 Thread Steven Degutis
even data-corrupting ones) and then send that app to unsuspecting users. Not a great piece of advise, in my book. -Steven On Tue, Mar 16, 2010 at 6:34 PM, Daniel DeCovnick wrote: > There was a thread on this list a few days ago about effective method > swizzling into Apple classes. Despite be

Re: app window that doesn't deactive the current app

2010-03-16 Thread Steven Degutis
Please refer to this article: http://stackoverflow.com/questions/1657659/cocoa-nsstatusbar-global-hotkey =Steven On Tue, Mar 16, 2010 at 3:16 PM, Martin Batholdy wrote: > Hi, > > I would like to have a window that pops up via a shortcut. > This window should be in background and th

Re: Cocoa sometimes raises "minor" exceptions without logging them

2010-03-17 Thread Steven Degutis
I usually add a breakpoint on objc_exception_throw. Not sure how much of a difference it makes... but yeah, I agree. -Steven On Wed, Mar 17, 2010 at 12:55 PM, Jerry Krinock wrote: > > Apparently, Cocoa sometimes raises "minor" exceptions without logging them, > so it&#

Re: How to add a DOCTYPE declaration to an NSXMLDocument?

2010-03-31 Thread Steven Spencer
The following code produces the equivalent XML : NSXMLDocument *myDoc = [[NSXMLDocument alloc] initWithRootElement:[NSXMLElement elementWithName:@"myDocType"]]; NSXMLDTD *myDTD = [[NSXMLNode alloc] initWithKind:NSXMLDTDKind]; [myDTD setName:@"myDocType"]; [myDoc setDTD:myDTD]; [myDoc setVersion:

Re: Best book for learning Objective c and cocoa

2010-03-31 Thread Steven Degutis
Depending on your level of experience with Cocoa and Objective-C, you may benefit from Cocoa Programming for Mac OS X, by Big Nerd Ranch: http://www.bignerdranch.com/book/cocoa ®_programming_for_mac®_os_x_3rd_edition -Steven On Wed, Mar 31, 2010 at 8:20 AM, Nikhil Khandelwal < nikhil_khan

Re: Any frameworks for Leopard's Spaces?

2010-04-05 Thread Steven Degutis
The NSWorkspace notification is the only public API for this. Relatedly, you should not use private APIs which will restrict Apple's ability to change the internal implementation easily in the future, and make innovations or improvements difficult on them. -Steven 2010/4/5 Ulai Beekam &g

Re: advancementForGlyph problem

2010-04-30 Thread steven Hooley
> The information I am getting back from advancementForGlyph doesn't > seem to be correct. Here are the glyph bounds and advancement for > the capital letter 'A' in Georgia 36pt: > > == A == > bounds x: -0.720703 > bounds y: 0.00 > bounds w: 25.699219 > bounds h: 25.294922 > advance w: 24.1523

Re: advancementForGlyph problem

2010-05-04 Thread steven Hooley
On 3 May 2010 02:00, David F. wrote: > >> How on earth are you determining that it "looks like the advancement >> should only be ~23.2" ? > > By counting pixels. > You mean, for example, the distance from the leftmost pixel of the 'A' to the leftmost pixel in the following glyph? My current think

Re: self = [super init], nil?

2010-05-11 Thread steven Hooley
> Fourth reason: it doesn't play well with code coverage. If the 'if' and > its body are on the same line then knowing that that line executed does > not tell you as much as it could if the body was on its own line. Not really valid, given xcode doesn't support code coverage.

Re: self = [super init], nil?

2010-05-11 Thread steven Hooley
Oh, i fondly remember when it used to support it. But anyway, this is off topic.. so i'll be quiet. On 11 May 2010 12:52, Joanna Carter wrote: > Le 11 mai 2010 à 12:36, steven Hooley a écrit : > >> Not really valid, given xcode doesn't support code coverage. > > Try G

Re: New allowsExternalBinaryDataStorage in Core Data

2011-08-25 Thread Steven Vandeweghe
ld be stored in ~/Library/MyLionApp/.MyLionApp_SUPPORT/_EXTERNAL_DATA/. The documentation is indeed very sparse, so I've investigated a bit myself and posted the results here : http://bluecrowbar.com/blog/2011/08/coredata-external.html Steven On Aug 3, 2011, at 10:29 PM, Frédéric Te

NSBezierPath HiDPI

2011-09-10 Thread Steven Spencer
d ? I have to rerun the code for it to take account of a display resolution change, how do I fix this ? Thanks. Steven Lion, Xcode 4.1, Garbage collection on. -- #import @interface TestView : NSView { NSBezierPath *thePath; } - (NSAffineTran

NSView mouseDown truncated coordinates

2011-11-25 Thread Steven Spencer
w:nil]; Logged as e.g. NSLog(@"moved x:%f y:%f", location.x, location.y); What is the correct way to obtain coordinates that are consistent across all the mouse events ? Thanks. Steven (Xcode 4.2.1 64bit LLVM 3.0 ARC) ___ Cocoa-dev mailing

Re: __block __weak - am I doing this right?

2012-02-18 Thread steven Hooley
> The same issue came up again later the same day: > >__block UIBackgroundTaskIdentifier bti = [[UIApplication sharedApplication] >beginBackgroundTaskWithExpirationHandler: > ^{ >[[UIApplication sharedApplication] endBackgroundTask:bti]; >}]; > >

Re: __block __weak - am I doing this right?

2012-02-18 Thread steven Hooley
mp;sa=X&ei=T-s_T76JEaOl0AW0y-iPDw&ved=0CGoQ6AEwCTgK#v=onepage&q=beginBackgroundTaskWithExpirationHandler&f=false That's an awful lot of broken code. On 18 February 2012 17:23, Fritz Anderson wrote: > On 18 Feb 2012, at 7:41 AM, steven Hooley wrote: > >&g

Re: __block __weak - am I doing this right?

2012-02-18 Thread steven Hooley
> That's exactly *why* I've been asking about it - so I can fix it (and explain > the fix) for the new edition: Sorry, I did not mean to imply 'many people have done it wrong because of this book'. What i Failed at saying was "but.. I've seen this pattern everywhere, even in Apple sample code, it

Re: Book for expert programmer about cocoa and Objective-C

2011-04-02 Thread Steven Woolgar
> But now, I need a book for professional. Book that is BIG, DIFFICULT and is > HARDCORE about anything for cocoa and objective-c. That show a really lot of > thing. That will be my book for years.. You understand, right? Cocoa Design Patterns:

RE: How To Increment CALayer Retain Count?

2011-04-11 Thread steven Hooley
>> I know its not very popular, but I've disciplined myself to set all >> variables (including stack) to their low or unused state when finished >> with them. It helps locate reuse problems in Debug builds (and I >> really don't care a bit about the 3 cycles). The optimizer can remove >> it later i

computing values within NSTableView using bindings

2011-04-21 Thread Guy Steven
I have an NSTableView with 3 columns. The first contains an NSPop-up which takes as its datasource an array of objects with two properties, name and cost. The name is displayed. The user enters a quantity in the 2nd column. How do I go about displaying the cost in the third column? I can bind t

Properties vs Instance Variables

2011-04-26 Thread Guy Steven
I am currently learning objective c and cocoa I believe I understand the difference between properties and instance variables, and the effect of using properties as opposed to instance variables viz a viz KVO and memory management. What I can't understand is why you would access instance variable

Re: Code style (was: Notify With Parameters)

2011-06-02 Thread Steven Woolgar
> Slightly OT: Does Apple offer a tool similar to 'indent' for > formatting? I've never tried indent on Objective C files because it > does a miserable job on C++ source files. I use Uncrustify Hope that helps. W. ___

Screwy Binding/KVO

2009-12-11 Thread Steven Degutis
yPath :keyPath]); } @end This is the output: *2009-12-11 11:10:02.139 ScrewyKVO[21311:a0f] mark 1* *2009-12-11 11:10:02.515 ScrewyKVO[21311:a0f] observing keypath [content] == [(* *)]* *2009-12-11 11:10:02.516 ScrewyKVO[21311:a0f] mark 2* *2009-12-11 11:10:02.521 ScrewyKVO[21311:a0f] mark 3*

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
ObjC type, no scalars or structs or anything else will work with this system. (Mike Ash explains pretty well on this blog why trying to support those things can lead to some unfixable trickiness, which I just wanted to avoid altogether.) If you can't support 10.6, then, this won't work.

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
Oops, correction: the downside is that all arguments and return values need to conform to NSCoder protocol. So, it's even more strict than I described earlier. But it's still cool :) -Steven On Wed, Jan 20, 2010 at 12:40 PM, Steven Degutis wrote: > Recently I had the same issue yo

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
this. -Steven On Wed, Jan 20, 2010 at 1:32 PM, Carter R. Harrison wrote: > > On Jan 20, 2010, at 1:40 PM, Steven Degutis wrote: > > Recently I had the same issue you were having, sort of. And I came up with > a solution I really liked. > > When I was playing with Distributed Object

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
Also, I still recommend using AsyncSocket instead of NSStream APIs as AsyncSocket will make your life much simpler at pretty much no cost. -Steven On Wed, Jan 20, 2010 at 11:39 AM, Carter R. Harrison wrote: > I need some folks experienced with cocoa and socket programming to weigh in >

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
>> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/cepakare%40gmail.com >> >> This email sent to cepak...@gmail.com >> > ___ > > Cocoa-dev mailing list (Cocoa-dev@l

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
between 2 Cocoa apps can further be secured by using SSL with AsyncSocket (it just uses CFSocket and friends, so it should be fairly straightforward, at least as far as SSL goes). -Steven On Wed, Jan 20, 2010 at 3:15 PM, nicolas berloquin wrote: > This is a genuine question/remark that pops up.

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
something, and then execute arbitrary code. I don't have any clue how likely this is or how difficult it would be to do, or to prevent/protect against. -Steven On Wed, Jan 20, 2010 at 3:15 PM, nicolas berloquin wrote: > This is a genuine question/remark that pops up. No check is done on what &g

Question regarding response time between UIScrollView and UIButton

2010-01-22 Thread Steven Noyes
to do with "touchesShouldCancelInContentView:" and "canCancelContentTouches" but cannot put the pieces together. Steven Noyes ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator com

Re: NSDocument "save as" bug

2010-02-02 Thread steven Hooley
> "It all boils down to the point that this little popup that's added to the > panel to select the file type seems to be screwing everything up." Is the little popup loaded from a nib? Is the 'File's Owner' of the little popup's nib set to your document? Did you know that -awakeFromNib message is

Re: NSArray (unique Items matching x)

2010-02-10 Thread Steven Degutis
You can do this using Key Value Coding, specifically using the collection operators like @distinctUnionOfSets etc. -Steven On Wed, Feb 10, 2010 at 9:11 PM, Jens Alfke wrote: > > On Feb 10, 2010, at 1:45 PM, Trygve Inda wrote: > > > iTunes seems to do this with the column bro

Re: Cocoa-based GPS framework?

2010-02-12 Thread Steven Degutis
If you can support 10.6, I would recommend using Core Location, which is pretty solid from my understanding. -Steven On Fri, Feb 12, 2010 at 11:57 AM, Jonathon Kuo < newsli...@autonomy.caltech.edu> wrote: > There used to be an open source Cocoa-based GPS framework for O

Re: Connected Objects being allocated

2010-02-12 Thread Steven Degutis
ew or SDController or SDButton, for instance. This helps prevent namespace collisions. Not entirely relevant to your question, just throwing it out there. -Steven On Fri, Feb 12, 2010 at 4:31 PM, Donald Klett wrote: > Once again, I am not understanding some aspect of Objective C and/or Co

Re: warning when setting the delegate of SpeechSynthesizer

2010-02-12 Thread Steven Degutis
as written. Steven Degutis Software Engineer Big Nerd Ranch, Inc. http://www.bignerdranch.com/ On Fri, Feb 12, 2010 at 9:22 PM, Martin Beroiz wrote: > > OMG, I'm sorry I just found that I should add > next to the class definition. > Disregard my last message. > > (I wonder why he

Re: setWidth pop-up list of NSComboBox

2010-02-13 Thread Steven Degutis
NSComboBox is an ordinary control just like any other. Thus, you can set it's frame with the -setFrame: method of NSView, from which it inherits. However, changing the width of this kind of control to accommodate its contents is pretty uncommon in standard Cocoa apps. -Steven On Thu, F

Re: Connected Objects being allocated

2010-02-13 Thread Steven Degutis
I don't know anything about that book, but I've always recommended Aaron Hillegass's book on Cocoa Programming for Mac OS X, as it's what I used to learn how to code Cocoa code. http://www.bignerdranch.com/book/cocoa_programming_for_mac_os_x_3rd_edition -Steven On Sat, Feb

cocoa-dev@lists.apple.com

2010-02-13 Thread Steven Degutis
Hack is a great way to describe it. This concept goes against the HIG that Apple specifies, and is not standard user interaction. Thus, there is no supported APIs to do this, because it's a "bad idea" to implement such a feature. -Steven On Sat, Feb 13, 2010 at 11:41 AM, Ada

Re: SetFrontProcessWithOptions and NSPanel

2010-02-14 Thread Steven Degutis
You can possibly solve this problem by subclassing the HUD NSPanel and returning YES in -canBecomeMainWindow. -Steven On Sun, Jan 31, 2010 at 7:00 PM, Chris Idou wrote: > > > I've got a NSPanel HUD that I need to be able to pop up above other > applications, but I need to pop

Re: Dock position and size

2010-02-14 Thread Steven Degutis
ggest looking into alternatives like hiding the Dock and Menu Bar from the user, if that's your concern. -Steven On Sun, Feb 14, 2010 at 1:10 PM, Sandro Noël wrote: > Greetings. > > Is there a way to determine the dock position on screen (left, right, > bottom) and it's (widt

Re: Dock position and size

2010-02-14 Thread Steven Degutis
the Dock is, because a lot of people count on that fact. -Steven On Sun, Feb 14, 2010 at 9:39 PM, Sandro Noël wrote: > Well the application I'm trying to do is a something I like to call a > Dock-Stack. > No it's not like those folders stacks. > > It's docks that w

Re: Executing shell script with root privilege

2010-02-15 Thread Steven Degutis
Essentially you need to use the Security.framework API which you were already using in the beginning. You're already heading in the right direction. If you continue to read the docs on it, you'll get your sample code working; they're pretty thorough docs I believe. -Steven On Mo

Re: Bind to string (path), convert to NSImage

2010-02-15 Thread Steven Degutis
h" because that at-symbol could eventually conflict with Apple's own collection operators. -Steven 2010/2/15 Trygve Inda > I have an NSImageWell (or NSView). I am using an NSCollectionView and have > it bound to an ArrayController which is bound to an array of NSDictionary. &g

Re: Validation error after setting the value of a boolean attribute

2010-02-16 Thread Steven Degutis
time, if you look at the header of your file, it tells you what types you should use as arguments to methods, and what types to expect as return values. Steven Degutis Software Engineer Big Nerd Ranch, Inc. http://www.bignerdranch.com/ On Tue, Feb 16, 2010 at 5:35 PM, Lynn Barton wrote: > Why

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Steven Degutis
You may want to use an NSTableView instead, sort of along the lines of what iTunes uses in its many different kinds of table-based modes. (Especially that new one with the artwork.) -Steven On Wed, Feb 17, 2010 at 6:17 AM, Eric Boo wrote: > Hi All, > > I have an NSView in which I

Re: Dynamically populate a popup menu

2010-02-17 Thread Steven Degutis
ests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/steven.degutis%40gmail.com > > This email sent to steven.degu...@gmail.com >

Re: Dynamically populate a popup menu

2010-02-17 Thread Steven Degutis
While NSMenuDelegate isn't wrong per se, I still prefer to use the NSPopUpButton's notification myself. Touching the button's internal menu seems like dipping my fingers where they don't belong. -Steven On Wed, Feb 17, 2010 at 10:41 AM, Jean-Daniel Dupas wrote: > > S

Re: Proper way to initialize application support file

2010-02-17 Thread Steven Degutis
Apple's docs explicitly say that this folder should only contain files that are *not* necessary for the app to function normally. Files that are necessary should be inside your app bundle, usually. -Steven On Wed, Feb 17, 2010 at 4:21 PM, Paul Johnson wrote: > I am working on a Docume

Re: what is a bindings pattern to check for a non-empty selection?

2010-02-19 Thread Steven Degutis
s bindings like this, so I've been looking for a "built-in" alternative. So now I'm wondering if "selectedobjec...@count" is a good alternative. Have yet to try it, but it looks viable. -Steven On Fri, Feb 19, 2010 at 8:27 AM, Ken Thomases wrote: > On Feb 19, 2010

Re: Help with creating CustomViews

2010-02-19 Thread Steven Degutis
This is what more experienced Cocoa coders generally do instead of what you're trying to do. -Steven On Mon, Feb 15, 2010 at 9:19 PM, Jean-Henri Duteau wrote: > Hi all, > > I'm a newcomer when it comes to Cocoa development. I have some good books > and they discuss the possibil

Re: Removing quit button from dock menu

2010-02-22 Thread Steven Degutis
This is not supported because users should be able to quit any app they choose. However, if your app is a Kiosk app, then there are other measurements you can take to make sure it runs in Kiosk mode. Look in Apple's docs for "kiosk mode" for more details. -Steven On Mon, Feb 22,

Re: Help with creating CustomViews

2010-02-23 Thread Steven Degutis
ame of the correct XIB it requires. Then, in the rest of your code, instantiate your NSViewController subclass and ask for its NSView via the -view accessor. Add the NSView anywhere you want. I often do this by using an NSBox and using -setContentView: -Steven On Fri, Feb 19, 2010 at 4:20 PM, Jean-He

Re: Removing quit button from dock menu

2010-02-23 Thread Steven Degutis
As I mentioned before, doing this is not supported by Apple. What kind of app are you creating, and why exactly are you under the belief that users must not be able to quit it from the Dock? -Steven On Tue, Feb 23, 2010 at 1:33 AM, yogin bhargava wrote: > I dont want to allow the user to q

Re: Removing quit button from dock menu

2010-02-24 Thread Steven Degutis
hey can quit it from the Dock in 2 ways (Quit or Force Quit). The recommended first step is to read the Human Interface Guidelines on what an app should and should not do. If you read and follow the HIG, your users will like you a lot better. -Steven On Wed, Feb 24, 2010 at 4:20 AM, yogin bharg

Re: Setting parent window

2010-02-26 Thread Steven Degutis
;s a really bad user experience to have a modal window when one is not required. Please look into reading Apple's documents called the Human Interface Guidelines, your users (and fellow developers on this list) will really appreciate it. -Steven On Thu, Feb 25, 2010 at 7:38 PM, Gaurav Sri

Re: Webview and dynamic content

2010-02-27 Thread Steven Degutis
Store them in your app's bundle. Related, if you want my 2¢, try as often as you can to avoid using a WebView. If you can replace its functionality with native Cocoa (and Touch) controls then that is the recommended development path. -Steven On Sat, Feb 27, 2010 at 5:39 AM, Jere Gmail

Re: NSButton and NSEvent

2010-02-27 Thread Steven Degutis
d line anyway, usually. So I wouldn't put too much thought into this. -Steven On Sat, Feb 27, 2010 at 8:46 AM, Jeremy Matthews wrote: > So I have a application that I am getting ready to put some finishing > touches on, but there are one or two things I'd like to do differently.

Re: NSMenuItem Action

2010-02-27 Thread Steven Degutis
list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/steven.degutis%40gmail.com > > This email sent to steven.degu...@gmail.com >

Re: How to get my application version from inside my code?

2010-02-27 Thread Steven Degutis
This is already shown in the default About box window, which is sufficient for most apps. But if you really need to have your own custom About box, you can get most of that information from -[NSBundle objectForInfoDictionaryKey:] -Steven On Sat, Feb 27, 2010 at 4:21 PM, Bengt Nilsson wrote

Re: NSViewAnimation vs Distributed Notification: Bug?

2010-02-27 Thread Steven Degutis
change the mode away from blocking-mode to something more background-thread-y. -Steven On Sat, Feb 27, 2010 at 6:24 PM, Iceberg-Dev wrote: > [Q] Is there a known bug in NSViewAnimation on Mac OS X 10.4 when it comes > to Distributed Notifications? > > Scenario: > - >

Re: Forcing the package bit

2010-03-01 Thread Steven Degutis
I believe this can be accomplished by exporting a new UTI that describes your package type (probably by extending com.apple.package or something like that). This would be done inside your app's Info.plist file. -Steven On Mon, Mar 1, 2010 at 8:14 PM, Graham Cox wrote: > I need to

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Steven Degutis
ey might change under your nose. -Steven On Mon, Mar 1, 2010 at 10:27 PM, BareFeet wrote: > Thanks Graham for your reply: > > >> I have some working code for adding attributes to a string. I'd like to > modify it so it will work without needing AppKi

Re: what is a bindings pattern to check for a non-empty selection?

2010-03-02 Thread Steven Degutis
I mean be disabled when the table has no selection, and enabled when it has any selection at all.) -Steven On Fri, Feb 19, 2010 at 7:04 AM, Joanna Carter < cocoa...@carterconsulting.org.uk> wrote: > Le 19 févr. 2010 à 11:02, Jean-Denis Muys a écrit : > > > I am looking for a way to enab

Re: Windows and nibs and dialogs, oh my!

2010-03-02 Thread Steven Degutis
he -window outlet of your subclass to the NSWindow in the XIB file (5) Instantiate your subclass somewhere and either access -window directly or call -showWindow: (which is what I usually do) -Steven On Tue, Mar 2, 2010 at 9:13 PM, William Squires wrote: > Please help, I'm still a bit fuzz

Re: Uninitialized rectangle??

2010-03-03 Thread Steven Degutis
will only get a value relative to the view's superview, so that'll be useless too. -Steven On Wed, Mar 3, 2010 at 2:23 PM, fabian wrote: > Hi, > > I once noticed that this code caused an assertion failure when placed > in awakeFromNib. > > NSStatusBar *statusB

Re: Uninitialized rectangle??

2010-03-04 Thread Steven Degutis
Are you sure that your NSStatusBar or NSStatusItem instances are nil, and not just what's returned from -view? I see no reason that it should be nil, and no proof that it is. (To be fair, I only skimmed this mess of a thread.) -Steven On Thu, Mar 4, 2010 at 12:05 PM, fabian wrote: >

Re: Uninitialized rectangle??

2010-03-04 Thread Steven Degutis
Right. Have you tried the solution I proposed in the /very first reply/ to this thread? -Steven On Thu, Mar 4, 2010 at 1:05 PM, fabian wrote: > On Thu, Mar 4, 2010 at 6:50 PM, Steven Degutis > wrote: > >> Are you sure that your NSStatusBar or NSStatusItem instances are nil,

Re: Uninitialized rectangle??

2010-03-04 Thread Steven Degutis
allow you to access that view's -window and thus the -frame of the NSWindow. Keep in mind though that this is a hack, and also usually very unnecessary and bad and against the HIG in the first place. -Steven On Thu, Mar 4, 2010 at 2:01 PM, fabian wrote: > On Thu, Mar 4, 2010 at 7:

Re: Converting a Cocoa Application project to a document-based one

2010-03-05 Thread Steven Degutis
these menu items hook up into, as well as seeing what the Info.plist is looking for in terms of document-handling info. -Steven P.S. Any relation to Lestat? On Thu, Mar 4, 2010 at 6:42 PM, Josh de Lioncourt wrote: > Hi all, > > First the question, in essence, is: > > If on

  1   2   3   4   >