Re: More elegance than a long if/else

2017-03-10 Thread Bryan Vines
Would integer division work better than the modulus operator? batteryIcon.image = UIImage(named:"\(min(10, (Int(_myBatteryLevel) / 10) + 1))") -- Bryan Vines > On Mar 10, 2017, at 9:54 AM, Jeff Kelley wrote: > > I realized after sending that 100 won’t be correct, so you’

Re: What the actual heck?

2014-04-15 Thread Bryan Vines
Lee Ann, Ah, OK. It’s kind of creepy/scary/funny all at the same time. Thanks for the reassurance. — Bryan On Apr 15, 2014, at 11:22 PM, Lee Ann Rucker wrote: > This happened a while back too, IIRC it's bogus and nothing will happen. ___ Cocoa-dev

What the actual heck?

2014-04-15 Thread Bryan Vines
coming from INSIDE THE HOUSE!” Any idea why someone inside Apple wants to pull me off the list? Very confusing. — Bryan Vines ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: NSTask: how to launch a binary as if I launched it via terminal?

2014-04-14 Thread Bryan Vines
Colas, If my previous code snippet doesn’t work with pdflatex, NSTask has a -setEnvironment method; it may allow you to set your task’s environment variables. — Bryan Vines On Apr 14, 2014, at 10:40 AM, Colas wrote: > My problem is that I want to launch pdflatex with the -shell-esc

Re: NSTask: how to launch a binary as if I launched it via terminal?

2014-04-14 Thread Bryan Vines
Colas, Bash’s -c option expects commands in a string which follows. Therefore, this will work: I’m using /usr/bin/touch as an example, rather than your example of pico, which is an interactive text editor. NSTask * myTask = [[NSTask alloc]init]; NSArray * arguments = @[@"-c", @"/us

Re: NSTask: how to launch a binary as if I launched it via terminal?

2014-04-14 Thread Bryan Vines
Colas, Do you want your app to open a Terminal window, in which Pico has opened the file at /Users/colas/myfile.txt? If that’s so, I don’t think launching it via NSTask is going to get you anything. What is the end result you want to achieve? — Bryan Vines On Apr 14, 2014, at 8:59 AM, Colas B

Re: MP4 video playback on Mavericks - Where's a good place to start?

2013-11-12 Thread Bryan Vines
retty straightforward. Thanks again! -- Bryan Vines ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update

MP4 video playback on Mavericks - Where's a good place to start?

2013-11-12 Thread Bryan Vines
hich way I should go, and where to start looking. Thanks! -- Bryan Vines ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.appl

Re: Why IBOutlet don't work under NSTableCellView?

2013-11-08 Thread Bryan Vines
te.) The linked tutorial, below, has helped me a great deal with regard to view-based tableviews. http://gentlebytes.com/blog/2011/08/30/view-based-table-views-in-lion-part-1-of-2/ Hope that helps! -- Bryan Vines On Oct 30, 2013, at 4:49 AM, 周章林 wrote: > Hi, all, > > I

Re: [OT] iTunes 11.1 Beta

2013-09-18 Thread Bryan Vines
I think Apple's just messing with me -- When I download it, I get a 708-byte disk image. Either the compression of disk images has really advanced, or something's wrong. On Sep 18, 2013, at 11:24 AM, Koen van der Drift wrote: > The official version has just been released: > http://www.apple.

Re: Dismissing Open dlog before doc actually opens

2013-08-14 Thread Bryan Vines
Steve, Using Graham's NSRunLoop solution, it looks like you don't even need to send -orderOut to the panel. -- Bryan Vines On Aug 14, 2013, at 11:02 AM, Steve Mills wrote: > On Aug 14, 2013, at 10:52:55, Graham Cox > wrote: > >> [[NSRunLoop mainRunL

Re: Dismissing Open dlog before doc actually opens

2013-08-13 Thread Bryan Vines
ows an alert to let the user know the file has been read. You are welcome to the Xcode project for the app I referenced. It's 36K, zipped. TL;DR: You can set a property to indicate the file is being read, and by observing that property, you'll know when the read has finished. Hope tha

Re: Dismissing Open dlog before doc actually opens

2013-08-12 Thread Bryan Vines
// Log the result. if (fileString) { NSLog(@"Successfully read file: %@", [aFileURL lastPathComponent]); } else { NSLog(@"Could not load file: %@", [aFileURL lastPathComponent]); } } -- Bryan Vines On Aug 12, 2013, at 6:27 PM, "Mills, Steve

Re: full screen

2013-07-17 Thread Bryan Vines
resolution? -- Bryan Vines ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Su

Re: Displaying "Trebuchet MS" font

2013-05-14 Thread Bryan Vines
I think we're going off topic, but I think iTunes uses Helvetica Neue these days. It seems like iTunes is generally the forerunner of changes to come in the OS X GUI. Stuff seems to happen *there* before it happens to the OS at large. -- Bryan Vines On May 13, 2013, at 2:43 PM, Steve