Re: How to insert a screen-only character in an NSTextView?

2012-09-03 Thread William Squires
This would be better handled with some sort of filter applied at I/O time (i.e. when you read/write the file) I would think. That is, let your model objects handle the translation, and let the view objects do what view objects are supposed to do. Trying to fiddle around with low-level

Re: How to insert a screen-only character in an NSTextView?

2012-09-03 Thread Kyle Sluder
On Sep 3, 2012, at 3:06 PM, William Squires wsqui...@satx.rr.com wrote: This would be better handled with some sort of filter applied at I/O time (i.e. when you read/write the file) I would think. That is, let your model objects handle the translation, and let the view objects do what view

Re: How to insert a screen-only character in an NSTextView?

2012-09-03 Thread Ross Carter
I think Kyle and William are saying the same thing: leave NSTextStorage alone and adjust the presentation as needed. On Sep 3, 2012, at 6:57 PM, Kyle Sluder k...@ksluder.com wrote: On Sep 3, 2012, at 3:06 PM, William Squires wsqui...@satx.rr.com wrote: This would be better handled with

Re: How to insert a screen-only character in an NSTextView?

2012-09-03 Thread Koen van der Drift
I've decided not to use this in my app and try something else to make annotations in my textView. Thanks all for the input though. - Koen. On Sep 3, 2012, at 18:57, Kyle Sluder k...@ksluder.com wrote: On Sep 3, 2012, at 3:06 PM, William Squires wsqui...@satx.rr.com wrote: This would be

Re: How to insert a screen-only character in an NSTextView?

2012-09-01 Thread Koen van der Drift
Does anyone know where I can get the sample project for that session (WWDC_2010_114.xcodeproj)? The developer website only has the video and slides, but no source. Thanks, - Koen. On Aug 31, 2012, at 6:26 PM, Koen van der Drift koenvanderdr...@gmail.com wrote: Was it session 114 from

Re: How to insert a screen-only character in an NSTextView?

2012-09-01 Thread Ross Carter
I'll send it to you in a separate email. Ross On Sep 1, 2012, at 8:30 AM, Koen van der Drift koenvanderdr...@gmail.com wrote: Does anyone know where I can get the sample project for that session (WWDC_2010_114.xcodeproj)? The developer website only has the video and slides, but no source.

Re: How to insert a screen-only character in an NSTextView?

2012-09-01 Thread Koen van der Drift
Not yet there, but as a follow up question, how do I get the width of a monospaced font? I need this to calculate the rect that a textcontainer needs for x amount of fonts. - Koen. On Aug 31, 2012, at 4:55 PM, Ross Carter rosscarter...@me.com wrote: Or a custom NSGlyphGenerator. There was a

Re: How to insert a screen-only character in an NSTextView?

2012-09-01 Thread Kyle Sluder
On Sep 1, 2012, at 8:22 PM, Koen van der Drift koenvanderdr...@gmail.com wrote: Not yet there, but as a follow up question, how do I get the width of a monospaced font? I need this to calculate the rect that a textcontainer needs for x amount of fonts. Why don't you just perform layout and

Re: How to insert a screen-only character in an NSTextView?

2012-09-01 Thread Koen van der Drift
On Sep 1, 2012, at 11:26 PM, Kyle Sluder k...@ksluder.com wrote: Why don't you just perform layout and ask the layout manager for the text it used? I'd like to make the text display in a column that is exactly x characters width. I thought I need to control that with setting the size of a

Re: How to insert a screen-only character in an NSTextView?

2012-09-01 Thread Kyle Sluder
On Sep 1, 2012, at 8:35 PM, Koen van der Drift koenvanderdr...@gmail.com wrote: On Sep 1, 2012, at 11:26 PM, Kyle Sluder k...@ksluder.com wrote: Why don't you just perform layout and ask the layout manager for the text it used? I'd like to make the text display in a column that is

How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Koen van der Drift
Is it possible to insert character/glyphs in an NSTextView without changing the underlying NSTextStorage ? The goal is to have some special characters (eg a hyphen) at specific places in the string that is displayed in the view. So when the data is saved, the special characters are not part of

Re: How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Kyle Sluder
On Fri, Aug 31, 2012, at 08:24 AM, Koen van der Drift wrote: Is it possible to insert character/glyphs in an NSTextView without changing the underlying NSTextStorage ? The goal is to have some special characters (eg a hyphen) at specific places in the string that is displayed in the view. So

Re: How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Ross Carter
Or a custom NSGlyphGenerator. There was a WWDC session on this a few years back. On Aug 31, 2012, at 2:21 PM, Kyle Sluder k...@ksluder.com wrote: On Fri, Aug 31, 2012, at 08:24 AM, Koen van der Drift wrote: Is it possible to insert character/glyphs in an NSTextView without changing the

Re: How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Koen van der Drift
Do you know what year? The videos for 2010, 2011 and 1012 are online. - Koen. On Aug 31, 2012, at 4:55 PM, Ross Carter rosscarter...@me.com wrote: Or a custom NSGlyphGenerator. There was a WWDC session on this a few years back. On Aug 31, 2012, at 2:21 PM, Kyle Sluder

Re: How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Koen van der Drift
Was it session 114 from 2012? - Koen. On Aug 31, 2012, at 5:38 PM, Koen van der Drift koenvanderdr...@gmail.com wrote: Do you know what year? The videos for 2010, 2011 and 1012 are online. - Koen. On Aug 31, 2012, at 4:55 PM, Ross Carter rosscarter...@me.com wrote: Or a custom

Re: How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Koen van der Drift
On Aug 31, 2012, at 7:23 PM, Graham Cox appt...@me.com wrote: Good luck reading THAT format! I think codecs involving monks with quills are needed. Hahaha, well spotted! I have my feather pen ready! - Koen. ___ Cocoa-dev mailing list

Re: How to insert a screen-only character in an NSTextView?

2012-08-31 Thread Graham Cox
The videos for [] 1012 are online Good luck reading THAT format! I think codecs involving monks with quills are needed. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to