How to include UIColor picker in code-completion in Swift playgroundbook

2018-02-13 Thread John Michael Zorko
Hello, all … A friend and I are creating a playgroundbook that allows users to write code to control, among other things, the color of an external device. We would like to use the UIColor picker box in the code-completion bar above the keyboard, but so far, the only way we know how to include

xcodebuild and PMD

2015-11-26 Thread John Michael Zorko
Hello, all … I’m exploring how to plug our iOS builds into our existing PMD-based code sniffing tool. We’re using Xcode 7.1.1. Is there a way that I can process xcodebuild’s output (or hook into the Xcode analyzer output) into a PMD XML file? I’m aware of OCLint, but we also have some Swift

Re: xcodebuild and PMD

2015-11-26 Thread John Michael Zorko
> On Nov 26, 2015, at 12:21 PM, Alex Zavatone wrote: > > What’s PMD? https://pmd.github.io ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

iOS:targeting iOS3 through iOS6

2012-09-21 Thread John Michael Zorko
Hello, all … The iPhone5 and iOS6 is out now, so a client wants me to update the apps i've done for them. The thing is, they still have users on first-generation devices and iPhone 3Gs, so I need to make sure the apps still work there, while also taking advantage of the larger display of the

Xcode 4.3, XIB files and deployment target iOS 3.1

2012-07-06 Thread John Michael Zorko
Hello, all ... I'm working on an app that has to work on first-gen iPod touch devices. I set the deployment target to 3.1 and made sure armv6 was specified such that my app now at least launches on said firstgen iPod touch. However, it hangs before showing the tab bar or first view

iOS 5: iPod Library Access

2012-04-12 Thread John Michael Zorko
Hello, all ... I'm trying to navigate the artists / albums / genres / etc. on a device. The documentation for this is usually easy to follow, but i'm finding it to be confusing regarding the concept of persistent IDs. I've a couple of questions: 1. What does and what does not have an

iOS 5: iPod Library Access, pt 2

2012-04-12 Thread John Michael Zorko
Hello all, Is an _artist_ an MPMediaItemCollection of albums, or an MPMediaItem / Entity? If the later, how do I get it's MPMediaItemPropertyPersistentID? Is an _album_ an MPMediaItemCollection of songs, or an MPMediaItem / Entity? If the later, how do I get it's

iOS 5: AVFoundation and MPMediaItemPropertyAssetURL

2012-04-05 Thread John Michael Zorko
Hello, all ... I'm experimenting with making AVFoundation play local [purchased from] iTunes content on the device. I can set up an MPMediaQuery to fetch the content like so: MPMediaQuery *query = [[[MPMediaQuery alloc] init] autorelease]; [query

iOS: This application needs location services / Allow / Don't Allow alert

2012-02-01 Thread John Michael Zorko
Hello, all ... I've an issue that i'm trying to solve, and i've run into several walls. This app i'm working on requires Core Location, and on first install, iOS displays it's this app needs location services / Allow / Don't Allow alert. That's fine, but the issue is that my app's window's

Re: iOS: This application needs location services / Allow / Don't Allow alert

2012-02-01 Thread John Michael Zorko
Anderson wrote: On 1 Feb 2012, at 2:09 AM, John Michael Zorko wrote: This app requires location services -- the client does not want the app to perform it is function if it detects that it's somewhere it's not supposed to be. Is it possible for the app to somehow detect when the iOS

iOS4: AVFoundation, determining video aspect ratio and orientation

2011-10-13 Thread John Michael Zorko
Hello, all ... I'm developing a video recording / playback app for a client. It works, but when playing back the video from the internet, I want to get information regarding the aspect ratio and orientation of the video i.e. if it was recorded when the device was in portrait or

iOS4: glReadPixels() to CMSampleBufferRef for video?

2011-07-25 Thread John Michael Zorko
Hello, all ... While all of this discussion on Xcode 4 is interesting (please, Apple, make multiple-window development work again), i've an issue that i'm hoping someone could help with. I'm recording audio and video using AVFoundation, and i'm applying a GPU shader to the incoming video

iOS: AVFoundation, creating sample buffers for an AVAssetWriter from OpenGL ... so confused :-/

2011-07-14 Thread John Michael Zorko
Hello, all ... I'm trying to create a sample buffer from an OpenGL view using glReadPixels(), so I can write the sample buffer with an AVAssetWriter I set up. I'm recording audio and video, and i'm really quite confused as to how to do this. So far, i'm recording audio and video straight from

iOS: AVFoundation, AVAssetWriter and caching

2011-07-05 Thread John Michael Zorko
Hello, all ... I'm interested in caching a movie as I play it from the internet, so that the next time the user asks for the movie, it can play it from the device filesystem. I'm thinking capturing frames and audio and using an AVAssetWriter like I would when recording from the camera, but

iOS 4.3: AVAsset loadValuesAsynchronouslyForKeys not calling completion handler?

2011-05-02 Thread John Michael Zorko
Hello, all ... Sometimes loadValuesAsynchronouslyForKeys doesn't call it's completion handler, i'm thinking possibly due to some network error. It will just hang there, and the completion handler block is never executed. My question is: how can I trap this? Regards, John

video analog to MPMediaItemCollection?

2011-04-20 Thread John Michael Zorko
Hello, all ... I can access the iOS device's iPod library with MPMediaItemCollection, but I don't see a way to access the video library on the device. Does an API for this exist? Regards, John ___ Cocoa-dev mailing list

iOS 4: more AVAsset questions

2011-04-17 Thread John Michael Zorko
Hello, all ... I've more questions regarding AVAsset: 1. I see AVAsset and AVURLAsset. Is there a subclass that allows me to create an asset from a bytestream? I'm finding that AVURLAsset is a bit too high level for what I need to do (that being, create an asset for a stream of bytes coming

How do I disable Xcode 4's SVN support?

2011-04-17 Thread John Michael Zorko
Hello, all ... I run my own SVN server, and I do my own SVN management. I would greatly prefer that Xcode 4 not even try to talk to my SVN server, as it keeps asking me to allow access to that key in my keychain, over and over and over and over again. How can I disable Xcode 4's SVN support

AVFoundation and OpenGL?

2011-04-10 Thread John Michael Zorko
Hello, all ... I've been playing with Core Animation and AVFoundation to get some interesting results. I've a question, though, with regards to AVFoundation and OpenGL: Can I make OpenGL work with AVPlayerLayer? Regards, John ___ Cocoa-dev

AVAssetImageGenerator and HTTP-Live streams

2011-04-10 Thread John Michael Zorko
Hello again ... I've found that when I use AVAssetImageGenerator to try to create a thumbnail from an HTTP-Live video stream, it fails, yet it works for basic M4V streams. I suspect that the multiple-bitrate nature of HTTP-Live is messing with it. I suppose I can parse the M3U8 myself and

blocks and NSInvocation question

2011-04-10 Thread John Michael Zorko
Hello, all ... I'm stumped as to why this generates a warning when I compile. Do I need to do something special with my AVURLAsset * to be able to access it from inside the block in order to add it to an NSInvocation? for (int index = 0; index [assetsToLoad count]; index ++) {

AVFoundation and YouTube?

2011-04-05 Thread John Michael Zorko
Hello, all ... I've used AVFoundation / AVAsset / AVPlayer / etc. to play both M3U8 and M4V content on iOS 4.3.1. I'd also like to use it to play YouTube content (so I can do animation / scaling stuff on the AVPlayerLayer). I've a couple of questions: 1. Is this possible with the

iOS4: remote / headset events and the remote control display

2010-08-05 Thread John Michael Zorko
Hello, all ... My iOS4 application plays audio, runs in the background and receives remote control events. All of this works, but the one thing that sometimes doesn't is the updating of the pause / play state on the remote control display. In other words, i'll tell my app to play, put it in

iOS: CFReadStreamCreateWithFile non-exclusive file access?

2010-06-29 Thread John Michael Zorko
Hello, all ... I'm trying to implement a progressive download / cache using CFReadStreamCreateWithFile() to open a file URL that another thread is writing to. Basically, I have one thread with an NSURLConnection downloading a URL, and it's didReceiveData writes the data to the file via an

Re: iOS4: CFReadStream and background operation

2010-06-23 Thread John Michael Zorko
Jens, 2. However, CFReadStreams created _while_ the app was in the background often (though not always) _don't_ call their callbacks _until_ the app is brought in the foreground, then all of a sudden the callback happens. I think foreground/background is a red herring — that has almost

Re: iOS4: CFReadStream and background operation

2010-06-23 Thread John Michael Zorko
Jens, 2. However, CFReadStreams created _while_ the app was in the background often (though not always) _don't_ call their callbacks _until_ the app is brought in the foreground, then all of a sudden the callback happens. I think foreground/background is a red herring — that has almost

iOS4: CFReadStream and background operation

2010-06-22 Thread John Michael Zorko
Hello, all ... I've an app that reads from the network using CFReadStream (it needs to use CFReadStream so that it can throttle the connection and specify how many bytes to read each time). What i'm finding is that CFReadStream callbacks aren't always called when the app is in the background.

[iPhone 3.1] Core Animation that leaves a trial?

2010-02-25 Thread John Michael Zorko
Hello, all ... I'm interested in having a CAKeyframeAnimation leave a trail i.e. imagine the image of a pencil being animated across the screen -- I want to draw a path of where the pencil has been along with the animated pencil. However, i'm not sure how to do this, since Core Animation is

[iPhone 3.1] navigationItem.backBarButtonItem weirdness

2010-02-10 Thread John Michael Zorko
Hello, all ... I've a question about the UINavigationController backBarButtonItem property. I wanted to merely set my own image for the back button, instead of it using the title of the controller above in the hierarchy. So, this is what I did (yes this app is using Three20, but I don't

Re: [iPhone 3.1] navigationItem.backBarButtonItem weirdness

2010-02-10 Thread John Michael Zorko
Peter, Yeah, but I get no NSException when I press the back button -- it does what it's always done (which I want). Also, I added the colon and it still doesn't even try to call my selector. In short, it works -- but i'm not sure _why_ it works. Regards, John your selector is missing

[iPhone 3.1] NSInvocation on main thread?

2010-02-10 Thread John Michael Zorko
Hello, all ... I'm using NSInvocation so I can pass multiple arguments to delegate methods. However, I also want these delegate methods to get called on the main thread. Is there a way that I can use NSInvocation to call the method it wraps on the main thread, like

iPhone:NSURLConnection and keep-alive

2010-01-20 Thread John Michael Zorko
Hello, all ... Is it possible to specify (and hence, re-use) a persistent connection with NSURLConnection? I want to issue new GET requests without having to re-establish the connection to the server. If so, would anyone point me at an example? Regards, John

iPhone: @protocol and @optional

2010-01-05 Thread John Michael Zorko
Hello, all ... After [re-]reading the Apple documentation, i'm still not clear as to what @optional really does in a @protocol. I thought that declaring certain messages as @optional would make the app not crash if a certain message didn't have an implementation in a class that adopts the

Re: iPhone: @protocol and @optional

2010-01-05 Thread John Michael Zorko
Mike et al, OK, I get it -- @optional in a @protocol is kind of like #pragma warning: in (MS) C++ in that it just tells the compiler to not generate specific warnings, in this case warnings about a class that doesn't fully implement the protocol. I thought it would automatically call

Re: iPhone: load cell from XIB slows down tableview?

2010-01-04 Thread John Michael Zorko
Tony, Have you verified that you've set the Identifier for the custom cell in the XIB to match the above cellID? If they don't match, you'll end up loading the XIB for every row in the table view. If things are set up properly, the XIB will be loaded once for each visible row on the

iPhone: load cell from XIB slows down tableview?

2010-01-03 Thread John Michael Zorko
Hello, all ... I'm trying to determine why my tableviews scroll so jerkily on non-3GS devices. The datasource only has perhaps 170 records, so I think it may have something to do with how i'm instantiating the cells in -tableView:cellForRowAtIndexPath. In other apps i've done, I create the

simple NSRunLoop question

2009-12-02 Thread John Michael Zorko
Hello, all ... i've done some googling, and read documentation for NSRunLoop and NSThread, but there's something I don't know: How do I get the run loop of a specific NSThread? Something like: [streamerThread getCurrentRunLoop]; ?? Regards, John

iPhone: how to tell if a UIScrollView is scrolling?

2009-11-10 Thread John Michael Zorko
Hello, all ... After making the NSOperation and view tag changes, my app is scrolling a large table view with hundreds of images much better. However, there is still some jerkiness, caused by the fact that when the NSOperation calls the refresh (image update) method, it has to call it on

questions on memory issues

2009-11-10 Thread John Michael Zorko
Hello, all ... Firstly, I very much appreciate the help i've received here -- thank you very much :-) I've a debugging question. I've an issue that manifests as what appears to be a dangling pointer. I've a view that is loaded, and all is fine. This is OS 2.2.1. My understanding is that

Re: iPhone: NSOperation and UITableVIews

2009-11-09 Thread John Michael Zorko
Dave, Alex ... An alternative implementation might be to have each cell queue up an operation when it needs to load an image (not the view controller). Then, each cell could cancel it's operation in [UITableViewCell prepareForReuse]. Cool -- I learned something today :-) I did this,

iPhone: NSOperation and UITableVIews

2009-11-08 Thread John Michael Zorko
Hello, all ... I have an indexed table view with -- surprise -- images that take a long time to load. So, I put the loading into an NSOperation-derived subclass and have the main() method send a refresh msg to my main thread, telling it to reload the table. This works, but the problem

[iPhone 3.0] -- UIImage imageFromContentsOfFile and animations

2009-08-13 Thread John Michael Zorko
Hello, all ... The source of my problem seems to be using UIImage -imageNamed to load my array of PNGs to be animated, since imageNamed caches the data in case I ask for it again. However, though replacing imageNamed with imageFromContentsOfFile works wherever I set a UIImageView's

[iPhone 3.0] how to find an image leak using Instruments?

2009-08-12 Thread John Michael Zorko
Hello, all ... I've an an iPhone app that runs swimmingly on my devices, but shows display glitches on others testing it. I suspect it's an image leak of some sort (this code uses a _lot_ of images, animations, etc). When I run Instruments, though, the leaks tool doesn't seem to point

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread John Michael Zorko
{ self.animationView.animationImages = nil; } - (void)stopAnimations { [self.animationView stopAnimating]; } On Aug 8, 2009, at 10:24 PM, Kyle Sluder wrote: On Aug 8, 2009, at 8:14 PM, John Michael Zorko jmzo...@mac.com wrote: My question -- what is the correct way to release the UIImageView's animatedImages

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread John Michael Zorko
Kyle et al, BTW, the issue I see is the infamous program exited with signal:0 error, with no backtrace. On Aug 8, 2009, at 10:24 PM, Kyle Sluder wrote: On Aug 8, 2009, at 8:14 PM, John Michael Zorko jmzo...@mac.com wrote: My question -- what is the correct way to release

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread John Michael Zorko
, 2009, at 10:24 PM, Kyle Sluder wrote: On Aug 8, 2009, at 8:14 PM, John Michael Zorko jmzo...@mac.com wrote: My question -- what is the correct way to release the UIImageView's animatedImages array? I assign an NSMutableArray to it, play the animation, then set the UIImageView's

[iPhone 3.0] UIImage startAnimating -- how to tell when it's finished?

2009-08-08 Thread John Michael Zorko
Hello, all ... I load a UIImageView with an array of PNG images, and call startAnimating -- this works very well. However, I need to know when the animation is done, because I need to have a thread load the next animation. Unfortunately UIImageView doesn't implement the

[iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-08 Thread John Michael Zorko
Hello, all ... I'm running a little test right now on my iPod Touch, where i'm loading a flip animation (49 PNGs), playing it and unloading it every 10 seconds. I see what appears to be a memory leak in Instruments, though -- perhaps 2K every time I play an animation. My question --

iPhone: getting the pixel data from a PNG file

2009-07-23 Thread John Michael Zorko
Hello, all ... I need to be able to make an iPhone app read a PNG file and retrieve the values of its' pixels. I know that libPNG can do this, but my questions are: 1. does libPNG already exist on the iPhone, or do I need to compile it as a .a and link with it? 2. are there Cocoa Touch

CFHTTP +authentication

2009-01-25 Thread John Michael Zorko
Hello, all ... I guess this is more of a Core Foundation question, but it still seemed more apropos to this list than Carbon-dev. Please let me know if i'm wrong :-) I'm trying to handle URLs in this format: http://user:password@this.url.com/content ... with the user and password

NSTableView horiz scrollbar doesn't take into account last table column

2008-12-23 Thread John Michael Zorko
Hello, all ... I'm on 10.5.5, and i've code that shows a table with two columns. In IB, vert and horiz scrollbars are enabled, but when the applications runs, the horiz scroller only appears when I size the window such that the first table column is partially shown. The horiz scroller

proper way to release a static NSMutableDictionary?

2008-12-15 Thread John Michael Zorko
Hello, all ... Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMutableDictionary new]; ... it will obviously be faster than coding a for loop and

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread John Michael Zorko
Ashley, Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMutableDictionary new]; ... it will obviously be faster than coding a for loop and removing

Re: brain-dead NSThread question ...

2008-09-14 Thread John Michael Zorko
Julien et al, sleep() is just blocking the thread, so no event is processed. Use run loops instead. Try to replace sleep() with [[NSRunLoop currentRunLoop] runMode:beforeDate:] You mean the NSURLConnection callbacks are not callbacks in the C / C+ + sense i.e. they're more like

brain-dead NSThread question ...

2008-09-14 Thread John Michael Zorko
Hello, all ... I'm trying to launch a thread to connect to a server and stream some data. What i'm seeing is that, while my thread launches, the NSURLConnection callbacks are never called, and it's probably some silly thing i'm not understanding about ObjC / Cocoa (being an old C / C++

new to Cocoa -- threading question

2008-09-06 Thread John Michael Zorko
Hello, all ... I'm new to Cocoa, and i'm trying to launch a thread. Yet, the app bombs when I try, and the console says it's because the selector isn't implemented: 2008-09-06 18:23:30.919 XXX[2363:20b] SEL: playMP3StreamThread 2008-09-06 18:23:30.927 XXX[2363:20b] *** Terminating app

Re: new to Cocoa -- threading question

2008-09-06 Thread John Michael Zorko
Kyle, [NSThread detachNewThreadSelector:@selector(playMP3StreamThread) toTarget:self withObject:streamToPlay]; The selector you want is playMP3StreamThread:, not playMP3StreamThread. That colon is very important. Ah, yes -- the colon. I couldn't live without mine ;-) *cymbal

Re: Cocoa-dev Digest, Vol 5, Issue 1446

2008-08-12 Thread John Michael Zorko
Pagtrick, I have a number of projects that require communication with a server using SOAP. Over the last couple of years I've been able to make this work on Mac OS X by leveraging WebServicesCore API, wrapped in Objective-C. Now I find myself having to deploy to a platform where not