Re: How to pretty print (big)numbers?

2014-10-11 Thread Gerriet M. Denkmann
On 11 Oct 2014, at 13:44, Greg Parker wrote: > >> On Oct 10, 2014, at 11:03 PM, Gerriet M. Denkmann >> wrote: >> >> On iOS 8.0: >> >> UInt64 sum = 16494631536958186120UL; >> NSString *sumString =[ NSNumberFormatter >> localizedStringFromNumber: @(sum) >>

Re: How to pretty print (big)numbers?

2014-10-11 Thread Ronald Hofmann
Your number is obviously out of scope. This works: UInt64 sum = 1649463153695818612UL; NSString *sumString = [ NSNumberFormatter localizedStringFromNumber:@(sum) numberStyle:NSNumberFormatterDecimalStyle]; printf("%s",[sumString UTF8Strin

Re: How to pretty print (big)numbers?

2014-10-11 Thread Roland King
> On 11 Oct 2014, at 3:07 pm, Ronald Hofmann wrote: > > Your number is obviously out of scope. No it isn’t, 1649463153695818612UL is a perfectly valid unsigned 64bit integer, in hex it’s 0xE4E8B3FD95592288 > > This works: > UInt64 sum = 1649463153695818612UL; > NSString *sumString =

How to pretty print floating numbers (without loosing precision)?

2014-10-11 Thread Gerriet M. Denkmann
UInt64 sum = 16494631536958187520UL; double doubleSum = sum; NSString *strSum = [ NSNumberFormatter localizedStringFromNumber: @(doubleSum) numberStyle:NS

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Daryle Walker
On Oct 10, 2014, at 1:58 AM, Ken Thomases wrote: > On Oct 10, 2014, at 12:02 AM, Daryle Walker wrote: > >> On Oct 7, 2014, at 8:03 PM, Ken Thomases wrote: >> >>> On Oct 7, 2014, at 5:29 PM, Daryle Walker wrote: >>> 1. Although the text in the window expands vertically as needed, it nev

Re: How to pretty print (big)numbers?

2014-10-11 Thread Igor Mozolevsky
On 11 October 2014 07:03, Gerriet M. Denkmann wrote: > On iOS 8.0: > > UInt64 sum = 16494631536958186120UL; > NSString *sumString = [ NSNumberFormatter > localizedStringFromNumber: @(sum) > > numberStyle:NSNumberFormatterDecimalStyle >

Re: How to pretty print (big)numbers?

2014-10-11 Thread Igor Mozolevsky
On 11 October 2014 07:03, Gerriet M. Denkmann wrote: > On iOS 8.0: > > UInt64 sum = 16494631536958186120UL; > NSString *sumString = [ NSNumberFormatter > localizedStringFromNumber: @(sum) > > numberStyle:NSNumberFormatterDecimalStyle >

Re: How to pretty print (big)numbers?

2014-10-11 Thread Roland King
> On 11 Oct 2014, at 8:22 pm, Igor Mozolevsky wrote: > > On 11 October 2014 07:03, Gerriet M. Denkmann wrote: > >> On iOS 8.0: >> >> UInt64 sum = 16494631536958186120UL; >> NSString *sumString = [ NSNumberFormatter >> localizedStringFromNumber: @(sum) >> >> numberStyle:

Re: How to pretty print (big)numbers?

2014-10-11 Thread Igor Mozolevsky
On 11 October 2014 13:47, Roland King wrote: > > > On 11 Oct 2014, at 8:22 pm, Igor Mozolevsky > wrote: > > > > On 11 October 2014 07:03, Gerriet M. Denkmann > wrote: > > > >> On iOS 8.0: > >> > >> UInt64 sum = 16494631536958186120UL; > >> NSString *sumString = [ NSNumberFormatter > >> locali

Re: Concurrent tasks are getting hung up

2014-10-11 Thread Scott Ribe
On Oct 10, 2014, at 11:01 PM, Steve Mills wrote: > OK, that makes sense. The docs for NSOperationQueue made it sound like it > would take care of all that for you... Yep. Remember all the hoopla about GCD and how it would take care of all of that for us??? Honestly the more I hear, the less l

Re: How to pretty print floating numbers (without loosing precision)?

2014-10-11 Thread Scott Ribe
On Oct 11, 2014, at 7:36 AM, Scott Ribe wrote: > On Oct 11, 2014, at 2:04 AM, Gerriet M. Denkmann wrote: > >> Note: converting to double does NOT loose any digits. > > Well, it has to. Not sure how you're getting that output, but a double has 52 > bits for the mantissa, so the largest integer

Re: Concurrent tasks are getting hung up

2014-10-11 Thread Steve Mills
On Oct 11, 2014, at 08:30, Scott Ribe wrote: > > Yep. Remember all the hoopla about GCD and how it would take care of all of > that for us??? > > Honestly the more I hear, the less likely I am to replace my home-grown task > queues with the "modern" built-in stuff. It also doesn't help that A

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Keary Suska
On Oct 11, 2014, at 3:53 AM, Daryle Walker wrote: > On Oct 10, 2014, at 1:58 AM, Ken Thomases wrote: > >> On Oct 10, 2014, at 12:02 AM, Daryle Walker wrote: >> >>> On Oct 7, 2014, at 8:03 PM, Ken Thomases wrote: >>> On Oct 7, 2014, at 5:29 PM, Daryle Walker wrote: > 1. Altho

Kerning Pairs

2014-10-11 Thread Raglan T. Tiger
The Windows CDC class has a function: DWORD GetKerningPairs( DWORD nNumPairs, LPKERNINGPAIR lpkrnpair ); What would be the equivalent in a Cocoa class? I cannot find any methods that have kerning in their name. -rags ___ Cocoa-dev mailing li

Custom NSImageView with CALayer for Selection Rect not Scaling...

2014-10-11 Thread Peters, Brandon
Hello, I have a custom NSImageView with layer-backing and CALayer sublayers for drawing the selection rectangle. All of this is embedded in a NSScrollView with magnification enabled. When I zoom in or out the image in the image view “scales” but the selection rectangle does not and “stays” wher

Re: Kerning Pairs

2014-10-11 Thread Kyle Sluder
On Oct 11, 2014, at 8:20 AM, Raglan T. Tiger wrote: > > The Windows CDC class has a function: > > DWORD GetKerningPairs( DWORD nNumPairs, LPKERNINGPAIR lpkrnpair ); > > > What would be the equivalent in a Cocoa class? I cannot find any methods > that have kerning in their name. Kerning can

Re: Kerning Pairs

2014-10-11 Thread Raglan T. Tiger
On Oct 11, 2014, at 10:16 AM, Kyle Sluder wrote: > So the question, as usual, becomes: what are you actually trying to do? For the selected font I want to find the number of kerning pairs kpcnt, make a new KERNINGPAIR [ kpcnt ] structure and then fill it out. The kpcnt and KERNINGPAIR are pa

Re: How to pretty print floating numbers (without loosing precision)?

2014-10-11 Thread Gerriet M. Denkmann
On 11 Oct 2014, at 20:47, Scott Ribe wrote: > On Oct 11, 2014, at 7:36 AM, Scott Ribe wrote: > >> On Oct 11, 2014, at 2:04 AM, Gerriet M. Denkmann >> wrote: >> >>> Note: converting to double does NOT loose any digits. >> >> Well, it has to. Not sure how you're getting that output, but a do

Re: Kerning Pairs

2014-10-11 Thread Scott Ribe
On Oct 11, 2014, at 11:18 AM, Raglan T. Tiger wrote: > For the selected font I want to find the number of kerning pairs kpcnt, make > a new KERNINGPAIR [ kpcnt ] structure and then fill it out. > > The kpcnt and KERNINGPAIR are passed to model code for kerning the glyphs > into our model. Yo

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Daryle Walker
On Oct 11, 2014, at 10:23 AM, Keary Suska wrote: > On Oct 11, 2014, at 3:53 AM, Daryle Walker wrote: > >> On Oct 10, 2014, at 1:58 AM, Ken Thomases wrote: >> >>> On Oct 10, 2014, at 12:02 AM, Daryle Walker wrote: >>> On Oct 7, 2014, at 8:03 PM, Ken Thomases wrote: > On Oct 7

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Keary Suska
On Oct 11, 2014, at 1:31 PM, Daryle Walker wrote: > There was a minor detour where I just had “textContainer.containerSize” set. > You need BOTH “containerSize” and “widthTracksTextView” set (to {10M, 10M} > and NO, respectively). Both of these can be set in the user-defined run-time > attribu

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Ken Thomases
On Oct 11, 2014, at 9:23 AM, Keary Suska wrote: > On Oct 11, 2014, at 3:53 AM, Daryle Walker wrote: > >> On Oct 10, 2014, at 1:58 AM, Ken Thomases wrote: >> >>> I tested this and it worked for me. In summary, all three steps: >>> >>> * Set the text view's max. width >>> * Set the text view

UIImageView content will not scale up(or down) even while using UIViewContentModeScaleAspectFit -- iOS8, Xcode 6.0.1

2014-10-11 Thread Mazzaroth M.
Hi all, I eventually want to do an animation like here: https://www.dropbox.com/s/6e1pyo7o57nl4ph/scrappling_ae_motion_setup.m4v?dl=0 so my plan is to do a CAAnimationGroup that will both scale the self.sticker image and change its position onscreen, end the animation and unhide self.stickerDestin