Does somebody know good tag-editor implementation?

2009-01-25 Thread Vitaly Ovchinnikov
Hello all, I need to add tags to my records-editing application and do not want to reinvent a wheel. Please point me to the applications that already have good tag editor. By tags I mean words or phrases that can be "linked" to the record. I need to enter these words manually or select them from t

Re: Opening Symbolic Links

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Rob Keniger wrote: On 24/01/2009, at 11:46 PM, Gerriet M. Denkmann wrote: I have a text file, called Text. I did in Terminal: ln -s Text SymlinkToText When I try to open SymlinkToText in TextEdit "SymlinkToText" is shown in the Open Panel, but when I select it, the

Re: NSRunloop performSelector needs CFRunLoopWakeUp ?

2009-01-25 Thread Michael Ash
On Sun, Jan 25, 2009 at 12:47 PM, David Hoerl wrote: > Thanks to those who have posted on this, and suggested workarounds. However, > in a simple non-threaded app, this call should work, no? And perhaps the 0 > time timer would also suffer the same fate. Well as I said, the documentation says tha

Re: Getting pixel color from NSView

2009-01-25 Thread John C. Randolph
On Jan 25, 2009, at 11:06 AM, Ashley Perrien wrote: Is there a way to get the color of a pixel or area of an NSView during the drawRect method? Sure. Have a look at this: http://developer.apple.com/samplecode/Color_Sampler/index.html NSReadPixel() will tell you the color of the pixel near

Re: NSArray KVC proxy

2009-01-25 Thread Quincey Morris
On Jan 25, 2009, at 15:54, Jeff Johnson wrote: Ok, I understand. The question is, other than saving a few characters, how is calling more convenient than calling valueForKey:@""? It makes quite a difference to readability, I think. Also, Refactor... works on property names but no

Re: addSubview bottleneck

2009-01-25 Thread douglas welton
Hi Josh, I would echo Andreas' advice and tell you to not use NSViews to accomplish this task. I would suggest that you take a closer look at the problem domain and re-factor along the lines of the data you manage and the drawn representation of that data. NSViews are great containers fo

Re: NSArray KVC proxy

2009-01-25 Thread Jeff Johnson
On Jan 25, 2009, at 4:32 PM, Quincey Morris wrote: On Jan 25, 2009, at 13:20, Jeff Johnson wrote: If you want to implement the getter , then you don't need to implement countOfXxxx and objectInXxxxAtIndex:. Since your backing store is not an array, the implementation of the getter shoul

Re: Knowing when a NSArrayController is ready

2009-01-25 Thread Ben Trumbull
I would ask you the same question I just asked someone else on the list: are you using the XML persistent storage format? Because, if so, you must expect some delay, since even before you fetch any objects the entire XML file must be loaded into memory and parsed. I use XML because I want h

Re: NSArray KVC proxy

2009-01-25 Thread Quincey Morris
On Jan 25, 2009, at 13:20, Jeff Johnson wrote: If you want to implement the getter , then you don't need to implement countOfXxxx and objectInXxxxAtIndex:. Since your backing store is not an array, the implementation of the getter should create and return an array. In the docs for KVC c

Re: Dates of the Chinese New Year

2009-01-25 Thread Kevin Ross
On Jan 25, 2009, at 12:12 PM, Nick Zitzmann wrote: On Jan 25, 2009, at 11:55 AM, Kevin Ross wrote: I see that in the docs that the Chinese calendar is not supported on 10.4-5. Does anyone know if one of the other calendars (NSBuddhistCalendar or NSJapaneseCalendar maybe?) would be able t

Re: Getting pixel color from NSView

2009-01-25 Thread Andrew Farmer
On 25 Jan 09, at 11:06, Ashley Perrien wrote: Is there a way to get the color of a pixel or area of an NSView during the drawRect method? I'll be tiling the view with a grid of random colors but each tile is based on the colors around it... While there are some methods you can use to determ

Core Data performance [Re: Knowing when a NSArrayController is ready]

2009-01-25 Thread Ben Trumbull
On 24 Jan 2009, at 18:41, Matt Neuburg wrote: On or about 1/24/09 10:17 AM, thus spake "jonat...@mugginsoft.com" : I am also having horrible performance problems. A data set of 1500 items with a total on disk size of 1.8MB is taking more than 30 secs to load. Maybe NSArrayController -fetchW

Scrolling Title in IKImageBrowserView?

2009-01-25 Thread Brad Gibbs
Is it possible to set the title of an image in an IKImageBrowserView to scroll when the item is selected? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: NSArray KVC proxy

2009-01-25 Thread Jeff Johnson
On Jan 25, 2009, at 2:54 PM, Quincey Morris wrote: Consider a class with an array property '' implemented KVC- compliantly by the following methods: - (NSUInteger) countOfXxxx; - (id) objectInXxxxAtIndex: (NSUInteger) index; (Assume there's no NSArray instance variable bac

Displaying an NSSet in a Single Table Cell?

2009-01-25 Thread Brad Gibbs
I have a Core Data app for cataloging objects. Each object has a to- many relationship for Type that describes the type of the object. An object can have multiple types (hence, the to-many relationship...) -- usually 2-4 types per object. Objects are displayed in a table, one per row. I m

NSArray KVC proxy

2009-01-25 Thread Quincey Morris
Consider a class with an array property '' implemented KVC- compliantly by the following methods: - (NSUInteger) countOfXxxx; - (id) objectInXxxxAtIndex: (NSUInteger) index; (Assume there's no NSArray instance variable backing this property.) So, users of the class can cal

Re: CFHTTP +authentication

2009-01-25 Thread Peter Blazejewicz
hi John, On Jan 25, 2009, at 8:21 PM, John Michael Zorko wrote: Hello, all ... I guess this is more of a Core Foundation question, but it still seemed more apropos to this list than Carbon-dev. Please let me know if i'm wrong :-) there is better group then Carbon-dev: http://lists.apple.

Re: Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread João Varela
No, isKindOfClass check for the superclass. It returns true if self class is myClass or a subclass of myClass. You should use isMemberOfClass: to got something equivalent. Yes, you are right. Thanks for pointing it out. because in the first example we are calling -class: in [self class

Re: Dates of the Chinese New Year

2009-01-25 Thread Nick Zitzmann
On Jan 25, 2009, at 11:55 AM, Kevin Ross wrote: I see that in the docs that the Chinese calendar is not supported on 10.4-5. Does anyone know if one of the other calendars (NSBuddhistCalendar or NSJapaneseCalendar maybe?) would be able to find the beginning of the Chinese New Year? The

Re: CFHTTP +authentication

2009-01-25 Thread Alex Kac
Could you use asyncsocket? Its a Cocoa class built using CFNetworking and sockets and makes working with NSURL type stuff very very easy. asyncSocket = [[AsyncSocket alloc] initWithDelegate:self]; [asyncSocket connectToHost:[url host] onPort:80 error:nil]; CFHTTPMessageRef htt

Re: Targeting Tiger

2009-01-25 Thread John Joyce
On Jan 24, 2009, at 8:31 PM, cocoa-dev-requ...@lists.apple.com wrote: Not sure what you mean by "capable of running tiger". If you have a machine capable of running Leopard, it should be able to run tiger. Not true. In general, any Mac requires the latest OS available at the time it

Re: Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 09 à 19:54, João Varela a écrit : On 2009/01/25, at 18:02, João Varela wrote: So you mean that if ( self == [aReceiver class] ) is the same as if ( [self class] == [aReceiver class] ) ? Yes it is. Just a simple snippet to try to help you to understand. We are ok to say

Re: Getting pixel color from NSView

2009-01-25 Thread Volker in Lists
Hi, one possibility, even so I doubt it is the most elegant, is to create a BitmapRepresentation of the view and get the color from this image. More elegant would be, if you would be able to use the information from the "tiling method", for example by storing the random colors in an array

CFHTTP +authentication

2009-01-25 Thread John Michael Zorko
Hello, all ... I guess this is more of a Core Foundation question, but it still seemed more apropos to this list than Carbon-dev. Please let me know if i'm wrong :-) I'm trying to handle URLs in this format: http://:@this.url.com/content ... with the and filled in of course. I found

Getting pixel color from NSView

2009-01-25 Thread Ashley Perrien
Is there a way to get the color of a pixel or area of an NSView during the drawRect method? I'll be tiling the view with a grid of random colors but each tile is based on the colors around it. I'd prefer to call something along the lines of: NSColor *aColor = [myView colorAtPoint: somePoint

Dates of the Chinese New Year

2009-01-25 Thread Kevin Ross
Hello everyone, I see that in the docs that the Chinese calendar is not supported on 10.4-5. Does anyone know if one of the other calendars (NSBuddhistCalendar or NSJapaneseCalendar maybe?) would be able to find the beginning of the Chinese New Year? Any insights would be much appreciate

Re: Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread João Varela
On 2009/01/25, at 18:02, João Varela wrote: So you mean that if ( self == [aReceiver class] ) is the same as if ( [self class] == [aReceiver class] ) ? Yes it is. Just a simple snippet to try to help you to understand. We are ok to say that in a method, self represents the receiver.

Re: Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread mmalc Crawford
On Jan 25, 2009, at 10:02 AM, João Varela wrote: I think the following comparison is semantically wrong: if ( self == [MyClass class] ) mmalc __

Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread João Varela
So you mean that if ( self == [aReceiver class] ) is the same as if ( [self class] == [aReceiver class] ) ? Yes it is. Just a simple snippet to try to help you to understand. We are ok to say that in a method, self represents the receiver. Now have a look at this call: [PDFDocument al

Re: NSRunloop performSelector needs CFRunLoopWakeUp ?

2009-01-25 Thread David Hoerl
Thanks to those who have posted on this, and suggested workarounds. However, in a simple non-threaded app, this call should work, no? And perhaps the 0 time timer would also suffer the same fate. The project has a checkbox so the user can enable the CFWakeup. To convince myself this was not ca

How to know that DOMHTMLElement is loaded?

2009-01-25 Thread Vitaly Ovchinnikov
Hello all, I use WebView to print reports and have to change its contents on the fly via DOMHTMLElement's -setInnerHTML method (I have accessory control that allows to select what to print). HTML strings that I use may have images, WebView loads them in background and I need to wait until they are

Re: Knowing when a NSArrayController is ready

2009-01-25 Thread Matt Neuburg
On or about 1/25/09 8:08 AM, thus spake "jonat...@mugginsoft.com" : > I also made use of -setUsesLazyFetching. Not an option for me, alas, as my app must run on Tiger. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ pantes anthropoi tou eidenai oregontai phusei Among th

Re: Knowing when a NSArrayController is ready

2009-01-25 Thread jonat...@mugginsoft.com
On 24 Jan 2009, at 18:41, Matt Neuburg wrote: On or about 1/24/09 10:17 AM, thus spake "jonat...@mugginsoft.com" : I am also having horrible performance problems. A data set of 1500 items with a total on disk size of 1.8MB is taking more than 30 secs to load. Maybe NSArrayController -fetchWit

Re: Forcing allocation of a subclass

2009-01-25 Thread Michael Ash
On Sun, Jan 25, 2009 at 9:31 AM, João Varela wrote: > Hi Jean-Daniel > > Yes, when I re-read what I wrote I know it can cause confusion. Of course > 'self' is a pointer to a class instance, not to a class, but I didn't know > that 'self' was itself a method. Can you point me to the documentation w

Re: Using the security framework

2009-01-25 Thread Michael Ash
On Sun, Jan 25, 2009 at 3:19 AM, Kyle Sluder wrote: > On Sat, Jan 24, 2009 at 9:29 PM, Michael Ash wrote: >> I'm afraid I don't understand this advice. Could you explain what sort >> of vulnerability would exist in a custom install tool that would not >> exist when using Installer.app to install

Re: Forcing allocation of a subclass

2009-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 09 à 15:31, João Varela a écrit : Hi Jean-Daniel Yes, when I re-read what I wrote I know it can cause confusion. Of course 'self' is a pointer to a class instance, not to a class, but I didn't know that 'self' was itself a method. No, self is not a method, it's a parameter.

Re: Using the security framework

2009-01-25 Thread Michael Ash
On Sun, Jan 25, 2009 at 12:54 AM, Chris Hanson wrote: > On Jan 24, 2009, at 6:29 PM, Michael Ash wrote: > >> On Sat, Jan 24, 2009 at 6:08 PM, Chris Hanson wrote: >>> >>> Among other things, to be truly secure you must use a secure installation >>> mechanism. Do not write your own install tool —

Re: addSubview bottleneck

2009-01-25 Thread Michael Ash
On Sat, Jan 24, 2009 at 5:29 PM, Twisted Theory wrote: > Hi, > > I am constructing an application that draws rooted trees (graphs with a > distinguished 'first' node) by creating an NSView subclass for each node and > adding them as subviews of the graph view. > > There is a big problem when the n

Re: Forcing allocation of a subclass

2009-01-25 Thread João Varela
Hi Jean-Daniel Yes, when I re-read what I wrote I know it can cause confusion. Of course 'self' is a pointer to a class instance, not to a class, but I didn't know that 'self' was itself a method. Can you point me to the documentation where that is written? Of course "+ [NSObject class]"

Re: Forcing allocation of a subclass

2009-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 09 à 14:50, João Varela a écrit : Olá António I think your method must be corrected like this: On 2009/01/25, at 07:28, cocoa-dev-requ...@lists.apple.com wrote: @implementation PDFDocument (PDFDocument_Alloc) + (id)replacementAllocWithZone:(NSZone *)zone { if ([self cl

Re: Forcing allocation of a subclass

2009-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 09 à 14:50, João Varela a écrit : Olá António I think your method must be corrected like this: On 2009/01/25, at 07:28, cocoa-dev-requ...@lists.apple.com wrote: @implementation PDFDocument (PDFDocument_Alloc) + (id)replacementAllocWithZone:(NSZone *)zone { if ([self cl

Re: Forcing allocation of a subclass

2009-01-25 Thread João Varela
Olá António I think your method must be corrected like this: On 2009/01/25, at 07:28, cocoa-dev-requ...@lists.apple.com wrote: @implementation PDFDocument (PDFDocument_Alloc) + (id)replacementAllocWithZone:(NSZone *)zone { if ([self class] == [PDFDocument class]) { re

Re: Opening Invisible Files

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Rob Keniger wrote: On 24/01/2009, at 11:40 PM, Gerriet M. Denkmann wrote: I want my NSOpenPanel to show all files - same as the Finder does, if one adds AppleShowAllFiles = YES to: ~/Library/Preferences/ com.apple.finder.plist. Is there a way to accomplish this? K

Re: Opening Symbolic Links

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Rob Keniger wrote: On 24/01/2009, at 11:46 PM, Gerriet M. Denkmann wrote: I have a text file, called Text. I did in Terminal: ln -s Text SymlinkToText When I try to open SymlinkToText in TextEdit "SymlinkToText" is shown in the Open Panel, but when I select it, the

Re: Not Resolving Aliases

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Michael Ash wrote: On Sat, Jan 24, 2009 at 9:54 AM, Gerriet M. Denkmann wrote: When I do: [ sharedWorkspace openFile: @"/path/to/symlink" withApplication: @"SomeApp" ] then "SomeApp" does NOT get "/path/to/symlink" but the content of the symlink. Same for Al

Re: Coverflow like background drawing?

2009-01-25 Thread Kyle Sluder
On Sat, Jan 24, 2009 at 7:10 PM, Alex Kac wrote: > UIKit/AppKit are not thread-safe meaning we should never do drawing on a > background thread. Yet, if we have say 5 views and for performance reasons > we want the main view to draw first and then the other 4 to draw in the > background like how C

Re: Using the security framework

2009-01-25 Thread Kyle Sluder
On Sat, Jan 24, 2009 at 9:29 PM, Michael Ash wrote: > I'm afraid I don't understand this advice. Could you explain what sort > of vulnerability would exist in a custom install tool that would not > exist when using Installer.app to install a custom package? It's vulnerable to a timing flaw. In o