Re: Know when text is edited in any app

2011-08-09 Thread Joshua Garnham
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

Re: Know when text is edited in any app

2011-08-09 Thread Joshua Garnham
. 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

Notification of autocomplete

2011-08-08 Thread Joshua Garnham
Is there some notification that is posted or some other way to tell when in a NSTextView or any editable element that something has been autocorrected? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Notification of autocomplete (in any app)

2011-08-08 Thread Joshua Garnham
On Monday, 8 August 2011 at 08:02, Kyle Sluder wrote: On Sun, Aug 7, 2011 at 11:40 PM, Joshua Garnham joshua.garn...@yahoo.co.uk (mailto:joshua.garn...@yahoo.co.uk) wrote: Is there some notification that is posted or some other way to tell when in a NSTextView or any editable element

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

NSTableView willDisplayCell: called on hover

2011-04-19 Thread Joshua Garnham
I've been doing some custom drawing in the tableView:willDisplayCell:forTableColumn:row: and from this realized that if you hover over a row in the table view for about 3 seconds then it will call willDisplayCell: again. What's even more odd is that if I close the window and reopen it and

Re: NSTableView willDisplayCell: called on hover

2011-04-19 Thread Joshua Garnham
...@gmail.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com Sent: Tue, 19 April, 2011 16:02:17 Subject: Re: NSTableView willDisplayCell: called on hover On Apr 19, 2011, at 7:35 AM, Joshua Garnham joshua.garn...@yahoo.co.uk wrote: So my

Re: Gap above NSMenuItem custom view

2010-12-27 Thread Joshua Garnham
kyle.slu...@gmail.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Sun, 26 December, 2010 22:04:22 Subject: Re: Gap above NSMenuItem custom view On Sun, Dec 26, 2010 at 4:16 PM, Joshua Garnham joshua.garn...@yahoo.co.uk wrote: I see your point but I just found

Gap above NSMenuItem custom view

2010-12-26 Thread Joshua Garnham
I am using the setView: method on an NSMenuItem to set a custom view. In this custom view there is an image which takes the whole of the view. The NSMenuItem with this custom view is the first in the menu but the problem is it doesn't sit flush with the top of the menu, there is a big gap as

Re: Gap above NSMenuItem custom view

2010-12-26 Thread Joshua Garnham
I see your point but I just found this post on Stack Overflow detailing how someone else has done it. http://stackoverflow.com/questions/4064386/reverse-engineering-an-nsmenu-for-a-status-bar-item However I am having dificulty compiling the code as I get EXC_BAD_ACCESS on the line where the

NSTextField in NSMenuItem

2010-12-24 Thread Joshua Garnham
How can I display an editable NSTextField inside an NSMenuItem? I'm looking to do something similar to Spotlight. Would it work by simply usingsetView: on the menu item? Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

NSButtonCell visibility in NSOutlineView.

2010-07-07 Thread Joshua Garnham
It seems to be a pretty simple task but I am unsure how to go about it. I am looking to hide a checkbox in Column 0 if the row it's on has any children. How would I do this? Cheers. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: NSButtonCell visibility in NSOutlineView.

2010-07-07 Thread Joshua Garnham
Thanks, that worked just how I wanted it too! From: Nick Zitzmann n...@chronosnet.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Wed, 7 July, 2010 17:24:12 Subject: Re: NSButtonCell visibility in NSOutlineView. On Jul 7

App is in Landscape Mode, but main UIWindow still th inks it’s portrait.

2010-04-22 Thread Joshua Garnham
My App runs in landscape mode and I have been converting a CGPoint to the main UIWindow's co-ordinate system. I decided to check this was working all correctly by adding a couple of NSLog's to return the Co-Ordinates before and after it was converted and what I noticed was that before it was

Re: App is in Landscape Mode, but main UIWindow st ill thinks it’s portrait.

2010-04-22 Thread Joshua Garnham
Garnham From: David Duncan david.dun...@apple.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Thu, 22 April, 2010 17:12:08 Subject: Re: App is in Landscape Mode, but main UIWindow still thinks it’s portrait. On Apr 22, 2010

Checking if a touch is within a UIButton’s bou nds.

2010-04-18 Thread Joshua Garnham
I am trying to make an if statement which will check whether the users touch is within a UIButton's bounds. I thought this would be an easy affair as UIButton is a subclass of UIView, however my code doesn't seem to work. This is the code I have been using. - (void)touchesMoved:(NSSet *)touches

Troubles with moving a UIView.

2010-04-17 Thread Joshua Garnham
I have been trying to move a UIView by following a users touch. I have almost got it to work except for one thing, the UIView keeps flicking between two places. The Code I Have Been Using and What's been Happening. ___ Cocoa-dev mailing list

Coloring a Row in a NSTableView.

2010-01-10 Thread Joshua Garnham
What I am looking to do is set the background color of the selected row in an NSTableView when a I button is clicked. I've seen other cases where people have used tableView:willDisplayCell:forTableColumn:row: and setBackgroundColor: but I don't think that will work in my situation where I want

Animating an NSView in from Below.

2010-01-04 Thread Joshua Garnham
I know there are tutorials like Marcus Zarras which shows how to change from one view to another, but I would like to animate in a view which isn't going to replace another view. Here's what I have at the moment:http://drp.ly/9w86s (Test App). The view seems to slide in but the view isn't actually

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-02 Thread Joshua Garnham
...@alpinesoft.co.uk To: Graham Cox graham@bigpond.com; Joshua Garnham joshua.garn...@yahoo..co.uk Cc: Cocoa-Dev List cocoa-dev@lists.apple.com Sent: Sat, 2 January, 2010 11:04:52 Subject: Re: Setting the Line Height/ Line Spacing in an NSTextView. Well, I have to say Graham has a point

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-02 Thread Joshua Garnham
Thanks that works now! From: Paul Sanders p.sand...@alpinesoft.co.uk To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Sat, 2 January, 2010 15:03:11 Subject: Re: Setting the Line Height/ Line Spacing in an NSTextView.  Yep

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-01 Thread Joshua Garnham
@bigpond.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: Cocoa-Dev List cocoa-dev@lists.apple.com Sent: Fri, 1 January, 2010 0:16:04 Subject: Re: Setting the Line Height/ Line Spacing in an NSTextView. On 01/01/2010, at 5:14 AM, Joshua Garnham wrote: So would this work?… NSMutablePargagraphStyle

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-01 Thread Joshua Garnham
Oh, I see. That works partly. The text that is already in the NSTextView at launch has the new Line Height but as soon as you start to type the line your typing on resets it's line height to default. From: Graham Cox graham@bigpond.com To: Joshua Garnham

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-01 Thread Joshua Garnham
How would I use that? From: Paul Sanders p.sand...@alpinesoft.co.uk To: Joshua Garnham joshua.garn...@yahoo.co.uk; Graham Cox graham@bigpond.com Cc: cocoa-dev@lists.apple.com Sent: Fri, 1 January, 2010 15:09:47 Subject: Re: Setting the Line Height/ Line

Fw: Setting the Line Height/ Line Spacing in an NSTextView.

2009-12-31 Thread Joshua Garnham
]; [textView setDefaultParagraphStyle:paragraphStyle]; - Josh From: Fritz Anderson fri...@manoverboard.org To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev List cocoa-dev@lists.apple.com Sent: Wed, 30 December, 2009 17:24:21 Subject: Re: Setting the Line

Setting the Line Height/ Line Spacing in an NSTextView.

2009-12-30 Thread Joshua Garnham
How would I set the Line Height/ Line Spacinh in an NSTextView? e.g How tall each line is or how much space is between each line. Here's what I've tried (but doesn't work), it is in a NSTextView subclass … - (void)setDefaultParagraphStyle:(NSMutableParagraphStyle *)paragraphStyle { CGFloat

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2009-12-30 Thread Joshua Garnham
But the methodssetLineSpacing: and others are NSMutableParagraphStyle methods only. From: Ross Carter rosscarter...@me.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Wed, 30 December, 2009 16:12:18 Subject: Re: Setting

Setting the Line Height/ Line Spacing in an NSTextView.

2009-12-24 Thread Joshua Garnham
How would I set the Line Height/ Line Spacing in an NSTextView? e.g How tall each line is or how much space is between each line. Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Sending a Selector to another Class.

2009-10-21 Thread Joshua Garnham
How would I send a Selector to another class? I know to send it to a selector in the same file you do [self performSelector:@selector(doSomething)]; and for sending it to another class I've tried [otherClass performSelector:@selector(doSomethingElse)]; But I just get an error in the Debugger

Re: Sending a Selector to another Class.

2009-10-21 Thread Joshua Garnham
. From: Shawn Erickson shaw...@gmail.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Wednesday, 21 October, 2009 18:02:55 Subject: Re: Sending a Selector to another Class. On Wed, Oct 21, 2009 at 9:23 AM, Joshua Garnham

Re: Sending a Selector to another Class.

2009-10-21 Thread Joshua Garnham
Ah, I see. so I need to send it to an instance of the class not the class it self. How would I do that? Thanks, Josh. From: Jens Alfke j...@mooseyard.com To: Jim Kang jimk...@gmail.com Cc: Joshua Garnham joshua.garn...@yahoo.co.uk; cocoa-dev@lists.apple.com

Re: Triggering a Method when a Core Data Property changes.

2009-10-17 Thread Joshua Garnham
{ [self addObserver:[NSApp delegate] forKeyPath:@name options:NSKeyValueObservingOptionNew context:nil]; } But how would I trigger an action when the name property changes? Cheers, Josh. From: Kyle Sluder kyle.slu...@gmail.com To: Joshua Garnham joshua.garn

Adding 'Help' to your App.

2009-10-13 Thread Joshua Garnham
Hi, Just wondering if there is some documentation on how to add 'help' to your app. Cheers. ___ 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

Re: Adding 'Help' to your App.

2009-10-13 Thread Joshua Garnham
Thanks, I'll take a look at that. From: Eric Gorr mail...@ericgorr.net To: Joshua Garnham joshua.garn...@yahoo.co.uk; Mailing List Cocoa cocoa-dev@lists.apple.com Sent: Tuesday, 13 October, 2009 17:44:17 Subject: Re: Adding 'Help' to your App. On Oct 13

Re: Adding 'Help' to your App.

2009-10-13 Thread Joshua Garnham
Some good links in that email, thanks! From: M. Moore ahero2l...@gmail.com To: Eric Gorr mail...@ericgorr.net Cc: Joshua Garnham joshua.garn...@yahoo.co.uk; Mailing List Cocoa cocoa-dev@lists.apple.com Sent: Tuesday, 13 October, 2009 17:55:43 Subject: Re

Removing an Object with A Certain Title from an NSTreeController.

2009-10-10 Thread Joshua Garnham
Hi, I am wondering how I could delete an object depending on it's title for the CoreData 'name' property I have. To Add an Object I use this code: NSManagedObjectContext *moc = [self managedObjectContext]; JGManagedObject *theParent = [NSEntityDescription

Re: Removing an Object with A Certain Title from an NSTreeController.

2009-10-10 Thread Joshua Garnham
To: Joshua Garnham joshua.garn...@yahoo.co.uk Sent: Saturday, 10 October, 2009 13:04:06 Subject: Re: Removing an Object with A Certain Title from an NSTreeController. 2009/10/10 Joshua Garnham joshua.garn...@yahoo.co.uk Hi, I am wondering how I could delete an object depending on it's title

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Joshua Garnham
withObject:object withObject:keyPath]; } Is there something wrong that is blatantly obvious? Cheers, Josh. From: Volker in Lists volker_li...@ecoobs.de To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Tuesday, 6 October, 2009

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Joshua Garnham
Hi, That works now, Thanks Very Much!!! Josh. From: Volker in Lists volker_li...@ecoobs.de To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Wednesday, 7 October, 2009 18:04:59 Subject: Re: Triggering a Method when a Core Data

Triggering a Method when a Core Data Property is Altered.

2009-10-06 Thread Joshua Garnham
Hi. I am trying to trigger a method when A Core Data property is changed, e.g A Text Fields Text in a Table (connected to Core Data) is changed. I have looked into Key Value Observing but haven't had much luck. Cheers. ___ Cocoa-dev mailing list

Re: Deleting CalTasks through an Array.

2009-10-01 Thread Joshua Garnham
Hi, Thanks, It works now I've fixed the warnings. Cheers. From: Stamenkovic Florijan flor...@mac.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev cocoa-dev@lists.apple.com Sent: Thursday, 1 October, 2009 13:32:20 Subject: Re: Deleting CalTasks

Deleting CalTasks through an Array.

2009-09-30 Thread Joshua Garnham
I have an Array of strings and want to remove CalTasks with titles of any of the strings. I know I can loop through a array with for(NSString *title in array) { } and delete tasks with removeTask:title error:nil But it won't let me delete a CalTask object with the strings from the Array

Making the Text in a Text Cell change color when the Rows Checkbox has been checked.

2009-09-22 Thread Joshua Garnham
I have a NSOutlineView and I want to make the text for a row change color when the check box on that row has been checked. How would I do that? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Retrieving the selected object in an NSOutlineView.

2009-09-16 Thread Joshua Garnham
I am looking to retrieve the selected object in an NSOutlineView so I can see if the selected object has any children. How would I do this? I know the NSTreeController has selectedObject but how would I implement this and then check if it has children. Cheers!

Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Joshua Garnham
How would I do this? The Outline View is being used with Core Data. Cheers, 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

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Joshua Garnham
: Steven Degutis steven.degu...@gmail.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Monday, 7 September, 2009 17:20:50 Subject: Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children. Josh

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Joshua Garnham
); } } From: Kyle Sluder kyle.slu...@gmail.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com Sent: Monday, 7 September, 2009 17:52:26 Subject: Re: Making an NSAlert be displayed when the User attempts to delete a row from

Re: Making an Outline View delete a rows children when the parent is deleted.

2009-09-06 Thread Joshua Garnham
I would like the Data to be deleted permanently. Cheers, Josh. From: Jack Carbaugh intrn...@aol.com To: Joshua Garnham joshua.garn...@yahoo.co.uk Cc: cocoa-dev@lists.apple.com Sent: Saturday, 5 September, 2009 22:37:00 Subject: Re: Making an Outline View

Making an Outline View delete a rows children when the parent is deleted.

2009-09-05 Thread Joshua Garnham
How would I make a rows children be deleted when the parent is deleted? Cheers, 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

Re: Starting editing for a Row as soon as it is Added.

2009-08-28 Thread Joshua Garnham
Thanks Very Much Sean. Just 2 Questions, Where do I put the Code? and How will the method know when a Row is Added? Cheers, Josh. From: Sean McBride s...@rogue-research.com To: Joshua Garnham joshua.garn...@yahoo.co.uk; cocoa-dev@lists.apple.com Sent: Thursday

Starting editing for a Row as soon as it is Added.

2009-08-27 Thread Joshua Garnham
I have an NSOutlineView and what I want to happen is that when a row is added I want the row that has been added to Start Editing immediately like when you double click on a row. Cheers, Josh. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

How do I make a header row have a gradient background in my NSOutlineView?

2009-08-20 Thread Joshua Garnham
I am using an NSOutlineView in my App so i downloaded Apples Photo Search Sample App which uses an NSOutlineView. While using it I noticed that it gives the root/header object of the outline view a Gradient Background, so I looked through the code but I couldn't see what did it. Would someone mind

Starting editing for a Row as soon as it is Added.

2009-08-19 Thread Joshua Garnham
Hi There, I have an NSOutlineView and what I want to happen is that when a row is added I want the row that has been added to Start Editing immediately like when you double click on a row. I have had a go using the code below (but as I'm not that Confident with Cocoa) it did not work. -

Starting editing for a Row as soon as it is Added. (More Detail)

2009-08-19 Thread Joshua Garnham
Hi There, I have an NSOutlineView and what I want to happen is that when a row is added I want the row that has been added to Start Editing immediately like when you double click on a row. I have had a go using the code below (but as I'm not that Confident with Cocoa) it did not work. -

Making an NSOutlineView by Default have 1 Parent and 1 Child.

2009-08-10 Thread Joshua Garnham
What I am trying to do is that when my App is first opened the NSOutlineView will already have A Parent and A Child, the child being inside the parent, like in this picture, http://www.grabup.com/uploads/7490ffebda697ef976c3d6a3b57323ba.png. What code would I need to do this? Thanks, Josh.

Adding Padding To The ‘left’ of a Text Field.

2009-08-07 Thread Joshua Garnham
I have a text field with a background but to make it look right the text field needs to have some padding (or a slight indent) on the left side of it a bit like the NSSearchField (because of the search image). How would I give the text field some padding on the left? Thanks, Josh.

Setting The Line Height Of A NSTextField.

2009-08-07 Thread Joshua Garnham
I have a Sub-Classed NSTextFieldCell and am looking for some code to adjust the line height for each line so it looks right on the background of my NSTextField. Thanks, Josh. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Method Signature Problem.

2009-06-12 Thread Joshua Garnham
I am getting the Error/Warning about a part of my code saying 'Messages Without A Matching Method Signature will be assumed to return 'id' and accept '…' as arguments.)' I do not understand why I am getting this error, so please help, below is a link to that part of code in the implementation