Re: How to get tapped text from UITextView

2010-04-30 Thread Sasikumar JP
Alex, I can draw the text using NSString's drawing method. But I am not clear how to get the tapped String using touch point or GCRect. I don't any direct method to get the String by passing CGPoint or CGRect. I was able to successfully implement this feature by creating CATextLayer for

Problem posting mails

2010-04-30 Thread Reinhard Segeler
I have a problem to post mails here, even though other members of the list can see and read my mail, they don't appear in Mail on my Mac. Right now I changed a setting and I hope it helps. I have contacted the master, but got no solution that helped. Sorry, if misusing the list. _

Re: Crash setting NSManagedObject attributes

2010-04-30 Thread Quincey Morris
On Apr 30, 2010, at 20:51, Rick Mann wrote: > I added a couple of Int 32 attributes to an otherwise-working > NSManagedObject. The object has a custom NSManagedObject subclass. The > properties are named "sequence" and "type." I can read them without problem, > but setting them causes an EXEC_

Re: Crash setting NSManagedObject attributes

2010-04-30 Thread Rick Mann
On Apr 30, 2010, at 21:02:08, Rick Mann wrote: > > On Apr 30, 2010, at 20:51:37, Rick Mann wrote: > >> I added a couple of Int 32 attributes to an otherwise-working >> NSManagedObject. The object has a custom NSManagedObject subclass. The >> properties are named "sequence" and "type." I can

Re: Crash setting NSManagedObject attributes

2010-04-30 Thread Rick Mann
On Apr 30, 2010, at 20:51:37, Rick Mann wrote: > I added a couple of Int 32 attributes to an otherwise-working > NSManagedObject. The object has a custom NSManagedObject subclass. The > properties are named "sequence" and "type." I can read them without problem, > but setting them causes an E

Crash setting NSManagedObject attributes

2010-04-30 Thread Rick Mann
I added a couple of Int 32 attributes to an otherwise-working NSManagedObject. The object has a custom NSManagedObject subclass. The properties are named "sequence" and "type." I can read them without problem, but setting them causes an EXEC_BAD_ACCESS. Doesn't matter which one I attempt to set

Re: Is there a better way to delete all objects in a MOC & persistent store?

2010-04-30 Thread Mike Abdullah
This has come up many times in the archives. Yes, you must do a fetch and delete each object in turn. On 1 May 2010, at 00:18, Michael A. Crawford wrote: > Or, am I forced to iterate through the results of a fetch calling > deleteObject for each object found? > > -Michael > ___

Is there a better way to delete all objects in a MOC & persistent store?

2010-04-30 Thread Michael A. Crawford
Or, am I forced to iterate through the results of a fetch calling deleteObject for each object found? -Michael ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 4:57 PM, Sean McBride wrote: > On Fri, 30 Apr 2010 16:52:56 -0400, Izak van Langevelde said: > >>> - if so, roll your own >> >> That brings me back to my question: how do I create matching black windows? > > By writing code to draw a custom window. You might start here: > <

Re: Design pattern for collection of items and many subsets

2010-04-30 Thread Quincey Morris
On Apr 30, 2010, at 14:29, Trygve Inda wrote: > What is the best way to arrange my arrays and Array Controllers for all this > to happen on the fly without having to refilter all the previous messages? > > Eg it does not seem efficient to call > > [myArray filteredArrayUsingPredicate:predicate]

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
Quincey - you were right. The undo wasn't working because the windowController wasn't in the document's windowController array. I used your concept of reusing the same windowController and it works. Thanks! On Apr 30, 2010, at 4:12 PM, Quincey Morris wrote: > On Apr 30, 2010, at 12:44,

Re: Design pattern for collection of items and many subsets

2010-04-30 Thread Trygve Inda
Let me re-phrase this to make it more clear. I have something like Mail. It receives "messages" and these get stored in a "master box". I have dumbBoxes which are lists that the user can drag messages to. I also have smartBoxes that filter based on criteria. Right now, when the user clicks on a

Re: Process type

2010-04-30 Thread Peter Ammon
On Apr 30, 2010, at 1:18 PM, Matthew Mashyna wrote: > I have an app that acts as a monitor for some other critical apps and one > thing the spec calls for is the need to look at other running apps and figure > out if they are running in 32 or 64 bit mode. The Activity monitor knows > this. How

Re: Matching the style of a HUD?

2010-04-30 Thread Sean McBride
On Fri, 30 Apr 2010 16:52:56 -0400, Izak van Langevelde said: >> - if so, roll your own > >That brings me back to my question: how do I create matching black windows? By writing code to draw a custom window. You might start here:

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 3:22 PM, Murat Konar wrote: > On Apr 30, 2010, at 12:02 PM, Izak van Langevelde wrote: > >> Maybe I'm overlooking something trivial, but an NSPanel with HUD style is >> still an NSPanel, and not a window: I cannot seem to get the minimize and >> maximize buttons in the title

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 3:21 PM, Jens Alfke wrote: > > On Apr 30, 2010, at 12:02 PM, Izak van Langevelde wrote: > >> Maybe I'm overlooking something trivial, but an NSPanel with HUD style is >> still an NSPanel, and not a window: I cannot seem to get the minimize and >> maximize buttons in the titl

Re: Process type

2010-04-30 Thread Jens Alfke
On Apr 30, 2010, at 1:18 PM, Matthew Mashyna wrote: I have an app that acts as a monitor for some other critical apps and one thing the spec calls for is the need to look at other running apps and figure out if they are running in 32 or 64 bit mode. The Activity monitor knows this. How can

Process type

2010-04-30 Thread Matthew Mashyna
I have an app that acts as a monitor for some other critical apps and one thing the spec calls for is the need to look at other running apps and figure out if they are running in 32 or 64 bit mode. The Activity monitor knows this. How can I find a process's bit-ness? Sorry, not sure it if qualif

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Quincey Morris
On Apr 30, 2010, at 12:44, Brad Stone wrote: > [dc openDocumentWith...] is opening the new doc and it'll be associated with > the same windowController in the makeWindowControllers method. I see how > you're doing that. What I don't understand is the documentation for > openDocumentWIthCOntent

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
Yes, I haven't gotten to the second part yet. So, let me see if I understand what you're doing in your first example. You're putting the initial window controller in a global that both the doc and the windowController can get to. When it's time to open a new doc you're saving the current windo

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Quincey Morris
On Apr 30, 2010, at 10:55, Brad Stone wrote: > Think about the Finder. You click on a file, get a preview. If you like it > you can open it. That's what I'm driving at. You click on a row in a > tableView, you get a preview (the opening is in code, I'm storing an index of > file references

Re: Matching the style of a HUD?

2010-04-30 Thread Murat Konar
On Apr 30, 2010, at 12:02 PM, Izak van Langevelde wrote: Maybe I'm overlooking something trivial, but an NSPanel with HUD style is still an NSPanel, and not a window: I cannot seem to get the minimize and maximize buttons in the title bar? Are you really making a HUD or do you just want you

Re: Matching the style of a HUD?

2010-04-30 Thread Jens Alfke
On Apr 30, 2010, at 12:02 PM, Izak van Langevelde wrote: > Maybe I'm overlooking something trivial, but an NSPanel with HUD style is > still an NSPanel, and not a window: I cannot seem to get the minimize and > maximize buttons in the title bar? I think the HI Guidelines only call for HUDs as

Re: test if folder contains file based on NSURLs

2010-04-30 Thread Lee Ann Rucker
It also depends on if they were composited identically. This is how I do it: - (BOOL)isEqualToURL: (NSURL *)inURL // IN { if (![self isFileURL] || ![inURL isFileURL]) { return [self isEqual:inURL]; } /* * [NSURL isEqualTo:] fails when a path has a trailing slash and * an

the case of the missing scroll bar

2010-04-30 Thread Bill Appleton
hi anyone out there, i am having trouble using NSScroller by itself, not in a scroll view, etc. if i open more and more text windows a scroll bar will appear on the right or bottom of each one each window has 2 scroll bars, i have verified there are 2 sub views, but only one appears at a time i

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 2:12 PM, Seth Willits wrote: > On Apr 30, 2010, at 11:05 AM, Izak van Langevelde wrote: > >> I like the look and feel of a HUD, but I am a little disappointed there are >> no other GUI elements that match the HUD style. >> I played with the BWToolkit, which provides transpare

Re: Seeking a graceful way to end a program

2010-04-30 Thread Barry Skidmore
Cocoa design patterns will help with many programmatic decisions such as this and has example code throughout. http://www.amazon.com/Cocoa-Design-Patterns-Erik-Buck/dp/0321535022 Sent from my iPhone On Apr 29, 2010, at 11:52 AM, Abhinay Kartik Reddyreddy > wrote: On Apr 29, 2010, at 2:31 P

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Quincey Morris
On Apr 30, 2010, at 10:55, Brad Stone wrote: > Think about the Finder. You click on a file, get a preview. If you like it > you can open it. That's what I'm driving at. You click on a row in a > tableView, you get a preview (the opening is in code, I'm storing an index of > file references

Re: Strange NSScroller sizing behaviour

2010-04-30 Thread Bill Appleton
hi anyone out there, i have more information on this scroll bar bug if i open more and more text windows the scroll bar (nsscroller) appears on the right or bottom of each one each window has 2 scroll bars, i have verified the 2 sub views, but only one can appear at a time i can't find any grap

Re: Matching the style of a HUD?

2010-04-30 Thread Seth Willits
On Apr 30, 2010, at 11:05 AM, Izak van Langevelde wrote: > I like the look and feel of a HUD, but I am a little disappointed there are > no other GUI elements that match the HUD style. > I played with the BWToolkit, which provides transparent controls that go with > a HUB, but don't see how to

Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
I like the look and feel of a HUD, but I am a little disappointed there are no other GUI elements that match the HUD style. I played with the BWToolkit, which provides transparent controls that go with a HUB, but don't see how to create matching black windows. Any clues? Thanks, Izak --- Grinni

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
Think about the Finder. You click on a file, get a preview. If you like it you can open it. That's what I'm driving at. You click on a row in a tableView, you get a preview (the opening is in code, I'm storing an index of file references in a different NSDocument) and if you like it you open

Re: Help with text input

2010-04-30 Thread Bill Appleton
mine too :) On Fri, Apr 30, 2010 at 10:13 AM, Charles Srstka wrote: > On Apr 30, 2010, at 12:07 PM, Bill Appleton wrote: > > > wow thanks everyone so much > > > > this is working great! > > No problem. World Builder was one of my favorite things of my childhood. > :-) > > Charles > ___

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Quincey Morris
On Apr 30, 2010, at 08:56, Brad Stone wrote: > I want to open NSPersistentDocuments and load them into the same window one > at a time. Excuse the soapbox, but you do realize that from the outside looking in, this *seems* like a terrible idea? If your documents really are documents in the user

Re: Help with text input

2010-04-30 Thread Charles Srstka
On Apr 30, 2010, at 12:07 PM, Bill Appleton wrote: > wow thanks everyone so much > > this is working great! No problem. World Builder was one of my favorite things of my childhood. :-) Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: Help with text input

2010-04-30 Thread Bill Appleton
wow thanks everyone so much this is working great! On Fri, Apr 30, 2010 at 10:04 AM, Douglas Davidson wrote: > > On Apr 30, 2010, at 9:59 AM, Charles Srstka wrote: > > > On Apr 30, 2010, at 11:41 AM, Douglas Davidson wrote: > > > >> Here is the normal sequence when a text-handling view recei

Re: Help with text input

2010-04-30 Thread Douglas Davidson
On Apr 30, 2010, at 9:59 AM, Charles Srstka wrote: > On Apr 30, 2010, at 11:41 AM, Douglas Davidson wrote: > >> Here is the normal sequence when a text-handling view receives key events: >> the keyDown: method passes events to interpretKeyEvents:, which is where >> they enter key binding and

Re: coreData and interapp comm via TCP/IP

2010-04-30 Thread Jens Alfke
On Apr 30, 2010, at 1:00 AM, justin webster wrote: I'm wanting to build an app which functions as both server and client - performing reasonably simple querying and file management between instances of the app across a LAN. each instance needs to keep it's own persistent data as well as be

Re: Help with text input

2010-04-30 Thread Charles Srstka
On Apr 30, 2010, at 11:41 AM, Douglas Davidson wrote: > Here is the normal sequence when a text-handling view receives key events: > the keyDown: method passes events to interpretKeyEvents:, which is where they > enter key binding and input management. They come out either as insertText: > or

Re: Help with text input

2010-04-30 Thread Charles Srstka
On Apr 30, 2010, at 11:40 AM, Bill Appleton wrote: > yep, i'm working on that > > stupid questions: > > do i have to gather & append key events into my array? your example just > sends the current event, so if i do option-key-whatever with multiple key > events will that work? Nope, the text

Re: Help with text input

2010-04-30 Thread Douglas Davidson
On Apr 30, 2010, at 9:32 AM, Charles Srstka wrote: > On Apr 30, 2010, at 11:08 AM, Bill Appleton wrote: > >> don't i need to use interpretKeyEvents to gather the key events until >> insertText is called? > > Yep, just do something like this: > > - (void)keyDown:(NSEvent *)theEvent { >[self

Re: Help with text input

2010-04-30 Thread Bill Appleton
yep, i'm working on that stupid questions: do i have to gather & append key events into my array? your example just sends the current event, so if i do option-key-whatever with multiple key events will that work? and do i need to release the array? you are just sending a new array to interpretke

Re: advancementForGlyph problem

2010-04-30 Thread Dale Miller
For character measurements, if you are using the Cocoa text system, use the font returned by the NSLayoutManager method "subtituteFontForFont:" in order to get the screen font used by Cocoa text. However, experimentally, I found that for font sizes greater than 17, non-integral values are s

Re: Help with text input

2010-04-30 Thread Charles Srstka
On Apr 30, 2010, at 11:08 AM, Bill Appleton wrote: > don't i need to use interpretKeyEvents to gather the key events until > insertText is called? Yep, just do something like this: - (void)keyDown:(NSEvent *)theEvent { [self interpretKeyEvents:[NSArray arrayWithObject:theEvent]]; [NSCurs

Re: Help with text input

2010-04-30 Thread Charles Srstka
On Apr 30, 2010, at 10:48 AM, Bill Appleton wrote: > one issue is that the old carbon kEventTextInputUnicodeForKeyEvent delivered > typed characters that should be inserted into (say) of text field > > the new [event characters] method delivers ALL keys -- so for example, an > arrow key gets a un

Re: Help with text input

2010-04-30 Thread Bill Appleton
hi all, don't i need to use interpretKeyEvents to gather the key events until insertText is called? wow there is very little information on that thx bill On Fri, Apr 30, 2010 at 8:55 AM, Shawn Erickson wrote: > On Fri, Apr 30, 2010 at 8:48 AM, Bill Appleton > wrote: > > hi all, > > >

Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
I want to open NSPersistentDocuments and load them into the same window one at a time. I'm almost there but missing some steps. Hopefully someone can help me. I have a few saved documents on the hard drive. On launch my app opens to an untitled NSPersistentDocument and creates a separate NSW

Re: Help with text input

2010-04-30 Thread Shawn Erickson
On Fri, Apr 30, 2010 at 8:48 AM, Bill Appleton wrote: > hi all, > > this is great, thanks for the help. > > one issue is that the old carbon kEventTextInputUnicodeForKeyEvent delivered > typed characters that should be inserted into (say) of text field > > the new [event characters] method deliver

Re: Help with text input

2010-04-30 Thread Bill Appleton
hi all, this is great, thanks for the help. one issue is that the old carbon kEventTextInputUnicodeForKeyEvent delivered typed characters that should be inserted into (say) of text field the new [event characters] method delivers ALL keys -- so for example, an arrow key gets a unicode equivalent

Re: Help with threads and queues

2010-04-30 Thread Paul Franz
Oooohh. Cool. Definitely going to get it. Paul Franz On Fri, Apr 30, 2010 at 10:55 AM, James Bucanek wrote: > Paul Franz wrote (Thursday, April 29, 2010 > 5:26 AM -0400): > >> I am trying to convert my Java code to Objective-C code and I have run >> into a problem

Re: Help with text input

2010-04-30 Thread Shawn Erickson
On Fri, Apr 30, 2010 at 7:12 AM, Bill Appleton wrote: > hi all, > > thanks for the help > > the characters message gives me the unicode output, that is working fine > > but i am unsure how to detect raw keys, like arrow keys, function keys, etc Take a look in NSEvent.h for various helpful constan

Re: How to get tapped text from UITextView

2010-04-30 Thread Alex Kac
You are going to have to draw the text yourself using NSString's drawing methods and then use the regular touch events and CGRects to do that. Or use a UIWebView with links to each word that you recognize. -- Alex Kac On my mobile device so please excuse the brevity. On Apr 30, 2010, at 12:3

Re: test if folder contains file based on NSURLs

2010-04-30 Thread James Bucanek
Rainer Standke wrote (Thursday, April 29, 2010 7:59 PM -0700): I have a bunch of NSURLs for existing files on the system, and a smaller number of NSRURLs for their enclosing folders. I am looking to determine if a given file is within a given folder, based on their URLs

Re: Help with threads and queues

2010-04-30 Thread James Bucanek
Paul Franz wrote (Thursday, April 29, 2010 5:26 AM -0400): I am trying to convert my Java code to Objective-C code and I have run into a problem. < clip > How do you do the samething in Cocoa/Objective-C? WARNING: Gratuitous, self-serving, book plug coming up

Re: Help with text input

2010-04-30 Thread Paul Sanders
> what is the best way on cocoa to determin raw key (physical key) input? http://developer.apple.com/mac/library/documentation/cocoa/reference/ApplicationKit/Classes/NSEvent_Class/Reference/Reference.html#//apple_ref/doc/uid/2016-keyCode and: http://developer.apple.com/mac/library/documentat

Re: Help with text input

2010-04-30 Thread Bill Appleton
hi Graham, in my case i have to implement a scripting language that receives the key names like "up" "f12" "shift" "home" etc. so i agree it is strange but i need to know the physical key presses its like a video game problem thx bill On Fri, Apr 30, 2010 at 7:15 AM, Graham Cox wrot

Re: Help with text input

2010-04-30 Thread Graham Cox
On 01/05/2010, at 12:12 AM, Bill Appleton wrote: > what is the best way on cocoa to determin raw key (physical key) input? > I don't know, but I wonder if this is the right question. If you look at the methods of NSResponder, you'll see that most functional keys are detected and converted to

Re: Help with text input

2010-04-30 Thread Bill Appleton
hi all, thanks for the help the characters message gives me the unicode output, that is working fine but i am unsure how to detect raw keys, like arrow keys, function keys, etc in carbon/event manager there was charCodeMask and keyCodeMask which determined this stuff what is the best way on co

Design pattern for collection of items and many subsets

2010-04-30 Thread Trygve Inda
I'm trying to determine the best way to build this for scalability, performance and maintainability. I have a Source List which at the top contains a "masterArray" of NSDictionary items. Below that I have several "dumbLists" and "smartLists" which are subsets of the items in the masterArray as de

Re: advancementForGlyph problem

2010-04-30 Thread Graham Cox
On 30/04/2010, at 9:08 PM, steven Hooley wrote: >> From your later response it seems like your question is really > regarding drawing strikethroughs and underlines. If so, the strike > through and underline are not part of the glyph or font - they are > just a line drawn from the start point of a

Re: test if folder contains file based on NSURLs

2010-04-30 Thread Howard Siegel
That will only work if all of the NSURLs all either absolute or relative, and are all either based on the same physical folder paths or are based on the same set of aliases/links. If there are different paths based on different aliases or links, then they won't match. You might think about using

Re: advancementForGlyph problem

2010-04-30 Thread steven Hooley
> The information I am getting back from advancementForGlyph doesn't > seem to be correct. Here are the glyph bounds and advancement for > the capital letter 'A' in Georgia 36pt: > > == A == > bounds x: -0.720703 > bounds y: 0.00 > bounds w: 25.699219 > bounds h: 25.294922 > advance w: 24.1523

Re: coreData and interapp comm via TCP/IP

2010-04-30 Thread Kyle Sluder
On Fri, Apr 30, 2010 at 1:00 AM, justin webster wrote: > on the face of it coreData with bindings seems a good fit except for the > multi client nature of this project. > it seems like a few people have had a go at using Distributed Objects with > the coreData classes but the documentation seems

HTML link tree browser OS component

2010-04-30 Thread jonat...@mugginsoft.com
Is anyone aware of a BSD like licensed component that provides a way of browsing a tree of supplied HTML links? Think: 1. xcode documentation browser style window. 2. tree of external links on the left - supplied as XML. 3. webkit view on the right. 4. search field searches site of currently dis

coreData and interapp comm via TCP/IP

2010-04-30 Thread justin webster
I'm trying to decide on an approach and wondered if you guys ad any thoughts... I'm wanting to build an app which functions as both server and client - performing reasonably simple querying and file management between instances of the app across a LAN. each instance needs to keep it's own persis