Re: Transparent layer-backed views

2009-11-16 Thread Dave Keck
You need to set the window's background color: [window setBackgroundColor: [NSColor clearColor]]; (Although I'm not sure why this is only necessary when the window's content view is layer-backed.) BTW, slick website and product... wish I knew what it said. :)

real beginner question

2009-11-16 Thread Luca Ciciriello
Hi All. I'm a real beginner in Objective-C/Cocoa developing and I have two questions. First of all I want to ask to you if exists a list dedicated to beginners as I am. This in order to not bother the real programmers in this developer list with real beginner question. The second question (th

Re: Where are the interface builder components?

2009-11-16 Thread Alfonso Urdaneta
Sandro Noël wrote: Greetings. I'm kind of annoyed with the 1867 A.D. controls that are in interface builder. Every time i want to do something visually cool, I can see the lines of code piling up If you want to do something cool you have to ditch IB and actually start writing code, that's ju

Re: Where are the interface builder components?

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 1:13 AM, Alfonso Urdaneta wrote: > If you want to do something cool you have to ditch IB and actually start > writing code, that's just the way it is. This is not true. While you can't really build a new user interface control using Interface Builder, you can assemble the

Re: Where are the interface builder components?

2009-11-16 Thread Alfonso Urdaneta
Kyle Sluder wrote: On Mon, Nov 16, 2009 at 1:13 AM, Alfonso Urdaneta wrote: If you want to do something cool you have to ditch IB and actually start writing code, that's just the way it is. This is not true. While you can't really build a new user interface control using Interface Builder, y

Re: real beginner question

2009-11-16 Thread Sebastian Morsch
Dear Luca, 1. IMHO, providing help for beginners is one aspect of this list. There are some people with extraordinary teaching skills registered here! As long as you do some initial research (Apple Docs, Google, etc) before posting and respect common mailing list etiquette, I'd say it's f

RE: real beginner question

2009-11-16 Thread Luca Ciciriello
Thanks Sebastian. I'll read very carefully the paper you suggest. Bye. Luca. > From: sebastianmor...@mac.com > To: luca_cicirie...@hotmail.com > Subject: Re: real beginner question > Date: Mon, 16 Nov 2009 10:39:26 +0100 > CC: Cocoa-dev@lists.apple.com > > Dear Luca, > > 1. IMHO, prov

Applying inline styles to a WebKit - Cocoa application.

2009-11-16 Thread Gustavo Pizano
Hello and sorry if this is not the list to ask this. Im making a simple webkit-cocoa app that mainly will retrieve prebuilt layouts (HTML pages) and components(div, span etc) form a server, and shows them in the application in a panel, then I will drag the layout and start placing inside compon

Custom background in NSTableHeaderView

2009-11-16 Thread Symadept
Hi, I am trying to display custom image and the attributed text into the TableHeaderview. For this I am retrieving the HeaderCell of each TableColumn and setting its image and attributed text. Then I found out If I set image first and then text next, only attributed text shown with the default hea

Re: SFAuthorization

2009-11-16 Thread Nyxem
Ok, thanks for helping me Kyle. I'll take a look to BetterAuthorizationSample code. Nyxem On Nov 16, 2009, at 8:13 AM, Kyle Sluder wrote: > On Sun, Nov 15, 2009 at 10:39 AM, nyx...@gmail.com wrote: >> If i understood correctly, the function AuthorizationExecuteWithPrivileges() >> executes the

Re: NSFileManager thread safety?

2009-11-16 Thread Gregory Weston
David Cake wrote: > The following code snippet works fine from my main thread. >NSFileManager *tempFileManager = [[NSFileManager alloc] init]; >NSString *path= [self tempDirPath]; >if(![tempFileManager removeItemAtPath: path error: nil]) { >NSLog(@"failed to remov

Re: retain and don`t retain in accessor methods

2009-11-16 Thread Austin Ziegler
On Sun, Nov 15, 2009 at 10:35 AM, Clark Cox wrote: > On Sat, Nov 14, 2009 at 11:35 PM, Ariel Feinerman > wrote: >> 2009/11/15 Kyle Sluder >>> On Sat, Nov 14, 2009 at 2:35 PM, Ariel Feinerman >>> wrote: >>> > I need two versions of -initWith ... and -set ... methods of custom timer >>> > class

Re: Applying inline styles to a WebKit - Cocoa application.

2009-11-16 Thread Alastair Houghton
On 16 Nov 2009, at 10:35, Gustavo Pizano wrote: > Hello and sorry if this is not the list to ask this. I think WebKit does have its own mailing lists, but I can't think why the Cocoa part of WebKit would be off topic here... > I saw the method replaceSelectionWithMarkupString: , in the WebView

Re: Applying inline styles to a WebKit - Cocoa application.

2009-11-16 Thread Gustavo Pizano
Hello Alastair. In fact I found a example and it shows something applying a css style, so I will see how can I port that to my app, it will be on wednesday the first priority task. Simplifying, the create a DOMElement variable, get the element form the DOMDocument, and then the do something l

Re: Performance

2009-11-16 Thread Jeremy Pereira
On 16 Nov 2009, at 06:14, Chris Carson wrote: > > The application runs pretty well, and running it through the Leaks instrument > there are no leaks except for 16-bytes when the application is first starting > caused by IOUSBLib. However, looking at it in the Activity Monitor, the real > memo

Re: How can a plug-in bundle get access to its own resources?

2009-11-16 Thread Steve Christensen
I understand your frustration, but as I said, one class instance per process is a feature of the Objective-C runtime and has been the case since before there was an OS X. Please understand that having 200 plug- ins, all using the same class name, is not a typical situation. You are doing it

Re: real beginner question

2009-11-16 Thread David Rowland
On Nov 16, 2009, at 12:18 AM, Luca Ciciriello wrote: Hi All. I'm a real beginner in Objective-C/Cocoa developing and I have two questions. First of all I want to ask to you if exists a list dedicated to beginners as I am. This in order to not bother the real programmers in this develo

Re: Where are the interface builder components?

2009-11-16 Thread Scott Ribe
> But where are the ones from apple... that's what i'm wondering, > Why do we have to duplicate work that evidently has already been done. > I'm confused as why apple is not including it in it's development tools. > it makes no sense to me... Because it takes longer to release new UI widgets as ge

Re: Performance

2009-11-16 Thread Matt Neuburg
On Sun, 15 Nov 2009 22:14:32 -0800 (PST), Chris Carson said: >The application runs pretty well, and running it through the Leaks instrument there are no leaks except for 16-bytes when the application is first starting caused by IOUSBLib. However, looking at it in the Activity Monitor, the real mem

Re: How can a plug-in bundle get access to its own resources?

2009-11-16 Thread Alastair Houghton
On Nov 15, 2009, at 11:35 PM, Motti Shneor wrote: > Thank you all, and thank you Steve - I think the point is clear now. > > However, I'm afraid this limit renders the whole Obj-C interface for plug-ins > impractical for any medium-to-large company with legacy code. Not really, no. > There is

setToolTip: not working

2009-11-16 Thread Ben Haller
I'm having difficulty setting tooltips on some views in code. This should be a simple matter of calling setToolTip: on the views in question, as far as I can tell from the docs, but that is not working for me. I surfed the various lists for prior questions about this, and found several,

Re: real beginner question

2009-11-16 Thread Scott Ribe
> The second question (the technical one) is: Exists a Functional Programming > stile (property/functionality) I can use in Objective-C 2.0 (I am a Haskell > programmer and a C++ programmer)? Well, "blocks", Apple has added something rather similar to anonymous or naked methods, closures, what hav

Creation date of Feb 14th 1946 - Why?

2009-11-16 Thread Matt Gough
Can someone let me know if there is something magical about a file having its creation date set to: 1946-02-14 08:34:56 + I am guessing it is a special flag used by Finder to let it know that a file is busy (since even after a restart a file with such a creation date is shown dimmed) Am I

Re: Performance

2009-11-16 Thread Michael Ash
On Mon, Nov 16, 2009 at 1:14 AM, Chris Carson wrote: > The application runs pretty well, and running it through the Leaks instrument > there are no leaks except for 16-bytes when the application is first starting > caused by IOUSBLib. However, looking at it in the Activity Monitor, the real > m

Re: CALayer Transitions

2009-11-16 Thread Matt Neuburg
On Sun, 15 Nov 2009 22:38:04 -0600, Gordon Apple said: >What I don't understand, is that, according to the core animation guide, >kCATransition seems to be what I want for a key instead of "sublayers". The >guide says this is triggered by "replaceSublayer: with:". However, stepping >it throu

Re: Creation date of Feb 14th 1946 - Why?

2009-11-16 Thread Mark Woollard
It was the day ENIAC, the first general purpose electronic computer was revealed to the world. I guess you can't have a digital file created before that ;-) Mark On 16 Nov 2009, at 17:16, Matt Gough wrote: > Can someone let me know if there is something magical about a file having its > creat

NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kevin
I searched the archives on this issue and found several posts with the same question with zero responses. Is NSUndoManager simply not supported in a modal window? Can one of the Apple engineers confirm this? Here's a recap of the problem I'm running into: I have a simple Core Data app whic

Re: Authorization Samples for Cocoa?

2009-11-16 Thread Nick Zitzmann
On Nov 15, 2009, at 7:09 PM, Laurent Daudelin wrote: > The BLAuthentication class uses "AuthorizationExecuteWithPrivileges" which > doesn't seem to allow to pass a description like "AuthorizationRightSet" > seems to allow. I've searched for some samples but they are all very outdated > (from 2

Re: iPhone: Having a touch point want to find layer it is in

2009-11-16 Thread David Duncan
On Nov 12, 2009, at 11:53 PM, Tino Rachui wrote: > I have a UIView and a hierarchy of CALayers added to the views layer. When a > touch event occurs I can get the 'locationInView' for instance but what is > the best way to find the top most visible CALayer in the views layer > hierarchy? I played

Re: Authorization Samples for Cocoa?

2009-11-16 Thread Laurent Daudelin
On Nov 16, 2009, at 09:37, Nick Zitzmann wrote: > > On Nov 15, 2009, at 7:09 PM, Laurent Daudelin wrote: > >> The BLAuthentication class uses "AuthorizationExecuteWithPrivileges" which >> doesn't seem to allow to pass a description like "AuthorizationRightSet" >> seems to allow. I've searched

Re: Synchronization & Core Data

2009-11-16 Thread Karolis Ramanauskas
Hmm, So I am reading this ("Core Data: Apple's API for Persisting Data on Mac OS X") and I see: 1. It covers sync services, which, I understand, I can't use to sync with iPhone. 2. It covers core-data for iPhone in general, however that doesn't solve my specific problem. 3. It covers the networki

Re: CALayer Transitions

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 9:23 AM, Matt Neuburg wrote: > On Sun, 15 Nov 2009 22:38:04 -0600, Gordon Apple said: >>    What I don't understand, is that, according to the core animation guide, >>kCATransition seems to be what I want for a key instead of "sublayers".  The >>guide says this is triggere

Re: retain and don`t retain in accessor methods

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 5:18 AM, Austin Ziegler wrote: > Is that true anymore, though? I've been looking at a lot of sample > code lately, and it's very common practice to use "self.foo = ..." in > initializers, even when they're declared nonatomic. I know you said > you don't subscribe to it, but

Re: CALayer Transitions

2009-11-16 Thread Gordon Apple
OK, straight out of the core animation guide section on Layer Actions: "The CALayer class provides default action objects­instances of CAAnimation, a CAAction protocol compliant class­for all animatable layer properties. CALayer also defines the following action triggers t

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Keary Suska
On Nov 16, 2009, at 10:34 AM, Kevin wrote: > I searched the archives on this issue and found several posts with the same > question with zero responses. Is NSUndoManager simply not supported in a > modal window? Can one of the Apple engineers confirm this? > > Here's a recap of the problem I'm

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kevin
Thanks for the reply. To answer your question, the windowWillReturnUndoManager: delegate method in my modal window controller returns the temporary MOC's undo manager: - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window { return [self.temporaryMOC undoManager]; } I have con

Re: CALayer Transitions

2009-11-16 Thread Matt Neuburg
On Mon, 16 Nov 2009 10:25:07 -0800, Kyle Sluder said: >On Mon, Nov 16, 2009 at 9:23 AM, Matt Neuburg wrote: >> On Sun, 15 Nov 2009 22:38:04 -0600, Gordon Apple said: >>>    What I don't understand, is that, according to the core animation guide, >>>kCATransition seems to be what I want for a key

Re: CALayer Transitions

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 11:01 AM, Matt Neuburg wrote: > Nothing here "runs contrary to the documentation." We're now talking apples > and oranges. The "key" used in addAnimation:forKey: (such as kCATransition) > has nothing whatever to do with the "key" that arrives in > actionForLayer:forKey:. Th

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 10:50 AM, Kevin wrote: > I have confirmed that undo/redo is getting called on the temporary MOC's > undo manager as I can have changes in the main window, none of which are > affected if I undo/redo in the modal window. This isn't necessarily a confirmation of that. Check

opening a document via Finder without NSDocument

2009-11-16 Thread Philip White
Hello, Could someone point me to some examples showing how to respond to open document events without using NSDocumentController? I think I've figured out that I need to register to receive those events with NSAppleEventManager but I'm having trouble figuring out exactly how to do this.

Accessing FilesOwner fm controller

2009-11-16 Thread Harry Plate
I am writing a plugin to another application, and I must manage my own NIBs. I have been successful loading them and getting some of the basic UI elements working. But, what I am having trouble with is communicating with "File's Owner". When I instantiate the NIB, I pass my class as owner - then

Re: opening a document via Finder without NSDocument

2009-11-16 Thread Nick Zitzmann
On Nov 16, 2009, at 12:15 PM, Philip White wrote: > Could someone point me to some examples showing how to respond to open > document events without using NSDocumentController?

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-16 Thread BJ Homer
Does the stack-based idiom allow returning an autoreleased object? I'd think you'd end up with code like this: - (id)arrayWithStuff { StackAutoreleasePool(); NSArray *array = [NSArray arrayWithObjects:obj1, obj2, etc, nil]; return array; } which would essentially translate into: - (id)arr

Re: opening a document via Finder without NSDocument SOLVED

2009-11-16 Thread Philip White
Thanks! Boy do I feel silly. I guess I'm not used to the layout of the new Snow Leopard docs, what with NSApplicationDelegate having its own page. Anyway, I sure spent a lot of time being frustrated by NSAppleEventManager. Thanks again! Case closed, Philip On Nov 16, 2009, at 1:27 PM,

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-16 Thread Clark Cox
On Mon, Nov 16, 2009 at 11:28 AM, BJ Homer wrote: > Does the stack-based idiom allow returning an autoreleased object? No. It does not. For the autoreleased object to survive the destruction of the C++ object, it would have to be autoreleased after it's destruction. Though, if you're planning on

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kevin
On Nov 16, 2009, at 1:12 PM, Kyle Sluder wrote: On Mon, Nov 16, 2009 at 10:50 AM, Kevin wrote: I have confirmed that undo/redo is getting called on the temporary MOC's undo manager as I can have changes in the main window, none of which are affected if I undo/redo in the modal window. T

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 1:08 PM, Kevin wrote: >> Maybe try abandoning -groupsByEvent? > > I did and it worked. Calling [[self.temporaryMOC undoManager] > setGroupsByEvent:NO] did the trick. > > Although I'm ecstatic that it worked, I'm not sure why it did. Many thanks > for suggesting that. Well

How to stop NSScrollView from scrolling to top when horizontally resizing contained NSTextView?

2009-11-16 Thread Lyndsey Ferguson
Hello Everyone, I have a NSTextView for which I want to display a horizontal scroll bar. Following some leads on the internet, I have most of it working except that I am having problems with the vertical scroll bar. What I have done is to find the width of the longest line (in pixels with the giv

Trouble with NSSegmentedControl

2009-11-16 Thread Dave DeLong
Hi everyone, I'm having an issue with NSSegmentedControl. My control has two segments. Segment 0 has an image of NSAddTemplate, and segment 1 has an image of NSRemoveTemplate. Segment 0 is always enabled, and segment 1 is conditionally enabled. Segment 0 has a menu, segment 1 does not. The

NSOpenPanel accessoryView and new windows...

2009-11-16 Thread Harry Plate
I am successful creating/defining an accessoryView for an NSOpenPanel. However, I find that some secondary windows that are displayed as a result of a button in that accessory view, do not get displayed properly, nor am I able to get keyboard focus to that window. When I say "properly", the new w

Re: Accessing FilesOwner fm controller

2009-11-16 Thread Ken Thomases
On Nov 16, 2009, at 1:21 PM, Harry Plate wrote: > I am writing a plugin to another application, and I must manage my own NIBs. > But, what I am having trouble with is communicating with "File's Owner". > When I instantiate the NIB, I pass my class as owner - then when the > controller is called v

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-16 Thread Ken Thomases
On Nov 16, 2009, at 1:50 PM, Clark Cox wrote: > Though, if you're planning on returning an > autoreleased object, you're already assuming that there is an > autorelease pool in place, in which case, there is no need to wrap the > local function in your own pool. > You wouldn't want to wrap such a

Re: NSPopUpButton submenu's

2009-11-16 Thread SRD
> Hierarchical menus can be confusing because there are so many layers to keep > track of: menus, items, etc.  In the code above, log the title of the > selected item.  Is it what you expect? I do log the titles and they are not what I expect, for example, the code below produces the output below

Re: Accessing FilesOwner fm controller

2009-11-16 Thread Graham Cox
On 17/11/2009, at 6:21 AM, Harry Plate wrote: > But, what I am having trouble with is communicating with "File's Owner". > When I instantiate the NIB, I pass my class as owner - then when the > controller is called via -awakeFromNib, I need to communicate with that > class to get some additional

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kevin
After some more experimenting: It works for the first few edits after which the behavior reverts to "undo/redo in bunches". And you're right, I shouldn't have to do setGroupsByEvent:NO when in fact it's the opposite of what I want. In short, this remains an issue. I'm perplexed as to why th

Re: Trouble with NSSegmentedControl

2009-11-16 Thread Seth Willits
On Nov 16, 2009, at 2:09 PM, Dave DeLong wrote: How can I achieve the behavior that I'm looking for (and that is implied in the documentation)? NSSegmentedControl, like NSSplitView, leaves *much* to be desired. Over time, my solution has evolved into an NSSegmentedControl subclass with a

message to zombie NSWindowController

2009-11-16 Thread James Walker
When running on Tiger, my NSWindowController subclass that runs a modal preferences dialog gets a retain message after it has been deallocated. I can't reproduce this on Snow Leopard. The backtrace starts: #0 0x92cc5fb8 in -[_NSZombie retain] () #1 0x92c2f1cc in -[NSInvocation retainArgumen

Re: Where are the interface builder components?

2009-11-16 Thread Sandro Noël
Thank you all for your feedback! I guess i'll have to make my own. I just find it sad to have to duplicate work, it's unproductive. cheers! Sandro Noel. On 2009-11-16, at 11:53 AM, Scott Ribe wrote: >> But where are the ones from apple... that's what i'm wondering, >> Why do we have to duplica

Dependent/injected tests vs. linker visibility

2009-11-16 Thread Jim Correia
[Moved from Xcode-Users since it really isn’t an Xcode issue.] I have some dependent/injected unit tests to test application-specific functionality. I've added a test that calls a C function which is defined in the application. This causes a link-time error because, by default, applications

Re: NSFileManager thread safety?

2009-11-16 Thread Joar Wingfors
On 16 nov 2009, at 04.07, Gregory Weston wrote: > Given Dave Keck's correct comment that threading shouldn't even come up in > the situation you describe, I should point out that according to the docs the > result of sending init to an NSFileManager object in 10.5 is undefined. If > you're tes

Re: Trouble with NSSegmentedControl

2009-11-16 Thread Dave DeLong
Thanks to Seth and his subclass of NSSegmentedControl, I have this working exactly as I had hoped! Cheers, Dave On Nov 16, 2009, at 7:44 PM, Seth Willits wrote: > > On Nov 16, 2009, at 2:09 PM, Dave DeLong wrote: > >> How can I achieve the behavior that I'm looking for (and that is implied i

How to replace ComboBoxCell with TextFieldCell when not editing

2009-11-16 Thread Symadept
Hi, I want to replace the ComboBoxCell with TextFieldCell when I am not editing the cell and shall be replaced with ComboBoxCell when clicked on that particular cell. Any pointers highly appreciable. Regards symadept ___ Cocoa-dev mailing list (Cocoa-d

Re: How to replace ComboBoxCell with TextFieldCell when not editing

2009-11-16 Thread Graham Cox
On 17/11/2009, at 4:25 PM, Symadept wrote: > I want to replace the ComboBoxCell with TextFieldCell when I am not editing > the cell and shall be replaced with ComboBoxCell when clicked on that > particular cell. Any pointers highly appreciable. You're not learning, are you? http://catb.org/~es

Enabling keyboard shortcuts in nswindow

2009-11-16 Thread Lorenzo Thurman
I have an NSStatusItem where I am using an NSWindow as it's About Box. When displayed, I can close the window via a mouse click, but not with the cmd w shortcut. I've looked In Apple documents about this, but the documentation assumes a document based app where this action is tied to the fi

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Rob Keniger
On 17/11/2009, at 12:41 PM, Kevin wrote: > After some more experimenting: It works for the first few edits after which > the behavior reverts to "undo/redo in bunches". And you're right, I shouldn't > have to do setGroupsByEvent:NO when in fact it's the opposite of what I want. > > In short, t

Re: NSUndoManager and runModalForWindow: (again)

2009-11-16 Thread Kyle Sluder
On Mon, Nov 16, 2009 at 9:50 PM, Rob Keniger wrote: > If you have a paid dev membership, now might be the time to use a support > incident I think. I'd file a Radar first. There is a workaround that isn't completely insane, and either the documentation or the implementation is wrong. DTS incide