Re: Codesign broken in 10.11.4

2016-04-07 Thread John Pannell
I've seen quite a bit on my newsfeed regarding this... http://mjtsai.com/blog/2016/03/31/gatekeeper-bug-in-mac-os-x-10-11-4/ https://www.noodlesoft.com/blog/2016/04/05/hazel-3-3-8-getting-past-the-gates/ https://forums.developer.apple.com/message/81349#81349 Haven't seen any workarounds yet - hop

Re: Alternative to stringWithContentsOfURL

2009-10-27 Thread John Pannell
Hi James- From your description ("Internal Error 500") it sounds like the request you are sending is not working when submitted to the server. Make sure any strings used to form the URL for the request are passed through stringByAddingPercentEscapesUsingEncoding: What follows is likely n

Re: NSTask and pseudo TTY

2010-03-28 Thread John Pannell
Hi James- Depending on your use case, you might be able to shut the buffering off by something like this... setvbuf(stdout, NULL, _IONBF, 0); Hope this helps! John On Mar 28, 2010, at 12:56 PM, James W. Walker wrote: > I've been running NSTask and reading the output using -[NSFileHandle > r

Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread John Pannell
Hi Brad I have no solutions, but can confirm that I have the same issue. I've ended up quitting after all cleans, relaunching, and then building (which works, but is clearly a workaround, not a fix). John Positive Spin Media http://www.positivespinmedia.com On Apr 26, 2010, at 7:18 AM, Brad

Re: [iPhone] How to create a unique string

2010-05-13 Thread John Pannell
Hi Tharindu- In the past, I have used a UUID for this purpose. You could add the following method to a category on NSString to make it quite easy: + (NSString*) stringWithNewUUID { CFUUIDRef uuidObj = CFUUIDCreate(nil); NSString *newUUID = (NSString*)CFUUIDCreateString(nil, uuidObj);

Advice: Which drawing API to use?

2011-08-23 Thread John Pannell
appreciate any discussion on these APIs, just to get me feeling confident enough one way or the other to get off the fence. I can't believe how long I've sat around waiting for mental clarity on this - starting to understand the whole architecture astronaut thing :-)

Re: New Core Data File Wrapper example ?

2011-09-15 Thread John Pannell
n one place, but haven't seen it yet. Hope this helps! John John Pannell http://www.positivespinmedia.com On Sep 15, 2011, at 12:15 PM, Frederic Testuz wrote: > In the WWDC 2011 video "Session 315 What's New in Core Data on Mac OS X", > there is a line about a new L

Re: creating multiple NSTimers

2011-09-29 Thread John Pannell
rhaps this a different way to consider the issue. HTH! John John Pannell http://www.positivespinmedia.com On Sep 29, 2011, at 4:06 PM, Tom Hohensee wrote: > Yes. What I have worked on is using an array of timers fired sequentially. > Each firing of the timer sets up the next one i

Re: Zooming a view, that is contained in an NSScrollView

2011-10-17 Thread John Pannell
t, and your drawing will now scale up and down per the user's use of the controls you've provided. It is a really nice bit of code (thanks Graham!) John John Pannell http://www.positivespinmedia.com On Oct 17, 2011, at 12:46 PM, Nick wrote: > Hi Fritz, > thank you for the lin

ARC + return of autoreleased CFType

2011-10-19 Thread John Pannell
the value, but the only thing I can get it to not squeak about is this: return (__bridge_retained CGColorRef)(__bridge_transfer id)theColor; which does not seem reasonable to me. Can anyone suggest the proper syntax to return an "autoreleased" CGColorRef from this

Re: ARC + return of autoreleased CFType

2011-10-19 Thread John Pannell
Many thanks to all who responded. Here's a few resolutions for the archives: 1. CFType: cast to id and autorelease. Verdict: it is OK (under manual memory management). http://www.cocoabuilder.com/archive/cocoa/215004-autorelease-cgimageref.html http://developer.apple.com/library/mac/#document

Re: NSNetService getInputStream:outputStream: and ARC

2011-12-08 Thread John Pannell
Some insights here - hope it helps! http://developer.apple.com/library/ios/#qa/qa1546/_index.html#//apple_ref/doc/uid/DTS40011324 John On Dec 8, 2011, at 3:11 PM, Martin Linklater wrote: > Hi - I'm writing some OSX NSNetService code with ARC enabled, and I'm getting > the following compile err

Re: Full-Height Toolbar Item

2012-01-27 Thread John Pannell
leave the toolbar's display mode to NSToolbarDisplayModeIconOnly and show/hide your labels in their container views. Hope this helps! John John Pannell http://www.positivespinmedia.com On Jan 26, 2012, at 5:28 PM, Mark Alldritt wrote: > Hi Everyone, > > I'm looking for a way to make a view-base

Re: Playing Music in Objective C

2012-02-13 Thread John Pannell
(sound delay, no app freeze or the like) associated with the wake up caused by your first app-related sound. Just FYI! John John Pannell http://www.positivespinmedia.com On Feb 13, 2012, at 8:30 AM, Jim McGowan wrote: > > On 13 February, 2012 4:38, Jens Alfke wrote: >> >&g

Re: Localizing MainMenu.xib?

2012-02-29 Thread John Pannell
Hi Marc- Matt Gemmell has a localized nibs package that includes the standard main menu nib in a variety of languages... http://mattgemmell.com/source/ It is about 3/4 the way down the page... hope this helps! John On Feb 29, 2012, at 4:32 PM, Marc Respass wrote: > Hi All, > > My applicatio

Re: Are the progress spinner images publically available?

2011-03-31 Thread John Pannell
Hi James- Don't know if this fits your objectives, but I found an excellent layer-based solution to this: YRKSpinningProgressIndicator https://github.com/kelan/yrk-spinning-progress-indicator-layer Hope this helps! John John Pannell http://www.positivespinmedia.com On Mar 31, 2011,

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

2011-04-01 Thread John Pannell
Even though it is getting on in age, I really like Anguish, Buck and Yacktman's Cocoa Programming... http://www.amazon.com/Cocoa-Programming-Scott-Anguish/dp/B000212NUM/ref=sr_1_7?s=books&ie=UTF8&qid=1301687411&sr=1-7 Once you've completed the beginner stuff, this provides a very thorough look a

Re: BSD TCP Programming on iPad

2011-04-25 Thread John Pannell
t and Bonjour http://www.amazon.com/Advanced-Mac-Programming-Core-Unix/dp/0974078514 ... chapters 13, 14, 19, and 20 are relevant. They dig into the lower level APIs, should you still be interested in going there. Hope this helps! John John Pannell http://www.positivespinmedia.com On A

Re: How to detect string encoding before reading a file in NSString?

2011-04-26 Thread John Pannell
rence/reference.html%23//apple_ref/doc/uid/TP3123 Hope this helps! John John Pannell http://www.positivespinmedia.com On Apr 26, 2011, at 12:53 PM, Nick Zitzmann wrote: > > On Apr 26, 2011, at 12:49 PM, Laurent Daudelin wrote: > >>> TextEdit's encoding guesser just uses the

Re: How to detect string encoding before reading a file in NSString?

2011-04-27 Thread John Pannell
> http://www.nemesys-soft.com/ > Logiciels Nemesys Software > laur...@nemesys-soft.com > > On Apr 26, 2011, at 12:39, John Pannell wrote: > >> Hi Laurent- >> >> I have an app that collects a lot of text off

Re: QuickTime Player - like application

2011-05-11 Thread John Pannell
change the native user interface elements or behaviors of Mac OS X will be rejected > Could you please point what guides/references (the names) to look at > to make such things? > Thank you! Good Luck! John John Pannell http://www.positivespinmedia.com __

Re: How do I bind ManagedObject's relationships to a view?

2009-12-01 Thread John Pannell
Hi Daniel- I just happened to be knocking out a prototype for something I'm working on with a similar structure to your example. It consists of "steps" that can have many "ports", or step <->> port. The example is pretty much code free; I was just trying to display and edit steps and ports us

Re: Extract keys, values from 'usrf' Record Type NSAppleEventDescriptor?

2010-02-21 Thread John Pannell
Hi Jerry- You're going to want to look at NSAppleEventDescriptor's numberOfItems, keywordForDescriptorAtIndex: and descriptorAtIndex: methods, and play around with them a little. One thing to keep in mind is that the lists are 1-based, so start looking at index 1 :-) It's been quite some time

Re: Determine encoding of file

2010-07-30 Thread John Pannell
Hi Dave- I have some code I've been using for a few years for this purpose... when I consulted Google on the source of the TECSniffer class that I have, the search was not revealing. So... I've posted the class files here: http://www.positivespinmedia.com/dev/TEC.zip I believe it is using som

Re: To make an application start everytime when another program starts

2010-09-23 Thread John Pannell
ent (prevents icon in the dock, app in force quit list, other things), I'm thinking the panel (which belongs to your app, and not word) might act funny. You might need to watch for word gaining and losing focus and hide/show your panel appropriately. Hope this helps! Joh

Re: Programmatic Toolbar Blinking

2010-11-05 Thread John Pannell
Hi Richard- No answers, just a datapoint... I looked at a couple of my apps (which have never had the blinking issue, to my eye): one did the toolbar assignment in the window controller's awakeFromNib, the other did it in windowDidLoad. Not knowing the mechanics of how your window gets on the s

Main but not Key window behavior

2010-11-06 Thread John Pannell
Main[10930:a0f] panel is key: YES 2010-11-06 12:22:21.789 KeyVsMain[10930:a0f] panel is main: NO I'm on 10.6, could anyone verify that they are seeing the same, or better yet, see what I've done wrong to prevent the desired result? Any help i

Re: NSTextField: text appears aliased

2010-12-20 Thread John Pannell
Hi Artemiy- Couldn't tell from the screenshot, but it appears that the text might be small... if so, there is a preference to turn off text smoothing for fonts of a certain size or smaller (System Preferences > Appearance - down at the bottom of the pane). Another possibility: are you using la

Re: Binding label value to CoreDara int16

2010-12-29 Thread John Pannell
Hi Siegfried- Consider making an NSValueTransformer subclass that converts the stored integer into the text you would like to see. You can then use the transformer in the binding to see the text you'd like. I implemented something similar as follows: @implementation PKConnectionStateValueTran

Re: Array annotation strangeness

2012-05-09 Thread John Pannell
Hi Alex- When enumerating the array, you've defined the objects in the collection as NSDictionary (which doesn't have that method)... for (NSDictionary * myAnnotation in self.mapView.annotations) Change the above to: for (MyLocation * myAnnotation in self.mapView.annotations) And the compiler

Re: Managed Objects and Contexts

2012-05-30 Thread John Pannell
Hi Richard- The reasons to have multiple contexts within an app are as varied as application architectures, and do not need to correspond to multiple users (I'd go so far as to say "shouldn't", but I'm sure someone could find a way to make it work). An app I once wrote maintained two contexts

Re: "New" busy cursor in the Finder

2012-12-19 Thread John Pannell
I noticed the appearance of this cursor recently and thought it corresponded with the new BBEdit 10.5... perhaps you have recently updated BBEdit? John >> I noticed recently that the Finder has a "new" very nice looking animated >> busy cursor, which you can see here: >> https://dl.dropbox.com

Re: NSNetService

2013-01-29 Thread John Pannell
Hmmm... are you sure you have kept a strong reference/pointer to your net service? I have production code that uses [service stop] and I can see the broadcasting service disappear immediately from other net service browsing peers. If your reference is nil, however, the stop message could fall

Re: rate limiting calls

2013-05-28 Thread John Pannell
Hi Torsten- You might consider something like the coalescing described in this blog entry: http://www.takingnotes.co/blog/2013/01/03/coalescing/ In short, you'd be using performSelector:withObject:afterDelay: to make the desired method call, and cancelPreviousPerformRequestsWithTarget:selector

Re: Cocoa n00b frustrations

2008-06-07 Thread John Pannell
Hi Charles- On Jun 7, 2008, at 9:44 PM, Charles Jenkins wrote: With regard to my problems with delegates, I think maybe my frustrations stem from something about the delegation process or about text fields that I do not understand. There's just a little twist to NSTextField that you are mi

Re: warning: return makes pointer from integer without cast

2008-06-10 Thread John Pannell
ce... in this case, the correct method signature is returning an int. Hope this helps! John John Pannell http://www.positivespinmedia.com On Jun 10, 2008, at 6:32 AM, Steven Hamilton wrote: Hi folks, newbie here. A quickie query on a warning. Both returns in the following code give a 'w

Re: garbage collection and NSConnection

2008-06-30 Thread John Pannell
back to "regular" memory management. You might inquire of Apple DTS if things have changed at all; my incident was in the 10.5.0 days. John John Pannell http://www.positivespinmedia.com On Jun 30, 2008, at 11:33 AM, [EMAIL PROTECTED] wrote: hey, I have a project that uses Bonjou

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread John Pannell
Hi there- This may or may not apply to your situation, but I had an incident a few weeks ago in which I could not get DO to work with communication between machines using NSSocketPorts. I was on Leopard and using garbage collection. When I posted to the list, I received a response from

Re: Sage advice (NSView vs. CALayer)

2008-10-28 Thread John Pannell
Hi Alex- One difference comes to mind, and is of substance for app design: - NSView is a subclass of NSResponder, CALayer is not. So views are happy to field click and keyboard events for you, participate in the responder chain, handle mouse drag/enter/exit, etc. I believe a common design

LaunchServices/Finder refuses to recognize my NSDocument subclass

2008-11-01 Thread John Pannell
Hi all- I'm working on a document-based application, but having trouble getting the Finder to match my document to my application. On disk, the document is a package. I am successfully writing the directory and the contents to disk, and the directory is written with the proper extension

Re: Drag Tabs, Custom Colors

2008-11-11 Thread John Pannell
Hope this helps! John John Pannell Positive Spin Media http://www.positivespinmedia.com ___ 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-a

Core Data + Unidirectional Relationships

2008-11-12 Thread John Pannell
modeling for this scenario? Or testify to the soundness of unidirectional relationships if managed as described? Any help is appreciated! John John Pannell Positive Spin Media http://www.positivespinmedia.com ___ Cocoa-dev mailing list (Cocoa-dev

Re: Set user agent for NSURL

2008-11-17 Thread John Pannell
rUserAgent forHTTPHeaderField:@"User- Agent"]; NSURLConnection *yourConnection = [NSURLConnection connectionWithRequest:request delegate:self]; The setting of the header field can be tough to find in the docs. Hope this helps! John John Pannell Positive Spin Media http://www.p

Re: Big picture relationships between NSConnection, NSInputStream, NSOutputStream etc

2008-12-03 Thread John Pannell
Hi Ken- I have spent a lot of time in those docs :-) In a nutshell, here's how I see NSConnection and DO... properly set up, NSConnections on the server and client side can enable you to pretty much ignore the fact that two objects live in separate processes. You'll just use regular obj

Re: Big picture relationships between NSConnection, NSInputStream, NSOutputStream etc

2008-12-03 Thread John Pannell
er) to do this sort of thing? On Dec 3, 2008, at 10:54 PM, John Pannell wrote: Hi Ken- I have spent a lot of time in those docs :-) In a nutshell, here's how I see NSConnection and DO... properly set up, NSConnections on the server and client side can enable you to pre

Re: CoreData -- addPersistentStoreWithType crashing

2008-12-10 Thread John Pannell
Hi Ben- If you are using a custom class to represent an entity in your model, you must make sure that it is a subclass of NSManagedObject in your code (and not NSObject). This might not be your issue, but I have had this bite me before - it issues the same error with no exception thrown,

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-13 Thread John Pannell
Hi Bridger- I had precisely the same issue some months ago, and wrote to this list. I did get a response off-list from an Apple engineer that mentioned that this was a known problem and there was no workaround at present. Not sure if things have changed since then (although perhaps they

Re: ObjectAlloc and objects that should have been released

2009-05-04 Thread John Pannell
Hi Miles- This may not be your issue, but I know it has bitten me a few times... a common tool in tracking down over-released memory is to set NSZombieEnabled. I sometimes end up setting this in the early, crashy stages of my development and then forget to disable this in the later, perf

DO, rootProxy, and garbage collection

2008-02-28 Thread John Pannell
riences or suggest other places to look in the search for stability? Any help is greatly appreciated! John John Pannell Positive Spin Media http://www.positivespinmedia.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: Unread count for items in Mail.app-styled NSOutlineView

2008-03-01 Thread John Pannell
Hi Leonardo- I implemented a counter that looked the same in a safari-like tabs implementation... http://www.positivespinmedia.com/dev/PSMTabBarControl.html Hope this helps! John On Mar 1, 2008, at 3:35 PM, Leonardo Cassarani wrote: Hi all I'm trying to make a lateral sidebar that is si

Re: @property and automatic synthesis of getters and setters.

2013-09-12 Thread John Pannell
Hi Peter- For the declared property "protoCell", automatic synthesis is going to make an instance variable named "_protoCell". You can then refer to it in an instance method as either: 1. _protoCell - direct ivar access. 2. self.protoCell - access through the getter. The reference to protoC

State Restoration with NSDocument architecture

2014-05-24 Thread John Pannell
Hi all- I’m working on a document-based app and making every effort to adopt the behaviors of a modern app. This includes state restoration, described in the current documentation at: https://developer.apple.com/library/mac/documentation/General/Conceptual/MOSXAppProgrammingGuide/CoreAppDesign

Re: State Restoration with NSDocument architecture

2014-05-24 Thread John Pannell
Hi Keary - I knew it was going to be something like this… :-) On May 24, 2014, at 8:58 AM, Keary Suska wrote: > Lastly, although it may be obvious, the "restore windows" system setting must > be turned on, or you have to use the option-quit method. Indeed - the setting was set to close window

Re: Problem in notification

2014-06-10 Thread John Pannell
Hi Tom- What does the implementation of this method look like? [ENSScrollView viewContentFrameDidChange:] This error: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x ... makes me think that something is nil that is not supposed to be, acco

Re: Smarter NSTimer?

2014-07-01 Thread John Pannell
Hi William- Would the following scenario work for your use case?... 1. When damage occurs, throw an object representing it into a collection. 2. Have a single timer that repeatedly fires a "cleanUp:" method, every five seconds or so. 3. In cleanUp:, go through the collection and remove a visu