Re: Know when text is edited in any app

2011-08-09 Thread Mike Abdullah
Forget any notion of doing this for NSTextView I'd advise; Safari and Mail are 
based around WebViews.

On 8 Aug 2011, at 19:47, Joshua Garnham wrote:

 
 I need to know when text is entered (or anything relating to a delegate 
 method happens) in any NSTextView in the active app whether it's my app, 
 TextEdit or Safari. Similar to this app here (http://pilotmoon.com/popclip/).
 
 
 I'm not sure how exactly to go about this and the only thing I have thought 
 of so far is becoming a service but I'm not sure if it's the right way to go 
 about it and even so where I'd go from there.
 
 
 Thanks.
 
 
 Josh
 
 
 
 ___
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Know when text is edited in any app

2011-08-09 Thread Joshua Garnham
 I'm not so bothered about Safari/Mail, I just used Safari as an example of 
what I wanted to do. I'd rather focus on doing it with NSTextView as that is 
what the majority of text editing apps use. 

I have - since I first asked the question - been using the Accessibility API's 
to find out information about a text view(s) in other apps, however my main 
target is to have access to the NSTextView's delegate methods specifically 
'textView:didCheckTextInRange:types:options:results:orthography:wordCount:' to 
find out when auto-complete occurs.

Whether or not this next step is possible, I am not sure.

Josh 


On Tuesday, 9 August 2011 at 13:40, Mike Abdullah wrote:

 Forget any notion of doing this for NSTextView I'd advise; Safari and Mail 
 are based around WebViews.
 
 On 8 Aug 2011, at 19:47, Joshua Garnham wrote:
 
  
  I need to know when text is entered (or anything relating to a delegate 
  method happens) in any NSTextView in the active app whether it's my app, 
  TextEdit or Safari. Similar to this app here 
  (http://pilotmoon.com/popclip/).
  
  
  I'm not sure how exactly to go about this and the only thing I have thought 
  of so far is becoming a service but I'm not sure if it's the right way to 
  go about it and even so where I'd go from there.
  
  
  Thanks.
  
  
  Josh
  
  
  
  ___
  
  Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
  (mailto: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 
  (http://lists.apple.com)
  
  Help/Unsubscribe/Update your Subscription:
  http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
  
  This email sent to cocoa...@mikeabdullah.net 
  (mailto:cocoa...@mikeabdullah.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Know when text is edited in any app

2011-08-09 Thread Mike Abdullah
It is not possible this way. You should not inject your code willy-nilly into 
other apps.

On 9 Aug 2011, at 13:48, Joshua Garnham wrote:

 I'm not so bothered about Safari/Mail, I just used Safari as an example of 
 what I wanted to do. I'd rather focus on doing it with NSTextView as that is 
 what the majority of text editing apps use.
 
 I have - since I first asked the question - been using the Accessibility 
 API's to find out information about a text view(s) in other apps, however my 
 main target is to have access to the NSTextView's delegate methods 
 specifically 
 'textView:didCheckTextInRange:types:options:results:orthography:wordCount:' 
 to find out when auto-complete occurs.
 
 Whether or not this next step is possible, I am not sure.
 
 Josh
 On Tuesday, 9 August 2011 at 13:40, Mike Abdullah wrote:
 
 Forget any notion of doing this for NSTextView I'd advise; Safari and Mail 
 are based around WebViews.
 
 On 8 Aug 2011, at 19:47, Joshua Garnham wrote:
 
 
 I need to know when text is entered (or anything relating to a delegate 
 method happens) in any NSTextView in the active app whether it's my app, 
 TextEdit or Safari. Similar to this app here 
 (http://pilotmoon.com/popclip/).
 
 
 I'm not sure how exactly to go about this and the only thing I have thought 
 of so far is becoming a service but I'm not sure if it's the right way to 
 go about it and even so where I'd go from there.
 
 
 Thanks.
 
 
 Josh
 
 
 
 ___
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Know when text is edited in any app

2011-08-09 Thread Joshua Garnham
 I wouldn't be doing it 'willy-nilly', I would only do it if necessary and the 
code would serve only one sole purpose. However, you are correct in saying that 
it does not seem that it is possible the way I have been hoping to do it and so 
I will have to try and find some other way. 


On Tuesday, 9 August 2011 at 13:55, Mike Abdullah wrote:

 It is not possible this way. You should not inject your code willy-nilly into 
 other apps.
 
 On 9 Aug 2011, at 13:48, Joshua Garnham wrote:
   I'm not so bothered about Safari/Mail, I just used Safari as an example of 
  what I wanted to do. I'd rather focus on doing it with NSTextView as that 
  is what the majority of text editing apps use. 
  
  I have - since I first asked the question - been using the Accessibility 
  API's to find out information about a text view(s) in other apps, however 
  my main target is to have access to the NSTextView's delegate methods 
  specifically 
  'textView:didCheckTextInRange:types:options:results:orthography:wordCount:' 
  to find out when auto-complete occurs.
  
  Whether or not this next step is possible, I am not sure.
  
  Josh 
  
  On Tuesday, 9 August 2011 at 13:40, Mike Abdullah wrote:
  
   Forget any notion of doing this for NSTextView I'd advise; Safari and 
   Mail are based around WebViews.
   
   On 8 Aug 2011, at 19:47, Joshua Garnham wrote:
   

I need to know when text is entered (or anything relating to a delegate 
method happens) in any NSTextView in the active app whether it's my 
app, TextEdit or Safari. Similar to this app here 
(http://pilotmoon.com/popclip/).


I'm not sure how exactly to go about this and the only thing I have 
thought of so far is becoming a service but I'm not sure if it's the 
right way to go about it and even so where I'd go from there.


Thanks.


Josh



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
(mailto: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 
(http://lists.apple.com/)

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to cocoa...@mikeabdullah.net 
(mailto:cocoa...@mikeabdullah.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Know when text is edited in any app

2011-08-08 Thread Joshua Garnham

I need to know when text is entered (or anything relating to a delegate method 
happens) in any NSTextView in the active app whether it's my app, TextEdit or 
Safari. Similar to this app here (http://pilotmoon.com/popclip/).


I'm not sure how exactly to go about this and the only thing I have thought of 
so far is becoming a service but I'm not sure if it's the right way to go about 
it and even so where I'd go from there.


Thanks.


Josh



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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