How to override [NSTextField paste:]

2012-06-15 Thread Graham Cox
Is there a way to override the -paste: method of NSTextField, other than 
subclassing?

I have a situation where I want to handle paste for several related text entry 
fields at once. I have implemented -paste: in the controller for these, but of 
course it goes to first responder which is the text field itself (or its 
editor) which isn't what I want. Subclassing the field is an option, but 
because of the Field Editor, I'm not sure it's what is really needed.

--Graham
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Demo Version

2012-06-15 Thread Thomas Davie

On 15 Jun 2012, at 01:06, Preston Sumner wrote:

 On Jun 14, 2012, at 11:41 AM, Richard Somers wrote:
 
 The Mac App Store guidelines indicates that Apps that are beta, demo, 
 trial, or test versions will be rejected.
 
 So if potential customers need to go to my website to download a demo 
 version then I might as well offer the retail version for sale on my website 
 also. Why use the Mac App Store?

Of note, while all these are banned, apple seem entirely okay with lite 
versions.  The key is basically that the lite version must still function as an 
app on its own... just not quite as complete a one as the full version.  This 
as opposed to a demo app which is likely to stop working as an app on its own.

Thanks

Tom Davie
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Core Image

2012-06-15 Thread Luca Ciciriello
Hi All.
I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to find the 
key KCGImagePropertyOrientation.

My doubt is: Is this key available in iOS?

I'm using iOS 5.1 with Xcode 4.3.3

Thanks in advance for any answer.

Luca.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Image

2012-06-15 Thread Roland King
It's in the documentation as iOS4.0 and later and it's in the header file too

grep kCGImagePropertyOrientation *
CGImageProperties.h:IMAGEIO_EXTERN const CFStringRef 
kCGImagePropertyOrientation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, 
__IPHONE_4_0);

Did you pick the right framework? It's normally, and indeed in this case is, 
listed at the top of the documentation for the symbol. 

On Jun 15, 2012, at 8:24 PM, Luca Ciciriello wrote:

 Hi All.
 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to find 
 the key KCGImagePropertyOrientation.
 
 My doubt is: Is this key available in iOS?
 
 I'm using iOS 5.1 with Xcode 4.3.3
 
 Thanks in advance for any answer.
 
 Luca.
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
 
 This email sent to r...@rols.org


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Image

2012-06-15 Thread Luca Ciciriello
I build using CoreImage.framework and including CoreImage/CoreImage.h  header
The BASE SDK is 5.1 and the Deployment Target is 5.1

The error I get is Use of undeclared identifier KCGImagePropertyOrientation.

Is there some other header I've to include?

Luca.


On Jun 15, 2012, at 2:41 PM, Roland King wrote:

 It's in the documentation as iOS4.0 and later and it's in the header file too
 
 grep kCGImagePropertyOrientation *
 CGImageProperties.h:IMAGEIO_EXTERN const CFStringRef 
 kCGImagePropertyOrientation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, 
 __IPHONE_4_0);
 
 Did you pick the right framework? It's normally, and indeed in this case is, 
 listed at the top of the documentation for the symbol. 
 
 On Jun 15, 2012, at 8:24 PM, Luca Ciciriello wrote:
 
 Hi All.
 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to find 
 the key KCGImagePropertyOrientation.
 
 My doubt is: Is this key available in iOS?
 
 I'm using iOS 5.1 with Xcode 4.3.3
 
 Thanks in advance for any answer.
 
 Luca.
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
 
 This email sent to r...@rols.org
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Image

2012-06-15 Thread Roland King
What framework does the documentation for kCGImagePropertyOrientation tell you 
to add? In my last mail I said it's right at the top of the documentation page, 
as it usually is for all such things. 

On Jun 15, 2012, at 9:00 PM, Luca Ciciriello wrote:

 I build using CoreImage.framework and including CoreImage/CoreImage.h  header
 The BASE SDK is 5.1 and the Deployment Target is 5.1
 
 The error I get is Use of undeclared identifier KCGImagePropertyOrientation.
 
 Is there some other header I've to include?
 
 Luca.
 
 
 On Jun 15, 2012, at 2:41 PM, Roland King wrote:
 
 It's in the documentation as iOS4.0 and later and it's in the header file too
 
 grep kCGImagePropertyOrientation *
 CGImageProperties.h:IMAGEIO_EXTERN const CFStringRef 
 kCGImagePropertyOrientation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, 
 __IPHONE_4_0);
 
 Did you pick the right framework? It's normally, and indeed in this case is, 
 listed at the top of the documentation for the symbol. 
 
 On Jun 15, 2012, at 8:24 PM, Luca Ciciriello wrote:
 
 Hi All.
 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to find 
 the key KCGImagePropertyOrientation.
 
 My doubt is: Is this key available in iOS?
 
 I'm using iOS 5.1 with Xcode 4.3.3
 
 Thanks in advance for any answer.
 
 Luca.
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
 
 This email sent to r...@rols.org
 
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Image

2012-06-15 Thread Fritz Anderson

On Fri, June 15, 2012 7:24 am, Luca Ciciriello wrote:
 Hi All.
 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to
 find the key KCGImagePropertyOrientation.

I notice that you keep spelling it KCGImagePropertyOrientation. The proper
spelling is kCGImagePropertyOrientation, with a lower-case k.

-- F

-- 
Fritz Anderson
Xcode 4 Unleashed - Classics professors ask for it by name.
x4u.manoverboard.org


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Image

2012-06-15 Thread Luca Ciciriello
Yes this is the problem.

Thanks

Luca.
On Jun 15, 2012, at 4:03 PM, Fritz Anderson wrote:

 
 On Fri, June 15, 2012 7:24 am, Luca Ciciriello wrote:
 Hi All.
 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to
 find the key KCGImagePropertyOrientation.
 
 I notice that you keep spelling it KCGImagePropertyOrientation. The proper
 spelling is kCGImagePropertyOrientation, with a lower-case k.
 
-- F
 
 -- 
 Fritz Anderson
 Xcode 4 Unleashed - Classics professors ask for it by name.
 x4u.manoverboard.org
 
 
 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: More PDFView mysteries...

2012-06-15 Thread Scott Ribe
Should also have noted: I believe this problem started with 10.7.4.



-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: More PDFView mysteries...

2012-06-15 Thread Scott Ribe

On Jun 15, 2012, at 7:19 AM, Scott Ribe wrote:

 On Jun 14, 2012, at 3:15 PM, Matthew Weinstein wrote:
 
 Ideas? Anyone else having pdfview lion problems.
 
 Yes, the problem you described, plus also fairly frequently crashes on 
 closing the window--looks like invalidate being sent to a timer that no 
 longer exists, when my window controller does not create any timers.
 
 Now Graham is right that you should be using awakeFromNib or windowDidLoad 
 anyway, but that's not the problem in my case.
 
 -- 
 Scott Ribe
 scott_r...@elevated-dev.com
 http://www.elevated-dev.com/
 (303) 722-0567 voice
 
 
 
 


-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


updates for retina

2012-06-15 Thread Roland King
I was reading around about the new Macbook Pro retina display today and there 
were quite a lot of comments about how apps may need updating to support it. 
Chrome was mentioned as an app which doesn't look good currently, I saw the 
pictures, it's not nice. I understand apps needing 2x artwork piece, that makes 
sense. However I'm unsure how a normal app (like Chrome) needs special 
treatment just drawing to the screen and I didn't find a document describing 
'all the things you might have to do to make your application 
retina-compatible', is there one? I thought the idea was it would just work. 

My impression of retina was that the display was beyond the eye's resolution 
ability so it didn't matter what the resolution of the underlying screen is, 
the system maps it on, antialiases it and, because of the real underlying 
screen pixel resolution, you can't tell the difference. (inserts a bit of doubt 
there, antialiased is never as good)

Total curio for me here, I don't have an app which needs it, but nor can I find 
a document which describes potential compatibility issues and work which might 
be required. Is there one? 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: updates for retina

2012-06-15 Thread Bill Cheeseman

On Jun 15, 2012, at 10:21 AM, Roland King wrote:

 I was reading around about the new Macbook Pro retina display today and there 
 were quite a lot of comments about how apps may need updating to support it. 
 Chrome was mentioned as an app which doesn't look good currently, I saw the 
 pictures, it's not nice. I understand apps needing 2x artwork piece, that 
 makes sense. However I'm unsure how a normal app (like Chrome) needs special 
 treatment just drawing to the screen and I didn't find a document describing 
 'all the things you might have to do to make your application 
 retina-compatible', is there one? I thought the idea was it would just work. 


Two of my products that make heavy use of Core Animation need to be revised to 
work correctly in HiDPI mode. One of them has fuzzy animated text, and the 
other puts everything in the wrong place completely. My other six products work 
perfectly in HiDPI mode without change, but they do not use any explicit 
animations. The developer documentation does suggest that there may be some 
applications that need changes, and I think Core Animation may be a key piece 
of that. I haven't tackled the fixes yet, but I know I'm using one method that 
is identified in the documentation as problematic in HiDPI mode, and I think 
some of my arithmetic may have assumed pixels and points are equivalent.

-- 

Bill Cheeseman - b...@cheeseman.name

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: updates for retina

2012-06-15 Thread lbland
hi-

On Jun 15, 2012, at 10:21 AM, Roland King wrote:

 I understand apps needing 2x artwork piece, that makes sense.

Why does that make sense?

If your tool icon needs to be 32x32 pixels then make a TIFF/PNG 64x64 (or 
128x128 or 256x256) and let NSImage do the rest.

for icns, add all representations (as is required anyways).

... maybe I'm somewhat ignorant - but not having a retina display to play with 
yet is a handicap.

thanks!-

-lance


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: More PDFView mysteries...

2012-06-15 Thread Antonio Nunes
On 15 Jun 2012, at 16:20, Scott Ribe wrote:

 Ideas? Anyone else having pdfview lion problems.
 
 Yes, the problem you described, plus also fairly frequently crashes on 
 closing the window--looks like invalidate being sent to a timer that no 
 longer exists, when my window controller does not create any timers.

Indeed, the only way I found to solve this is to build in 10.7.3, but according 
to my tests the issue only happens when you've attached a PDFThumbnailView to 
the PDFView. I believe otherwise the crash on close doesn't happen.

 Now Graham is right that you should be using awakeFromNib or windowDidLoad 
 anyway, but that's not the problem in my case.

I don't believe that will solve the issue of the blank PDFView. If you _must_ 
build on 10.7.4 you could end the awakeFromNib or windowDidLoad with:
dispatch_async(dispatch_get_main_queue(), ^{
[self setNeedsDisplay:YES];
});

A hack, but it should cause the PDFView to display its contents.

-António

---
And you would accept the seasons of your
heart, even as you have always accepted
the seasons that pass over your field.

--Kahlil Gibran
---




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: More PDFView mysteries...

2012-06-15 Thread Scott Ribe
On Jun 15, 2012, at 7:48 AM, Antonio Nunes wrote:

 Indeed, the only way I found to solve this is to build in 10.7.3, but 
 according to my tests the issue only happens when you've attached a 
 PDFThumbnailView to the PDFView. I believe otherwise the crash on close 
 doesn't happen.

I'm building on 10.6.8, and I do not use PDFThumbnailView.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: updates for retina

2012-06-15 Thread Jean-Daniel Dupas

Le 15 juin 2012 à 16:21, Roland King a écrit :

 I was reading around about the new Macbook Pro retina display today and there 
 were quite a lot of comments about how apps may need updating to support it. 
 Chrome was mentioned as an app which doesn't look good currently, I saw the 
 pictures, it's not nice. I understand apps needing 2x artwork piece, that 
 makes sense. However I'm unsure how a normal app (like Chrome) needs special 
 treatment

Because Chrome is not a Normal app, and it does not just use standard API for 
rendering. Usually everything just works. You can already test that on your 
standard screen by enabling HiDPI using the Quartz Debug utility that used to 
be part of Xcode but is now distributed in an extra package (the Graphic Tools 
package IIRC).

It may not reveal subtle rendering bug, but will let you know if something goes 
really wrong in your drawing code, and coordinate computation.

 just drawing to the screen and I didn't find a document describing 'all the 
 things you might have to do to make your application retina-compatible', is 
 there one? I thought the idea was it would just work. 
 
 My impression of retina was that the display was beyond the eye's resolution 
 ability so it didn't matter what the resolution of the underlying screen is, 
 the system maps it on, antialiases it and, because of the real underlying 
 screen pixel resolution, you can't tell the difference. (inserts a bit of 
 doubt there, antialiased is never as good)
 
 Total curio for me here, I don't have an app which needs it, but nor can I 
 find a document which describes potential compatibility issues and work which 
 might be required. Is there one? 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
 
 This email sent to devli...@shadowlab.org

-- Jean-Daniel





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: More PDFView mysteries...

2012-06-15 Thread Antonio Nunes
On 15 Jun 2012, at 16:58, Scott Ribe wrote:

 Indeed, the only way I found to solve this is to build in 10.7.3, but 
 according to my tests the issue only happens when you've attached a 
 PDFThumbnailView to the PDFView. I believe otherwise the crash on close 
 doesn't happen.
 
 I'm building on 10.6.8, and I do not use PDFThumbnailView.

Interesting, I never had this problem until I updated my system to 10.7.4. 
After being unable to work around the issue, I put 10.7.3 on a separate 
partition, and building there, with the same version of Xcode does not expose 
the crash.

-António

---
Touch is a language without words
---





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Core Image

2012-06-15 Thread Richard Altenburg (Brainchild)
Op 15 jun. 2012, om 14:24 heeft Luca Ciciriello het volgende geschreven:

 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to find 
 the key KCGImagePropertyOrientation.
 My doubt is: Is this key available in iOS?
 I'm using iOS 5.1 with Xcode 4.3.3

My documentation serach came up with this:

kCGImagePropertyOrientation
The intended display orientation of the image. If present, this key is a 
CFNumber value with the same value as defined by the TIFF and EXIF 
specifications. The value specifies where the origin (0,0) of the image is 
located, as shown in Table 1. If not present, a value of 1 is assumed.
Available in iOS 4.0 and later.
Declared in CGImageProperties.h.

What are you trying to accomplish?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Image

2012-06-15 Thread Richard Altenburg
Op 15 jun. 2012, om 14:24 heeft Luca Ciciriello het volgende geschreven:

 I'm porting some  CoreImage code from MacOS X to iOS and I'm unable to find 
 the key KCGImagePropertyOrientation.
 My doubt is: Is this key available in iOS?
 I'm using iOS 5.1 with Xcode 4.3.3

My documentation serach came up with this:

kCGImagePropertyOrientation
The intended display orientation of the image. If present, this key is a 
CFNumber value with the same value as defined by the TIFF and EXIF 
specifications. The value specifies where the origin (0,0) of the image is 
located, as shown in Table 1. If not present, a value of 1 is assumed.
Available in iOS 4.0 and later.
Declared in CGImageProperties.h.

What are you trying to accomplish?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to override [NSTextField paste:]

2012-06-15 Thread Kyle Sluder

On Jun 14, 2012, at 11:04 PM, Graham Cox wrote:

 Is there a way to override the -paste: method of NSTextField, other than 
 subclassing?
 
 I have a situation where I want to handle paste for several related text 
 entry fields at once. I have implemented -paste: in the controller for these, 
 but of course it goes to first responder which is the text field itself (or 
 its editor) which isn't what I want. Subclassing the field is an option, but 
 because of the Field Editor, I'm not sure it's what is really needed.

-paste: is handled by NSTextView (by virtue of being an NSText subclass), not 
by the NSTextField for which it is acting as a field editor.

Your best bet is probably to retarget the Paste menu item to use a different 
selector that is picked up by your window controller. Then also implement this 
selector on your NSApplication delegate (or subclass) to re-send -paste: as a 
backstop in case an instance of your window controller isn't in the responder 
chain.

// Warning: composed in Mail.app

@implementation MyWindowController
- (IBAction)myPaste:(id)sender {
  [self.textView1 setString:…];
  [self.textView2 setString:…];
 }
@end

@implemenation MyAppDelegate
- (IBAction)myPaste:(id)sender {
  [NSApp sendAction:@selector(paste:) to:nil from:sender];
}
@end

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

NSTextField Selection

2012-06-15 Thread koko
I have an NSTextField whose width is just enough for M and W.  The filled can 
get set with text longer than one character. The user is to replace this 
multi-character text with a single character.

So, without having to double click to select all text before entering the 
single character replacement what is the best way to programmatically select 
the text?

Do I subclass NSTextField , define a tracking rect and look for mouse entered 
and then -selectText?  Seems extreme. Is there an easy way?

-koko
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextField Selection

2012-06-15 Thread Kyle Sluder
On Jun 15, 2012, at 12:31 PM, koko k...@highrolls.net wrote:

 I have an NSTextField whose width is just enough for M and W.  The filled can 
 get set with text longer than one character. The user is to replace this 
 multi-character text with a single character.

I'm really confused by your description of this interface. How and why can the 
field be filled with more than one character?

 
 So, without having to double click to select all text before entering the 
 single character replacement what is the best way to programmatically select 
 the text?

Actually selecting the text is the easy part. Just call -selectText:.

 
 Do I subclass NSTextField , define a tracking rect and look for mouse entered 
 and then -selectText?  Seems extreme. Is there an easy way?

What do you want the trigger to be for selecting all the text? Whenever the 
user starts editing my text field, all the text should be selected so they can 
hit one key to replace it all?

If that's what you want, I'd just hook up an object as the text field's 
delegate and implement -controlTextDidBeginEditing: to select all text in the 
field editor (accessible via the @NSFieldEditor key of the notification's 
user info dictionary).

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: updates for retina

2012-06-15 Thread Jens Alfke

On Jun 15, 2012, at 8:02 AM, Jean-Daniel Dupas wrote:

 Because Chrome is not a Normal app, and it does not just use standard API 
 for rendering.

To be precise: Chrome draws web page contents into offscreen pixmaps and then 
copies those to the screen. (This is for security: the drawing is done by 
WebKit in sandboxed renderer processes, using shared-memory buffers.) The 
problem is that it bases the pixmap dimensions on the logical size (in view 
coordinates) of the window, not the actual size in device pixels.

BTW, this seems to have been fixed in the latest developer-channel builds of 
Chrome, since I just got my RetinaBook today and Chrome doesn't look jaggy to 
me. Presumably the fix will be ported into the stable releases too.

(I'm sure Safari at one point had the same issue since it also uses sandboxed 
renderers, but of course they fixed that in time before the product release, 
just like the other retina-savvy Apple apps.)

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextField Selection

2012-06-15 Thread Charlie Dickman
You are going around the world to cross the street. Define an NSFormatter for 
your text field and implement a textfield delegate and you can have the exact 
control over the textfield that you are after.

On Jun 15, 2012, at 3:41 PM, Kyle Sluder wrote:

 On Jun 15, 2012, at 12:31 PM, koko k...@highrolls.net wrote:
 
 I have an NSTextField whose width is just enough for M and W.  The filled 
 can get set with text longer than one character. The user is to replace this 
 multi-character text with a single character.
 
 I'm really confused by your description of this interface. How and why can 
 the field be filled with more than one character?
 
 
 So, without having to double click to select all text before entering the 
 single character replacement what is the best way to programmatically select 
 the text?
 
 Actually selecting the text is the easy part. Just call -selectText:.
 
 
 Do I subclass NSTextField , define a tracking rect and look for mouse 
 entered and then -selectText?  Seems extreme. Is there an easy way?
 
 What do you want the trigger to be for selecting all the text? Whenever the 
 user starts editing my text field, all the text should be selected so they 
 can hit one key to replace it all?
 
 If that's what you want, I'd just hook up an object as the text field's 
 delegate and implement -controlTextDidBeginEditing: to select all text in the 
 field editor (accessible via the @NSFieldEditor key of the notification's 
 user info dictionary).
 
 --Kyle Sluder
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/3tothe4th%40comcast.net
 
 This email sent to 3tothe...@comcast.net

Charlie Dickman
3tothe...@comcast.net




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextField Selection

2012-06-15 Thread Kyle Sluder
On Jun 15, 2012, at 1:53 PM, Charlie Dickman wrote:

 You are going around the world to cross the street. Define an NSFormatter for 
 your text field and implement a textfield delegate and you can have the exact 
 control over the textfield that you are after.

NSFormatter doesn't sound appropriate here, but that's because OP hasn't been 
very clear about his motivations.

If your goal is to control the selection behavior of the editing process, then 
NSFormatter is not the right choice. But perhaps controlling the selection is 
only a perceived required step on the way to OP's actual goal.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextField Selection

2012-06-15 Thread koko

On Jun 15, 2012, at 1:41 PM, Kyle Sluder wrote:

 What do you want the trigger to be for selecting all the text? Whenever the 
 user starts editing my text field, all the text should be selected so they 
 can hit one key to replace it all?
 
 If that's what you want, I'd just hook up an object as the text field's 
 delegate and implement -controlTextDidBeginEditing: to select all text in the 
 field editor (accessible via the @NSFieldEditor key of the notification's 
 user info dictionary).


Just what I was looking for!

-koko
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextField Selection

2012-06-15 Thread koko

On Jun 15, 2012, at 1:41 PM, Kyle Sluder wrote:

 What do you want the trigger to be for selecting all the text? Whenever the 
 user starts editing my text field, all the text should be selected so they 
 can hit one key to replace it all?
 
 If that's what you want, I'd just hook up an object as the text field's 
 delegate and implement -controlTextDidBeginEditing: to select all text in the 
 field editor (accessible via the @NSFieldEditor key of the notification's 
 user info dictionary).


This is what I was looking for.  Thanks.

-koko
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


[SOLVED] Re: How to override [NSTextField paste:]

2012-06-15 Thread Graham Cox

On 16/06/2012, at 4:06 AM, Kyle Sluder wrote:

 Your best bet is probably to retarget the Paste menu item to use a different 
 selector that is picked up by your window controller.

Thanks Kyle,

Unfortunately the standard paste: selector is used extensively elsewhere in my 
app, so this simple solution would not be so simple. This is an otherwise very 
self-contained modal dialog that doesn't have much to do.

I solved it as follows:


My window controller, which is the window's delegate, implements 
-windowWillReturnFieldEditor:forObject:. I return a subclass of NSTextView 
which overrides -paste: and adds a property, -pasteDelegate: which I set to be 
the window controller. (I believe the FE's nextResponder is usually also the 
windowController, but I wasn't entirely sure I could rely on that, so I just 
added an extra property to hook it up). Then I just punt -paste to the 
-pasteDelegate (and also -validateMenuItem for that action).

Works great. In conjunction with some text editing delegate methods I have 
excellent control over the text fields and the subclassing was absolutely 
minimal.


--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com