|
How to configure NumberFormatter in Xcode
macOS 12.6, Xcode Version 9.1 (9B55).
I added a NumberFormatter (Decimal) to some TextField. This now shows: “12.345”.
Not bad, but I want to see: “12.3”.
NSNumberFormatter has a property:
macOS 12.6, Xcode Version 9.1 (9B55).
I added a NumberFormatter (Decimal) to some TextField. This now shows: “12.345”.
Not bad, but I want to see: “12.3”.
NSNumberFormatter has a property:
|
By
Gerriet M. Denkmann
·
#404
·
|
|
Re: Add overflow indicator to text
Thanks for the input, everyone. I mentioned that exclusionPaths are used, so the text flows inside arbitrary shapes, mostly comic book balloon type blobs. As such, there's rarely a straight bottom
Thanks for the input, everyone. I mentioned that exclusionPaths are used, so the text flows inside arbitrary shapes, mostly comic book balloon type blobs. As such, there's rarely a straight bottom
|
By
Steve Mills
·
#403
·
|
|
Re: Add overflow indicator to text
This is what we do in a drawing app, which works well for us. When the text box is selected, it shows the + symbol as part of the frame. If not selected that’s not visible, so the text itself
This is what we do in a drawing app, which works well for us. When the text box is selected, it shows the + symbol as part of the frame. If not selected that’s not visible, so the text itself
|
By
Graham Cox
·
#402
·
|
|
Re: Add overflow indicator to text
Quincy, your observation reminds me of how Quark Xpress handled this in circa 1989. It was a surprisingly nice indicator that “there is more to this text box”. I think they may have put a small
Quincy, your observation reminds me of how Quark Xpress handled this in circa 1989. It was a surprisingly nice indicator that “there is more to this text box”. I think they may have put a small
|
By
Alex Zavatone
·
#401
·
|
|
Re: Cancelling dispatch_after?
Yes, that sounds correct. I was thinking that there was a problem for the original caller (the one in whose stack frame the block resides), because the block might have moved after the call returns.
Yes, that sounds correct. I was thinking that there was a problem for the original caller (the one in whose stack frame the block resides), because the block might have moved after the call returns.
|
By
Quincey Morris
·
#400
·
|
|
Re: Add overflow indicator to text
In text layout apps that I’ve used, which can flow text through multiple containers, there’s typically a small box outside the top-left and bottom-right corners of the container frame. The boxes
In text layout apps that I’ve used, which can flow text through multiple containers, there’s typically a small box outside the top-left and bottom-right corners of the container frame. The boxes
|
By
Quincey Morris
·
#399
·
|
|
Add overflow indicator to text
I'm using NSTextContainer with exclusionPaths, NSLayoutManager, and UITextView for rendering text into balloons, and the user can control the font size. When overflow occurs, I'd like to show an
I'm using NSTextContainer with exclusionPaths, NSLayoutManager, and UITextView for rendering text into balloons, and the user can control the font size. When overflow occurs, I'd like to show an
|
By
Steve Mills
·
#398
·
|
|
Re: Cancelling dispatch_after?
No, because then blocks would always be copied to the heap, even in common cases where they don’t escape, like calling NSDictionary’s -enumerateKeysAndValues: method. That would make these a lot
No, because then blocks would always be copied to the heap, even in common cases where they don’t escape, like calling NSDictionary’s -enumerateKeysAndValues: method. That would make these a lot
|
By
Jens Alfke
·
#397
·
|
|
Re: Cancelling dispatch_after?
I think that should be an “or”: if you assign it to a non-local variable *or* pass it as a parameter. That’s because the block is implicitly moved to the heap (which is what a copy does) if the
I think that should be an “or”: if you assign it to a non-local variable *or* pass it as a parameter. That’s because the block is implicitly moved to the heap (which is what a copy does) if the
|
By
Quincey Morris
·
#396
·
|
|
Re: Cancelling dispatch_after?
I think ARC copies the block automatically if you assign it to a variable instead of just having it as a parameter of a function/method call. (A block really only gets copied once; it’s more like
I think ARC copies the block automatically if you assign it to a variable instead of just having it as a parameter of a function/method call. (A block really only gets copied once; it’s more like
|
By
Jens Alfke
·
#395
·
|
|
Re: Cancelling dispatch_after?
Makes sense, but there’s a bit of a problem.
To do that I’m going to have to create the block and keep a reference to it. That doesn’t seem to be how the GCD dispatch code snippet works - it
Makes sense, but there’s a bit of a problem.
To do that I’m going to have to create the block and keep a reference to it. That doesn’t seem to be how the GCD dispatch code snippet works - it
|
By
Graham Cox
·
#394
·
|
|
Re: Opening File in Finder
Oops, sorry, that was weird. Mail sent that message when I just closed the window, which wasn’t what I intended to happen.
I was in the process of composing an extremely witty response, but it
Oops, sorry, that was weird. Mail sent that message when I just closed the window, which wasn’t what I intended to happen.
I was in the process of composing an extremely witty response, but it
|
By
Quincey Morris
·
#393
·
|
|
Re: Opening File in Finder
Perhaps. :)
By
Quincey Morris
·
#392
·
|
|
Re: Opening File in Finder
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :)
--Andy
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :)
--Andy
|
By
Andy Lee
·
#391
·
|
|
Re: Cancelling dispatch_after?
If you mean “cancel” in the sense of “prevent it from starting”, then the answer is yes, you can use
If you mean “cancel” in the sense of “prevent it from starting”, then the answer is yes, you can use
|
By
Quincey Morris
·
#390
·
|
|
Re: Opening File in Finder
Hi Gerriet,
Try this:
BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath
inFileViewerRootedAtPath:containingDirPath];
-Andy
Hi Gerriet,
Try this:
BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath
inFileViewerRootedAtPath:containingDirPath];
-Andy
|
By
Andy Lee
·
#389
·
|
|
Cancelling dispatch_after?
Hi all,
Is there a way to cancel a scheduled block used with dispatch_after(…)?
While I’m finding the functionality it offers really useful, it seems like as soon as you use it you have to
Hi all,
Is there a way to cancel a scheduled block used with dispatch_after(…)?
While I’m finding the functionality it offers really useful, it seems like as soon as you use it you have to
|
By
Graham Cox
·
#388
·
|
|
Re: Observing changes in TableView
I just tried it again, and now Xcode told me that: “ Action ‘boxClicked:' sent by 'Check Box' is connected to 'File's Owner,' an invalid target (Objects inside view based table views may only be
I just tried it again, and now Xcode told me that: “ Action ‘boxClicked:' sent by 'Check Box' is connected to 'File's Owner,' an invalid target (Objects inside view based table views may only be
|
By
Gerriet M. Denkmann
·
#387
·
|
|
Re: Opening File in Finder
It does indeed. Thanks very much for telling me.
Kind regards,
Gerriet.
It does indeed. Thanks very much for telling me.
Kind regards,
Gerriet.
|
By
Gerriet M. Denkmann
·
#386
·
|
|
Re: Observing changes in TableView
Though in concept, I love the idea of KV observers, in practice, I’ve found that they lead to too many crashes.
I’ve switched over to sending notifications and it’s much less to worry about and
Though in concept, I love the idea of KV observers, in practice, I’ve found that they lead to too many crashes.
I’ve switched over to sending notifications and it’s much less to worry about and
|
By
Alex Zavatone
·
#385
·
|