Re: [webkit-dev] How to display new MIME types?

2017-07-26 Thread Conrad Shultz
> On Jul 22, 2017, at 7:32 PM, Jens Alfke wrote: > > >> On Jul 21, 2017, at 7:19 PM, Conrad Shultz wrote: >> >> You can build a Safari extension as an app extension bundled with an app, >> meaning you can write your extension in Swift or Objective-C (and

Re: [webkit-dev] How to display new MIME types?

2017-07-21 Thread Conrad Shultz
You can build a Safari extension as an app extension bundled with an app, meaning you can write your extension in Swift or Objective-C (and JavaScript). I encourage anyone who is interested to learn more at https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptua

Re: Any way to intercept the URL-opening mechanism on OS X?

2016-01-02 Thread Conrad Shultz
On Jan 2, 2016, at 15:04, Conrad Shultz <mailto:conrad_shu...@apple.com>> wrote: > >> >>> On Dec 22, 2015, at 3:51 PM, Rick Mann >> <mailto:rm...@latencyzero.com>> wrote: >>> >>> You know how you can click links in email, and heck

Re: Any way to intercept the URL-opening mechanism on OS X?

2016-01-02 Thread Conrad Shultz
> On Dec 22, 2015, at 3:51 PM, Rick Mann wrote: > > You know how you can click links in email, and heck, to open them in Safari > (or whatever browser)? Is there any way to write an extension of some sort > that can intercept this and re-write the URL? I tried to write a filter in > Safari pr

Re: How to

2015-12-09 Thread Conrad Shultz
> On Dec 6, 2015, at 2:56 PM, Graham Cox wrote: > > >> On 7 Dec 2015, at 2:45 AM, Dave wrote: >> >> On the Mac what is the best control to use to do this? > > > Just override -mouseDown: in the view and call [NSApp > sendAction:toTarget:from:] > I’d recommend looking at NSClickGestureRec

Re: Voiceover support

2015-11-17 Thread Conrad Shultz
One other thing you may find helpful is to test your app using Screen Curtain (https://developer.apple.com/library/ios/technotes/TestingAccessibilityOfiOSApps/TestAccessibilityonYourDevicewithVoiceOver/TestAccessibilityonYourDevicewithVoiceOver.html

Re: Trigger "Back to..." from code?

2015-11-17 Thread Conrad Shultz
As always, if helpful API is missing, please file a bug at https://bugreport.apple.com and explain your use case. Thanks, Conrad > On Nov 16, 2015, at 6:41 PM, Eric Shepherd wrote: > > Bummer. I was writing a Workflow script to do stuff and just wanted it > to be able to return me back to wher

Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread Conrad Shultz
> On Nov 5, 2015, at 6:50 AM, 2551 <2551p...@gmail.com> wrote: > >> or set a breakpoint on -[NSView(NSConstraintBasedLayout) >> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:]. > > Not sure I’m still following along. Are we talking symbolic breakpoint here? > I tried that, but

Re: CGContextShowTextAtPoint

2015-10-14 Thread Conrad Shultz
> On Oct 14, 2015, at 11:41 AM, Raglan T. Tiger wrote: > > > >> On Oct 14, 2015, at 10:02 AM, Jens Alfke wrote: >> >> The view is probably using flipped coordinates. Look up flipped coordinates >> in the Cocoa view documentation to understand what they are and how to work >> around the pro

Re: Handling http:// URLs

2015-10-13 Thread Conrad Shultz
> On Oct 13, 2015, at 5:34 PM, Rick Mann wrote: > >> On Oct 13, 2015, at 17:29 , Stephen J. Butler > > wrote: >> >> I think you're talking about Seamless Linking/Universal Links. Introduced in >> iOS 9 >> >> https://developer.apple.com/videos/play/wwdc2015-509

Re: questions on WebView for Mac apps

2015-10-02 Thread Conrad Shultz
> On Sep 30, 2015, at 11:59 AM, Jens Alfke wrote: > > >> On Sep 30, 2015, at 10:43 AM, Conrad Shultz > <mailto:conrad_shu...@apple.com>> wrote: >> >> WKWebVew is the preferred API. >> >> If WKWebView is missing API that prevents you from ad

Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-10-02 Thread Conrad Shultz
> On Sep 30, 2015, at 9:15 AM, Jonathan Mitchell > wrote: > > In my app i manage the responder chain on 10.8 and 10.9 to insert the > NSViewController into the responder chain. > The view controllers are inserted just below the NSWindowController so that > designated view controllers can resp

Re: questions on WebView for Mac apps

2015-09-30 Thread Conrad Shultz
WKWebVew is the preferred API. If WKWebView is missing API that prevents you from adopting it (on either iOS or OS X) please file a bug at https://bugreport.apple.com . -Conrad ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: iOS 9 or Watch App

2015-09-21 Thread Conrad Shultz
> On Sep 21, 2015, at 6:20 AM, Michael David Crawford > wrote: > > however you may only have one version of the command line tools > installed in /usr/bin and the like. You might take a look at https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1

Re: NSView's in Separate NIB

2015-09-04 Thread Conrad Shultz
> On Sep 4, 2015, at 10:30 AM, Dave wrote: > > The reason I ask is that for a while now when you create an NSView subclass > it no longer offers you the option to create a separate NIB file. I remember > a while back reading something saying that it was frowned upon. > You should be able to

Re: NSView's in Separate NIB

2015-09-04 Thread Conrad Shultz
> On Sep 4, 2015, at 9:23 AM, Dave wrote: > > Hi, > > Is it still allowable (taking into consideration Auto Layout) to have a > separate NSView subclass with a NIB? > Yes. Auto Layout should be unrelated to this, though if you are composing your separate views together in code then you wil

Re: Subclassing a Subclass of SBApplication

2015-09-03 Thread Conrad Shultz
Note that this is a category, not a class extension. -Conrad > On Jun 30, 2015, at 6:19 AM, Jean-Daniel Dupas wrote: > > Using class extension is probably a safe way to extends such classes. > > @interface SXPhotoshopApplication (MyExtension) > > - (void)myWrapper; > > @end > > >> Le 29 j

Re: NSStackView - Gravity Question

2015-08-28 Thread Conrad Shultz
> On Aug 28, 2015, at 6:18 AM, Dave wrote: > > I’m looking at: > > https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSStackView_Class/#//apple_ref/occ/clm/NSStackView/stackViewWithViews: > >

Re: Auto-Layout Again

2015-08-27 Thread Conrad Shultz
> On Aug 27, 2015, at 8:07 AM, Jerry Krinock wrote: > > In a hurry here, but, I know Auto Layout does not always play well with > scroll views. If you encounter a situation where Auto Layout is not playing well with NSScrollView (or, really, any view), please file a bug report at https://bug

Re: Auto Layout and XCode/IB Warnings

2015-08-26 Thread Conrad Shultz
> On Aug 26, 2015, at 10:10 AM, Dave wrote: > > Hi All, > > I’m getting these warning in a xib file: > > Draw Frame View > Expected: Height=436 > Actual: Height=48 > > Image View > Expected: y=464 > Actual: y=76 > > > And a few others of the same nature and I’m at a loss to know what to do

Re: removeItemAtPath in 10.7

2015-08-26 Thread Conrad Shultz
> On Aug 26, 2015, at 8:11 AM, sqwarqDev wrote: > > I built my app in Xcode 6.4 on 10.10.5. > > Runs without issue on Yosemite and Mavericks. However, when I boot into Lion > 10.7, I get an “unrecognized selector” error on the “removeItemAtPath” line. > Here’s the snippet" > > NSError *err;

Re: Auto layout in XCode 6.4

2015-08-25 Thread Conrad Shultz
> On Aug 25, 2015, at 4:23 AM, Dave wrote: > > Hi All, > > I’m trying to get my head around Auto Layout in XXCode, but can’t seem to > figure out some basic things. > > I have a sample project with a View made up of two Controls, a Text Field and > a Button, like so: > > | [TextView]

Re: Tech update avoiding legacy code

2015-08-14 Thread Conrad Shultz
This thread appears to be about OS X, not iOS. In any event, a great reference that covers many of the technologies under discussion is the Objective-C Feature Availability Index, available at https://developer.apple.com/library/mac//releasenotes/ObjectiveC/ObjCAvailabilityIndex/index.html

Re: Auto Layout and Resizable NSViews

2015-07-20 Thread Conrad Shultz
Or NSSplitViewController, if you can target 10.10+. > On Jul 20, 2015, at 1:50 PM, Gary L. Wade > wrote: > > Depending on your design, why not just use an NSSplitView to do all that for > you? > -- > Gary L. Wade (Sent from my iPhone) > http://www.garywade.com/ > __

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-15 Thread Conrad Shultz
> On Jul 15, 2015, at 3:53 PM, Graham Cox wrote: > > This works 99% of the time, but sometimes it just crashes. This seems to > occur when the app has just been activated after using a different app, and > this save panel is requested within a few seconds of the activation, though > that’s a

Re: How to enable local storage in WebView using Swift

2015-06-27 Thread Conrad Shultz
> On Jun 3, 2015, at 7:23 AM, Juanjo Conti wrote: > > Hi, I'm using WebView and I'd like to enable HTML5 local storage. > > I've read some questions on Stack Overflow where the suggestion is to do: > >WebPreferences *prefs = [webView preferences]; >[prefs _setLocalStorageDatabasePath:@

Re: EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000bbadbeef crash on UIWebview

2015-06-22 Thread Conrad Shultz
From this backtrace it looks like you might be trying to perform UI operations someplace other than on the main queue, which would cause problems. I'd start by checking whether you have: -Any dispatches to a background queue that might need a dispatch_async to the main queue. -Any observer call

Re: NIB for Cocoa Standard Alert Sheet

2015-04-20 Thread Conrad Shultz
> On Apr 20, 2015, at 11:12 AM, Dave wrote: > > Hi All, > > Is the Cocoa Standard Alert Sheet available anywhere in a NIB or failing that > is there a list of the fields and their Frame Rectangles anywhere? > > I’m sure it’s there somewhere, I’ve been doing google searches but I can’t > thin

Re: index beyond bounds when using a queue for a for-loop

2013-08-12 Thread Conrad Shultz
On Aug 12, 2013, at 11:23 AM, Koen van der Drift wrote: > > On Aug 12, 2013, at 2:05 PM, Jens Alfke wrote: > >> NSMutableArray isn’t thread-safe. You’ll need to synchronize/serialize the >> assignments somehow. You could do something like >> >> { >> id value = [self doCalculation: i];

Re: IOS floating point performance

2013-08-07 Thread Conrad Shultz
On Aug 7, 2013, at 1:50 PM, Trygve Inda wrote: > I have an app that is running slow. I have narrowed it down to several > functions which are trig-intensive (used to calculate the position of the > moon at a given moment and more specifically to calculate rise/set times). > > To calculate the p

Re: Using autolayout in a UI table view section header view

2013-07-12 Thread Conrad Shultz
On Jul 11, 2013, at 2:26 PM, Rick Mann wrote: > I'm trying to reproduce the UITableView section header view used by iOS for > regular text headers. I wanted to make sure you know about UITableViewHeaderFooterView, which might be of use: http://developer.apple.com/library/ios/#documentation/u

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Conrad Shultz
On Mar 26, 2013, at 2:05 PM, Marco S Hyman wrote: >> 3) The TKOutlineView then later attempts to send the >> message from #1 above to its delegate. > > The code noted earlier used introspection to ensure the delegate responded > to the selector before the message was sent. A non TKOutlineVie

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Conrad Shultz
On Mar 26, 2013, at 1:40 PM, Quincey Morris wrote: > On Mar 26, 2013, at 13:11 , Conrad Shultz wrote: > >> If code expecting an NSOutlineView receives a TKOutlineView instance it may >> break or behave unexpectedly since it may well try to set a delegate >> conformi

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Conrad Shultz
On Mar 26, 2013, at 12:58 PM, Chris Tracewell wrote: > On Mar 26, 2013, at 12:38 PM, Quincey Morris > wrote: > >> 2. Redeclare the "delegate" property: >> >> @interface TKOutlineView : NSOutlineView {} >> @property (nonatomic,readonly) id delegate; >> @end >> >> @impleme

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-25 Thread Conrad Shultz
On Mar 25, 2013, at 4:06 PM, Chris Tracewell wrote: > On Mar 25, 2013, at 1:54 PM, Conrad Shultz wrote: >> "[self delegate]" is not the same as "delegate" - the former sends the >> -delegate message, the latter references a variable named "delegate"

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-25 Thread Conrad Shultz
On Mar 25, 2013, at 12:47 PM, Chris Tracewell wrote: > I have a subclass of NSOutlineView that has custom delegate methods. In the > implementation file I get an error for "No known instance method for > selector..." when I call these declared methods using [self delegate] or > delegate. Howe

Re: Create custom NSTableView with a button inside

2012-09-03 Thread Conrad Shultz
ound sample project from Apple? TableViewPlayground covers view-based table views; the OP specified cell-based table views. My question to Alfian, however, is why a cell-based table view is desired. Are you targeting 10.6? -- Conrad Shultz Synthetiq Soluti

Re: Applying iOS file protection to SQLite databases

2012-08-15 Thread Conrad Shultz
Jens, I vaguely recall this being covered in one of the 2010 or 2011 WWDC videos... title was something along the lines of "Securing iOS Data." Might be worth a look, but it looks like you found the major piece. (Sent from my iPhone.) -- Conrad Shultz On Aug 15, 2012, at 20:35,

Re: crash in showOpenPanel on ML

2012-08-04 Thread Conrad Shultz
Code signing and the MAS are distinct. All apps in the MAS are signed. Not all signed apps are in the MAS. All apps, MAS or not, should be signed nowadays. (Sent from my iPhone.) -- Conrad Shultz On Aug 4, 2012, at 8:26, Koen van der Drift wrote: > I have no apps in the wild (yet).

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Conrad Shultz
On Aug 1, 2012, at 2:24 PM, Alex Zavatone wrote: > Hmm. The row accessor is doing something quite unexpected. > > Automatic Reference Counting Issue: Receiver type 'NSDictionary' for instance > message does not declare a method with selector 'objectsForKeys:' > > Since when does an NSDictio

Re: iOS Rendering PDFs on a Background Thread

2012-07-26 Thread Conrad Shultz
On Jul 26, 2012, at 2:09 PM, Dave wrote: > Hi All, > > I like to be able to fire off a Background thread that Renders PDF pages to > UIImage's. > > I've got the code working on the Main Thread, but now the tricky bit because > since I am using UIGraphicsBeginImageContextWithOptions and > UIG

Re: saving images

2012-07-21 Thread Conrad Shultz
n archive the image to an NSData (and of course unarchive) in the usual manner. (Sent from my iPhone.) -- Conrad Shultz On Jul 21, 2012, at 9:03, "H. Miersch" wrote: > hi. > > i just started a new ios project where i want to download images using > NSimage's in

Re: Regex library recommendations ?

2012-07-18 Thread Conrad Shultz
NSRegularExpression? (Sent from my iPhone.) -- Conrad Shultz On Jul 18, 2012, at 19:59, Erik Stainsby wrote: > My project is going to require several rounds of string parsing, and I'm an > old perl hand, so I naturally want to add a regex wrapper to my workspace. > Anyone got

Re: Core Data book for OSX

2012-07-14 Thread Conrad Shultz
While not a book, I heartily recommend the Core Data video training course from ideveloper.tv. Marcus Zarra is the presenter and there was a follow-up supplement for Lion. (Sent from my iPhone.) -- Conrad Shultz On Jul 14, 2012, at 5:06, Koen van der Drift wrote: > I really want to le

Re: Adding Properties to NKIssue?

2012-07-04 Thread Conrad Shultz
mentation/cocoa/conceptual/objectivec/Chapters/ocAssociativeReferences.html and the Objective-C run-time reference for details. It's really quite easy, and since NKIssue is only in iOS 5 and newer you don't have any backward compatibility issues. Note that you will need to import fo

Re: NSDocument last document loading

2012-07-02 Thread Conrad Shultz
Also, avoid doing any lengthy operation on the main thread/queue. Even if a user opens a file with the intent to analyze, getting stuck for ten minutes is a suboptimal experience. (Sent from my iPhone.) -- Conrad Shultz On Jul 2, 2012, at 12:52, Lee Ann Rucker wrote: > Subclass [NSWin

Re: Write Finder plugin

2012-07-02 Thread Conrad Shultz
AFAIK Dropbox accomplishes this using private APIs and reverse-engineered hacks. I'd love to hear if there's an official method, but if there isn't you won't be able to take this up further on this mailing list. (Sent from my iPhone.) -- Conrad Shultz On Jul 2, 2

Re: NSUndoManager setActionName: oddity

2012-07-02 Thread Conrad Shultz
, but that feels icky. (Do you set the action name or just register undo operations in the model? I don't see why action names would be needed for scripting, but then again I don't really know AppleScript.) (Sent from my iPhone.) -- Conrad Shultz On Jul 2, 2012, at 8:25, Kyle Sluder

Re: NSUndoManager setActionName: oddity

2012-07-02 Thread Conrad Shultz
case. Indeed, if the run loop deferral is the cause of my problem I would probably have figured it out sooner were it not for this mixed behavior. Thoughts on what might be occurring there? (Sent from my iPhone.) -- Conrad Shultz On Jul 2, 2012, at 8:23, Michael Babin wrote: > On Jul 2, 20

NSUndoManager setActionName: oddity

2012-07-02 Thread Conrad Shultz
-setActionName: into the model? 3) Is there perhaps a more appropriate way for me to handle undo/redo in this context? This is on OS X, 10.7.4, FYI. I am targeting Lion. Thanks, Conrad Shultz ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: Binding NSTextField to a number through NSArrayController

2012-06-30 Thread Conrad Shultz
rmatter to the field to handle both display formatting and input validation (e.g. min/max, etc.) (Sent from my iPad.) -- Conrad Shultz On Jun 30, 2012, at 12:00, Todd Heberlein wrote: > I have an NSTextField that I am binding to an NSArrayController's selection > (a number value i

Re: MKMapView: Can't keep annotations from flashing during an update. Ideas?

2012-06-27 Thread Conrad Shultz
You can also structure your annotations in a manner so as to make finding the right annotation(s) to display in a region easy (or, at least, computationally inexpensive). For example, look at quadtrees (e.g. http://blog.notdot.net/2009/11/Damn-Cool-Algorithms-Spatial-indexing-with-Quadtrees-and-Hilbe

Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-23 Thread Conrad Shultz
As Roland indicated, yes, this is a general statement. It would be advisable to read the Error Handling Programming Guide, which includes, among other things: "Important Success or failure is indicated by the return value of the method. Although Cocoa methods that indirectly return error object

Re: Lion permission problems

2012-06-23 Thread Conrad Shultz
.) -- Conrad Shultz On Jun 23, 2012, at 9:17, Matthew Weinstein wrote: > Dear cocoa-dev, > So I'm wondering how in the maze of sandboxed apps how to get my app to work > properly. What it does is wrap around pdf files so that they can be combined, > separated; etc. It doesn'

Re: Proper place to post on 10.8 SDK?

2012-06-11 Thread Conrad Shultz
http://devforums.apple.com You need to be a Mac program member to access the NDA forums, but you presumably are if you have 10.8. (Sent from my iPhone.) -- Conrad Shultz On Jun 11, 2012, at 9:50, livinginlosange...@mac.com wrote: > Where could I post questions regarding the 10.8 SDK?

Re: Moving CALayer and content transition animation

2012-06-07 Thread Conrad Shultz
On 6/7/12 1:12 PM, Markus Spoettl wrote: > On 6/7/12 9:39 PM, Conrad Shultz wrote: >>> Is this to be expected? If so, what is the proper way of handling this? >>> Surely there must be something basic I'm missing again. >>> >>> Thanks for any pointers! &g

Re: Moving CALayer and content transition animation

2012-06-07 Thread Conrad Shultz
et the transition animation on the layer's -presentationLayer instead of on the layer directly? -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin req

Re: Method Call

2012-06-06 Thread Conrad Shultz
motivation is? We might also be able to suggest an alternate approach entirely that would better suit your needs. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Data encryption

2012-06-06 Thread Conrad Shultz
rypto scheme because you will get it wrong. (Sent from my iPhone.) -- Conrad Shultz On Jun 6, 2012, at 9:51, Charlie Dickman <3tothe...@comcast.net> wrote: > Can someone direct me to some documentation on how to do data encryption in > Cocoa/Objective C/C? > > Charlie Dickman

Re: Document Window Ignoring Size Settings

2012-05-30 Thread Conrad Shultz
to change this behavior permanently, take a look at the NSWindow methods documented under "Handling Window Restoration" in the class reference. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev

Re: stringWithFormat / Rendering Text (iOS)

2012-05-24 Thread Conrad Shultz
ite challenging. (Oh, and for text in particular, you also lose important features like text selection that the framework classes provide!) In Cocoa, you should always try to accomplish a task through class composition rather than subclassing (whic

Re: Debugging uiscrollview not responding to user

2012-05-23 Thread Conrad Shultz
t broke it, then do a diff. Not particularly elegant, but often quite fast for tracking these sorts of bugs down. (Both hg and git have a "bisect" feature designed to facilitate this.) -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com

Re: MapKit overlay tip

2012-05-22 Thread Conrad Shultz
referred image format for iOS apps." (Something I hadn't really thought about is that this would suggest different performance for PNGs that are downloaded by an app versus those that are included at build-time. Does anyone know whether there is a

Re: iOS app launching speed

2012-05-15 Thread Conrad Shultz
500 KB." And if you do get fast performance, you run smack into the other problem I described with splash screens (the flash/strobe effect), which you haven't addressed. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Coc

Re: iOS app launching speed

2012-05-15 Thread Conrad Shultz
it doesn't want to block my ability to use the app to the maximum extent possible. 6) If the sync succeeds, I am immediately returned to a table view which has been reloaded with any synced data. If the sync fails (presumably by exceeding some timeout threshold), an aler

Re: iOS app launching speed

2012-05-15 Thread Conrad Shultz
etc.) and use that. Alternatively, create a xib that matches your UI but without any such localized elements, and use a screenshot of that xib. The latter requires maintaining two xibs, though, so I usually just go the Acorn (or Photoshop, or Pixelmator, pick your poison) route. -- Conrad Shul

Re: iOS app launching speed

2012-05-15 Thread Conrad Shultz
Responses below. (Sent from my iPad.) -- Conrad Shultz On May 15, 2012, at 9:48, Alex Zavatone wrote: > Very enlightening Fritz. Thanks. > > One approach I took on purpose was to use a synchronous load of a JSON data > set on startup. > Given your statement below I interpr

Re: First Responder

2012-05-10 Thread Conrad Shultz
ourse acquire first responder status in the usual manner, by user interaction.) -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: Threads and Locking Question

2012-05-10 Thread Conrad Shultz
already compiled) and are looking to do this entirely externally? If so, I see that Ken has already replied with a solution there. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Conrad Shultz
like: - (id)initWithJSONSerializableRepresentation:(NSDictionary *)aDictionary; - (NSDictionary *)JSONSerializableRepresentation; that would convert to/from a serializable object. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Coco

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Conrad Shultz
hat you are planning on using JSON to communicate with a web service, though, you will need to determine what data structure the service is expecting and emit that. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailin

Re: WWDC

2012-04-25 Thread Conrad Shultz
applies to prefixing method names in categories. Doubly so for root classes. For example, in a category on NSObject, instead of writing -performBlock:afterDelay: I opted to use: -SQS_performBlock:afterDelay: (Because of course Apple would *never* add a -performBlock:afterDelay: method.) --

Re: Trouble with code signing and app store submission

2012-03-29 Thread Conrad Shultz
But is the corresponding private key in your keychain? Xcode isn't complaining about your certificates, it's complaining about your key. (Sent from my iPad.) -- Conrad Shultz On Mar 28, 2012, at 23:32, Martin Hewitson wrote: > "" is a valid identity. However,

Re: Can't delete file on device

2012-03-27 Thread Conrad Shultz
are encountering a race condition. It's possible that another thread removed the file in the intervening time between your fileExistsAtPath: and removeItemAtURL: calls. This is a major reason why it's usually not useful to to ask "can I delete a file?" but rather to try "dele

Re: SSL NSURLConnection to fake-cert server?

2012-03-19 Thread Conrad Shultz
that this will cause certs signed by your signing cert to be accepted system-wide. (Sent from my iPhone.) -- Conrad Shultz On Mar 19, 2012, at 22:16, Rick Mann wrote: > I'm connecting to my dev server which has a self-signed cert. When I do this, > NSURLConnectio

Re: Device/Resolution independent positioning of GUI items on iOS

2012-03-19 Thread Conrad Shultz
OS implementation it would greatly simplify certain aspects of design. Auto Layout definitely has a substantial run-time component, so I'm not sure whether existing hardware could handle the load while still guaranteeing performance, but then again the iPad 3 is pretty fast... -- Conrad Shult

Re: Why so many public properties all up in my grizzle?

2012-03-16 Thread Conrad Shultz
otoPropertyCount; j++) { const char *propName = property_getName(protoProperties[j]); NSLog(@"\t%s", propName); } } This and other fun hackery is documented in the Runtime Programming Guide: https://developer.apple.com/library/mac/#documentatio

Re: NSTableView update basics

2012-03-08 Thread Conrad Shultz
This doesn't make sense - it will either return 1 or 0. Hence only 1 row appears. Just return [tableData count]. (Sent from my iPhone.) -- Conrad Shultz On Mar 8, 2012, at 21:42, Erik Stainsby wrote: > - (NSInteger) numberOfRowsInTableView:(NSTableView *)tableView { >return

Re: Finding object array index when iterating through array

2012-03-07 Thread Conrad Shultz
I > have to add a counter? > You could use [array indexOfObjectIdenticalTo:object]. But I'm partial to block-based enumeration, which gives you the index "for free": - (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block; -- Conra

Re: Accessing array in thread safe way

2012-03-07 Thread Conrad Shultz
le types for exactly this reason. It allows you to centralize management of locking/synchronization thus wipe out a whole category of potential bugs. It also allows for, e.g., easier KVO and generally simpler code. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com __

Re: NSURL and NSRegularExpression

2012-03-03 Thread Conrad Shultz
ickly leads us down the reachability/two generals rabbit hole that this list seems doomed to repeat every six months or so. > Honestly, use Data Detectors. Ditto, of course. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-d

Re: NSURL and NSRegularExpression

2012-03-03 Thread Conrad Shultz
quot;). As you can see, this is far from a straightforward problem. I'd jettison this notion entirely and just accept anything that the pertinent RFC(s) tell you to. ` -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-d

Re: NSURL and NSRegularExpression

2012-03-03 Thread Conrad Shultz
Don't do all this. Use NSDataDetector instead. (Sent from my iPhone.) -- Conrad Shultz On Mar 3, 2012, at 16:15, R wrote: > I'm building a twitter app for the iphone and want to detect valid > internet url's and set their character count to <= 20. > > I'm

Re: iOS UI control type terminology/name question

2012-03-03 Thread Conrad Shultz
terfaces" WWDC session, Apple explicitly recommended that such a control not be deployed for usability reasons. As always, YMMV. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Conrad Shultz
o my surprise) does allow you to drag farther and get out of the "snap zone." -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: iPhone search and notification widgets

2012-03-01 Thread Conrad Shultz
/Introduction/Introduction.html) and the user having chosen the appropriate notification modes in Settings.app. (Sent from my iPhone.) -- Conrad Shultz On Mar 1, 2012, at 13:09, Rick Mann wrote: > This may be obvious to some, but I couldn't actually find discussion of it in > the docs, perh

Re: NSTextView and -becomeFirstResponder

2012-02-23 Thread Conrad Shultz
a sledgehammer. How about you approach this in reverse: have the other object observe the text view's window's firstResponder? (Of particular note: "In Mac OS X v10.6 and later, firstResponder is key-value observing compliant.") -- Conrad Shultz Synthetiq S

Re: CGContextSaveGState

2012-02-15 Thread Conrad Shultz
Reference/CGContext/Reference/reference.html -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: Playing Music in Objective C

2012-02-12 Thread Conrad Shultz
The simplest (and therefore least customizable) approach would be to use NSSound. But I think it will do everything you stipulate. See the topical documentation as well: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Sound/Sound.html (Sent from my iPhone.) -- Conrad

Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-08 Thread Conrad Shultz
going to give that a try. That may be helpful, but refrain from just trying things until something works. There is something deeper going on here, and I will almost 100% guarantee you that just setting some things to nil will not fix the problem or, worse, will cover it up. (The only exception,

Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-08 Thread Conrad Shultz
of the view, which I take to mean you have verified that the control's superview is *actually* being deallocated. If you haven't verified that the superview is getting deallocated, you might be tilting at windmills by focusing on the control.) -- Conrad Shultz Synthetiq Solution

Re: Can I somehow encourage the deallocation of a dismissed view controller?

2012-02-08 Thread Conrad Shultz
You didn't specify what sort of crash you are getting. That would be helpful here. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Selected text in NSTextField

2012-01-31 Thread Conrad Shultz
x27;t know whether you can actually get at it to set its initial first responder before it's displayed.) -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: How to get the dispatch queue for the current thread's runloop?

2012-01-27 Thread Conrad Shultz
on this approach (http://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html). -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: ARC and blocks

2012-01-26 Thread Conrad Shultz
On 1/26/12 4:21 PM, Kyle Sluder wrote: > On Thu, Jan 26, 2012 at 2:44 PM, Conrad Shultz > wrote: >> However, __block variables are NOT retained automatically by a block >> during capture, so this breaks the retain cycle. > > __block variables *are* retained under ARC:

Re: ARC and blocks

2012-01-26 Thread Conrad Shultz
omething]; } This lets you use self in a block without retaining it. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: NSOpenPanel problem

2012-01-23 Thread Conrad Shultz
n C structs. > I could serialize and unserialize the string. Or is there a better way? Just use the NSString * right in the block - no need for structs, serialization, or anything. That's why blocks are so useful. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com __

Re: Controlling iOS scrolling

2012-01-09 Thread Conrad Shultz
from my iPhone.) -- Conrad Shultz Synthetiq Solutions On Jan 9, 2012, at 1:09, Ken Tabb wrote: > Morning folks & Happy New Year, > > I've got an iOS app that needs to have a UIScrollView containing a horizontal > row of UIImageViews, all the same size. The UIScrollView w

Re: What are the best macros to use to know when compiling is for Mac OS X v.s. iOS?

2011-12-30 Thread Conrad Shultz
http://developer.apple.com/library/mac/#documentation/developertools/conceptual/cross_development/Using/using.html See the section on "conditionally compiling for different SDKs." (Sent from my iPad.) -- Conrad Shultz On Dec 30, 2011, at 8:44, lbland wrote: > hi- > >

Re: Code error in Your First Mac App tutorial..

2011-12-29 Thread Conrad Shultz
turn the computed average } @end (A real world example of a readwrite property that is not backed by an ivar is UIView's frame on iOS, but that makes for a more complicated discussion... read up on it if interested. :-) -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com _

  1   2   3   4   >