time of the build

2015-04-29 Thread Torsten Curdt
I would like to embed the timestamp of the build into my executable. I know there is __DATE__ and __TIME__ but converting those into a timestamp at runtime isn't ideal. So I guess I somehow need to make the output of date +%s available to the preprocessor. But user defines allow only static

Where and how do I know a save completed successfully?

2015-04-29 Thread Charles Jenkins
I realized yesterday that my app doesn’t mark its data structures as clean (saved) after a save operation, and I’m trying to find the right place to do that. My NSDocument subclass implements saveToURL and fileWrapperOfType. Intuitively I thought I could probably mark things as saved at the

Re: Cocoa window stops responding

2015-04-29 Thread Ken Thomases
On Apr 29, 2015, at 12:38 AM, Nisar Ahmed nisar@gmail.com wrote: I think I have found the culprit, I have subclassed NSOpenGLView where in drawRect, I am rendering a IOSurface based texture using CVDisplayLink, although I don't know why it is causing the screen to freeze but when I moved

Re: time of the build

2015-04-29 Thread Damian Carrillo
I have exposed build-time information to an application in the past. The approach I chose leveraged a Run Script build phase that overwrote the contents of a plist or a header file (I’ve used both). I created the initial file and added it to git. Then, I ended up assuming that changes to the

Re: Where and how do I know a save completed successfully?

2015-04-29 Thread Michael Crawford
1. The compiler crash should never happen, obviously, so that's a bug report. To be more clear - it doesn't matter how screwed up your source could possibly be, the compiler must never crash. If it does, then it's a bug in the compiler. It's quite likely that a slightly more subtle problem in

Re: Where and how do I know a save completed successfully?

2015-04-29 Thread Quincey Morris
On Apr 29, 2015, at 02:08 , Charles Jenkins cejw...@gmail.com wrote: override func saveToURL( url:NSURL, ofType typeName:String, forSaveOperation saveOperation: NSSaveOperationType, completionHandler:(NSError!) - Void ) { // snip Here I prepare my data

Re: Where and how do I know a save completed successfully?

2015-04-29 Thread Charles Jenkins
Thank you, Uli and everyone. I’ll check out updateChangeCount: I did file a bug report about the compiler crash caused by my syntax. —  Charles On April 29, 2015 at 10:19:22 AM, Uli Kusterer (witness.of.teacht...@gmx.net) wrote: On ٢٩‏/٠٤‏/٢٠١٥, at ١١:٠٨, Charles Jenkins cejw...@gmail.com

Re: New information. Was: Re: Weird UITableView problem

2015-04-29 Thread Uli Kusterer
On ٢٨‏/٠٤‏/٢٠١٥, at ١٩:٥٧, William Squires wsqui...@satx.rr.com wrote: If I select iPhone Retina (4-inch) (again in the Xcode 5 project), I no longer get all 20 cells, and - in fact - the last cell visible, Dwalin, is cut off so you can't see all of the cell, even with the (table) view

Re: Where and how do I know a save completed successfully?

2015-04-29 Thread Uli Kusterer
On ٢٩‏/٠٤‏/٢٠١٥, at ١١:٠٨, Charles Jenkins cejw...@gmail.com wrote: I think it most likely I’m doing this in the wrong place. But what’s the right place? Overriding NSDocument’s setFileModificationDate() would seem like the best way, but the NSDocument Programming guide says messages are

Re: time of the build

2015-04-29 Thread David Durkee
I’m not concerned with the time, but I get the build date as an NSDate with this method: - (NSDate*) buildDate { NSString* dateStr = [NSString stringWithUTF8String: __DATE__]; NSDateFormatter* dater = [[NSDateFormatter alloc] init]; NSLocale *enUSPOSIXLocale = [[NSLocale alloc]

Re: time of the build

2015-04-29 Thread Daniel Pasco
This is pretty much the same technique I've used to embed build information in the app settings bundle. -Daniel On Apr 29, 2015, at 6:04 AM, Damian Carrillo damiancarri...@me.com wrote: I have exposed build-time information to an application in the past. The approach I chose leveraged a

Re: time of the build

2015-04-29 Thread Torsten Curdt
Thanks for the code. It's what I meant with converting those into a timestamp at runtime isn't ideal though. Having the explicit __DATE__ in the binary as string makes it a little bit too easy to change. I would like to use it for expiring beta releases. cheers, Torsten On Wed, Apr 29, 2015

Issues with implementing WYWIWYG font menu

2015-04-29 Thread David Durkee
I’m creating a WYSIWYG font menu using a custom view in each NSMenuItem to draw the name of the font in its own font. One problem I am having with it is that the first item under the mouse when it pops up is drawn highlighted, but when I move the mouse to the next item, the first one is not

Spinning the busy indicator

2015-04-29 Thread Graham Cox
I have added a NSProgressIndicator to my UI with the circular “busy” style. It’s set to not display when stopped, and I simply start it using -startAnimation: and stop it using -stopAnimation: The indicator shows and hides correctly, but most of the time it doesn’t actually spin. It does

Re: Spinning the busy indicator

2015-04-29 Thread Graham Cox
On 30 Apr 2015, at 11:22 am, Graham Cox graham@bigpond.com wrote: My guess is that the busy indicator is animated by a low-priority thread of its own, and the work being done by my queue has a higher priority so the animation thread never gets any time. Does that sound like a

Re: Issues with implementing WYWIWYG font menu

2015-04-29 Thread Graham Cox
On 30 Apr 2015, at 6:33 am, David Durkee da...@dwdurkee.com wrote: using a custom view in each NSMenuItem to draw the name of the font in its own font This isn’t really necessary - you can just set an attributed title on a standard menu item and it will draw in the Font given in the

Re: time of the build

2015-04-29 Thread Jens Alfke
On Apr 29, 2015, at 7:51 AM, Torsten Curdt tcu...@vafer.org wrote: Having the explicit __DATE__ in the binary as string makes it a little bit too easy to change. If someone’s determined enough to patch the binary, there’s nothing you can do about it. No matter how carefully you encode/hide

Re: Spinning the busy indicator

2015-04-29 Thread Quincey Morris
On Apr 29, 2015, at 18:22 , Graham Cox graham@bigpond.com wrote: The indicator shows and hides correctly, but most of the time it doesn’t actually spin. It does sometimes, but mostly it doesn’t. I’m wondering if there’s something I need to do to keep it going that I’m not doing (I’m not

Re: Issues with implementing WYWIWYG font menu

2015-04-29 Thread David Durkee
Oh, wow, I looked all over for something like that. Thanks, I'll try that tomorrow. -David On Apr 29, 2015, at 9:44 PM, Graham Cox graham@bigpond.com wrote: On 30 Apr 2015, at 6:33 am, David Durkee da...@dwdurkee.com wrote: using a custom view in each NSMenuItem to draw the name

Re: Issues with implementing WYWIWYG font menu

2015-04-29 Thread Steve Mills
On Apr 29, 2015, at 21:44:01, Graham Cox graham@bigpond.com wrote: On 30 Apr 2015, at 6:33 am, David Durkee da...@dwdurkee.com wrote: using a custom view in each NSMenuItem to draw the name of the font in its own font This isn’t really necessary - you can just set an attributed

Re: time of the build

2015-04-29 Thread Raglan T. Tiger
I run this script in the Run Script of the Build Phase: infoplist=$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH builddate=`date` if [[ -n $builddate ]]; then defaults write ${infoplist%.plist} BuildDate ${builddate} fi -rags ___ Cocoa-dev mailing list