Re: Unwanted Animations

2014-05-25 Thread Alex Zavatone
For the simple part that they are not wanted. Frequently, animations get in the way of the user and help to ruin the user experience. To not be able to disable an unwanted animation, well, that's really bad. I just started using AppCode and though the graphics are meh, the simple ability to ex

NSPopover + Bindings + Validation = Weirdness

2014-05-25 Thread Keary Suska
I am implementing an editing view in a popover, and discovered that validations messages will cause exceptions because AppKit is broken in that regard...anyway so I set "always use application modal alerts" and that seems to work although the API is beeping somewhere after the alert is dismissed

Re: Unwanted Animations

2014-05-25 Thread Gordon Apple
Kyle, if you read my first post, I want the user to be able to show the toolbar if corrections or changes are needed in real-time. This only applies to one window, and only when capturing from the content area of that window. I would prefer that the captured video did not show toolbar animation and

Re: Unwanted Animations

2014-05-25 Thread Kyle Sluder
On May 25, 2014, at 2:09 PM, Gordon Apple wrote: > > Thanks, David. Overriding actionForKey to return nil for ³position² worked. > I also added ³frame² and ³bounds² for resizing. > > Now, any opinions on the toolbar animation? I don¹t see any public API to > kill that in NSToolbar or NSWindow.

Re: Unwanted Animations

2014-05-25 Thread Gordon Apple
Thanks, David. Overriding actionForKey to return nil for ³position² worked. I also added ³frame² and ³bounds² for resizing. Now, any opinions on the toolbar animation? I don¹t see any public API to kill that in NSToolbar or NSWindow. On 5/24/14 3:29 PM, "David Duncan" wrote: > > On May 24, 20

Re: Understanding ARC

2014-05-25 Thread Charles Srstka
On May 25, 2014, at 11:38 AM, Jens Alfke wrote: > On May 24, 2014, at 11:34 PM, Charles Srstka wrote: > >> This isn't strictly true; when you are returning objects by reference, doing >> so inside the @autoreleasepool will cause a crash. For example: > > That’s a different scenario than the o

Re: string literals and performance

2014-05-25 Thread Jens Alfke
On May 25, 2014, at 3:18 AM, 2551 <2551p...@gmail.com> wrote: > That's what I understood from the stackexchange discussion I linked to. As I > said, those issues aren't relevant in this case, so I was wondering if there > were others. From the replies thus far, it seems not, and I'm inclined to

Re: NSURL from non-url NSString

2014-05-25 Thread Jens Alfke
On May 25, 2014, at 8:05 AM, Koen van der Drift wrote: > However, I noticed that strings that have the form P12345 also turn blue. > Any idea why that string would turn into an NSURL? The url scheme is nil, > and the path components just show P12345. It’s a relative URL — just a single p

Re: Understanding ARC

2014-05-25 Thread Jens Alfke
On May 25, 2014, at 2:07 AM, Jamie Ojomoh wrote: > So if I use alloc/init then autoreleasepool doesn't work? No, I meant that the string hasn’t been autoreleased at all yet, so the pool isn’t going to release it when it exits. The pool “works”, it’s just not necessary. > Or don't I need auto

Re: Understanding ARC

2014-05-25 Thread Jens Alfke
On May 24, 2014, at 11:34 PM, Charles Srstka wrote: > This isn't strictly true; when you are returning objects by reference, doing > so inside the @autoreleasepool will cause a crash. For example: That’s a different scenario than the one the OP was asking about; stuffing a reference into the

Re: NSURL from non-url NSString

2014-05-25 Thread Koen van der Drift
Alright, thanks all, I'll have a look at NSDataDetectors. Happy Sunday, - Koen. On May 25, 2014, at 11:29 AM, Mike Abdullah wrote: > > On 25 May 2014, at 16:05, Koen van der Drift > wrote: > >> Hi, >> >> At one point in my code I need to recognize an URL to show in a different >> color.

Re: NSURL from non-url NSString

2014-05-25 Thread Mike Abdullah
On 25 May 2014, at 16:05, Koen van der Drift wrote: > Hi, > > At one point in my code I need to recognize an URL to show in a different > color. Pretty standard: > >NSURL *url = [NSURL URLWithString: aString]; > >if (url) // if url is created change color >{ >NSAttribute

Re: NSURL from non-url NSString

2014-05-25 Thread Ken Thomases
On May 25, 2014, at 10:05 AM, Koen van der Drift wrote: > At one point in my code I need to recognize an URL to show in a different > color. Pretty standard: > >NSURL *url = [NSURL URLWithString: aString]; > >if (url) // if url is created change color > Works great, if aString starts

Re: NSURL from non-url NSString

2014-05-25 Thread Uli Kusterer
On 25 May 2014, at 08:20, Koen van der Drift wrote: > I haven't figured that out yet, hence my question, maybe someone would > recognize it. But so far I've seen it it for single word strings that begin > with a letter, followed some numbers and letters. Off the top of my head, I’d not have e

Re: NSURL from non-url NSString

2014-05-25 Thread Koen van der Drift
I haven't figured that out yet, hence my question, maybe someone would recognize it. But so far I've seen it it for single word strings that begin with a letter, followed some numbers and letters. - Koen. On May 25, 2014, at 11:11 AM, Uli Kusterer wrote: > On 25 May 2014, at 08:05, Koen van

Re: NSURL from non-url NSString

2014-05-25 Thread Uli Kusterer
On 25 May 2014, at 08:05, Koen van der Drift wrote: > However, I noticed that strings that have the form P12345 also turn blue. > Any idea why that string would turn into an NSURL? The url scheme is nil, > and the path components just show P12345. What is “the form P12345”? What’s the comm

NSURL from non-url NSString

2014-05-25 Thread Koen van der Drift
Hi, At one point in my code I need to recognize an URL to show in a different color. Pretty standard: NSURL *url = [NSURL URLWithString: aString]; if (url) // if url is created change color { NSAttributedString *linkString = [[NSAttributedString alloc] initWithString:

Re: string literals and performance

2014-05-25 Thread 2551
> On 25 May 2014, at 15:11, Gary L. Wade wrote: > The performance benefit for choosing the first style over the second style > comes in if you need to debug your app or change the contents of a string > literal. That's what I understood from the stackexchange discussion I linked to. As I said,

Re: Understanding ARC

2014-05-25 Thread Jamie Ojomoh
Thank you for all your helps. >>You allocated returnString using an alloc/init sequence so it’s not in an autorelease pool at all. So if I use alloc/init then autoreleasepool doesn't work? If thats so, how do I use NSMutableString? I can use NSString without alloc/init, but Mutable always requi

Re: string literals and performance

2014-05-25 Thread Gary L. Wade
The performance benefit for choosing the first style over the second style comes in if you need to debug your app or change the contents of a string literal. If you hard code the same string everywhere you use it, as with the second case, you are either going to copy/paste or type it all over a