Re: Using NSTrackingArea on overlay child windows

2008-06-08 Thread Ron Fleckner
On 09/06/2008, at 1:24 PM, Markus Spoettl wrote: On Jun 8, 2008, at 5:57 PM, Ron Fleckner wrote: I think you need to explicitly set the transparent window as accepting first responder. By default, borderless windows aren't included in the repsonder chain. I think you are right. I did so

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Peter Duniho
Date: Mon, 9 Jun 2008 01:03:16 -0400 From: John Engelhart <[EMAIL PROTECTED]> On Jun 7, 2008, at 10:10 PM, Michael Ash wrote: If you don't like undefined behavior, then C-based languages are a poor choice. If you don't like nondeterministic object lifetimes, then garbage collection is a poor

Re: applications list on Multi monitor

2008-06-08 Thread Andrew Farmer
On 08 Jun 08, at 22:34, Apparao Mulpuri wrote: In my Multi monitor application, i have to list out application names with respect to each monitor. Ex: Lets say Monitor 1(Primary monitor) having iTunes, AddressBook, Calculator and TextEdit(Multi Doc) application windows and Monitor2 having TextEd

applications list on Multi monitor

2008-06-08 Thread Apparao Mulpuri
Hi List, In my Multi monitor application, i have to list out application names with respect to each monitor. Ex: Lets say Monitor 1(Primary monitor) having iTunes, AddressBook, Calculator and TextEdit(Multi Doc) application windows and Monitor2 having TextEdit and Mail application windows. For

Re: Garbage collector vs variable lifetime

2008-06-08 Thread John Engelhart
On Jun 7, 2008, at 10:10 PM, Michael Ash wrote: On Sat, Jun 7, 2008 at 6:37 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: On Sat, Jun 7, 2008 at 7:35 PM, Michael Ash <[EMAIL PROTECTED]> wrote: This is pretty nitpicky. If it's in scope but you don't use it, then it doesn't matter. Kind of lik

Re: Using a Core Data relationship binded to an NSTokenField

2008-06-08 Thread William Turner
On Jun 8, 2008, at 2:53 PM, Orestis Markou wrote: I have a list of articles, binded to an NSArrayController binded to an NSTableView. Each article can have multiple authors, which I want to display in one row, using an NSTokenField. It seems like the NSTokenField expects an NSArray, and it

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Chris Hanson
On Jun 8, 2008, at 5:39 PM, John Engelhart wrote: On Jun 7, 2008, at 7:11 PM, Chris Hanson wrote: This won't happen because each message expression -- just as with function-call expressions -- is a sequence point. The compiler can't know what side-effects [data self] might have, so it can'

Re: uint64_t and NSNumber

2008-06-08 Thread Andrew Farmer
On 08 Jun 08, at 20:40, Adam Thorsen wrote: I'm trying to store a uint64_t in an NSNumber object, but when I try to retrieve the value of the object, I get 0. - (void)updateLastEventId:(uint64_t *) eventId { printf("eventId %llu \n", eventId); This should throw a compiler warning. (If it

uint64_t and NSNumber

2008-06-08 Thread Adam Thorsen
I'm trying to store a uint64_t in an NSNumber object, but when I try to retrieve the value of the object, I get 0. - (void)updateLastEventId:(uint64_t *) eventId { printf("eventId %llu \n", eventId); //This results in something like: lastEventId = [NSNumber numberWithUnsignedLongLon

Re: Using NSTrackingArea on overlay child windows

2008-06-08 Thread Markus Spoettl
On Jun 8, 2008, at 5:57 PM, Ron Fleckner wrote: I think you need to explicitly set the transparent window as accepting first responder. By default, borderless windows aren't included in the repsonder chain. I think you are right. I did some experimenting and it appears the updateCursor:

Re: Bring app to front

2008-06-08 Thread Andy Lee
On Jun 8, 2008, at 11:06 PM, Kyle Sluder wrote: Why would you want to do this? It's annoying enough that in Windows XP Microsoft disabled this functionality. If you want to get the user's attention, the bouncing dock icon is a very good indication. I agree in most cases, but in case you have

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-08 Thread Kyle Sluder
On Fri, Jun 6, 2008 at 6:53 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: > So for an array of NSNumbers you could use -description and a > -numericCompare: method that uses NSNumericSearch. In my opinion, it makes > more sense to use -self and -compare: for NSDate/NSNumber. To me, option 1 onl

Re: Bring app to front

2008-06-08 Thread Kyle Sluder
On Sun, Jun 8, 2008 at 10:43 PM, Adam Gerson <[EMAIL PROTECTED]> wrote: > I want to be able to pop up an alert message even when my app is not > the front most app. How can I bring my app to the front, or how can I > cause the system to display an alert window in front of all open > windows of any

symbol(s) not found

2008-06-08 Thread kim
All: I had a successful project going, everything would build and run just fine... but it had a bit of an oddness left over from the example skeleton I used (I'm a stark raving newbie) so I moved all of the files to a fresh xcode project and now when it tries to build it fails in the link

Bring app to front

2008-06-08 Thread Adam Gerson
I want to be able to pop up an alert message even when my app is not the front most app. How can I bring my app to the front, or how can I cause the system to display an alert window in front of all open windows of any application? Thanks, Adam ___ Coco

Re: crash in outlineView:isGroupItem:

2008-06-08 Thread Nathan Kinsinger
On Jun 8, 2008, at 4:02 PM, Joan Lluch (casa) wrote: Ok, I did it. This is now a confirmed bug. To reproduce it: Modify the OutlineEdit example as follows: 1- In IB add set the "highlight" property of the outlineView to "Source List" 2- In IB set the delegate of the outlineView to the "ow

Re: totally confused by bindings settings

2008-06-08 Thread Daniel Child
You could also establish the bindings through File's Owner.delegate.. It amounts to the same thing for this nib. In other nibs, the application delegate won't actually be in that same nib, and so the ability to refer to it via a key path from either the File's Owner or the Application sta

Re: Using NSTrackingArea on overlay child windows

2008-06-08 Thread Ron Fleckner
I think you need to explicitly set the transparent window as accepting first responder. By default, borderless windows aren't included in the repsonder chain. HTH, Ron On 09/06/2008, at 9:30 AM, Markus Spoettl wrote: Hello List, I have the following code which works as expected on a n

Re: Garbage collector vs variable lifetime

2008-06-08 Thread John Engelhart
On Jun 7, 2008, at 7:11 PM, Chris Hanson wrote: On Jun 6, 2008, at 5:36 PM, Quincey Morris wrote: A little inner voice insists on asking, though, how we know some future version of the compiler might not optimize '[data self]' upwards before the loop, if it decides that nothing inside the

async NSOperation and NSOperationQueue

2008-06-08 Thread Wayne Shao
I want to use NSOperationQueue to have at most 5 NSOperation running. However, my operation is asynchronous. >From the documentation: If you are creating a concurrent operation, you need to override the following methods: - start - isConcurrent - isExecuting - isFinis

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Chris Kane
On Jun 7, 2008, at 6:59, Ricky Sharp wrote: I will hope though that within the context of say memcpy, that the GC thread could not collect data. For example, the following should be safe: memcpy(myLocalGCAwareBuffer, [data bytes], numberOfBytes); No. This is equivalent to: void *tmp0734

Using NSTrackingArea on overlay child windows

2008-06-08 Thread Markus Spoettl
Hello List, I have the following code which works as expected on a normal NSView in a normal window. However it does not work when used on a view hosted on a completely transparent overlay window. The overlay is a child window of a normal NSDocument main window in case that matters. I'v

crash in outlineView:isGroupItem:

2008-06-08 Thread casa
I am using outlineView:isGroupItem delegate method to create an NSOutlineView that mimics the look of Mail.app or iTunes - (BOOL)outlineView:(NSOutlineView *)sender isGroupItem:(id)item { return ( item && [[item representedObject] isKindOfClass: [GroupNode class]] ) ; } My oulineView

Using a Core Data relationship binded to an NSTokenField

2008-06-08 Thread Orestis Markou
Hello, I've been looking everywhere to find a solution to this: I have a list of articles, binded to an NSArrayController binded to an NSTableView. Each article can have multiple authors, which I want to display in one row, using an NSTokenField. It seems like the NSTokenField expects an

crash in outlineView:isGroupItem:

2008-06-08 Thread casa
I am using outlineView:isGroupItem delegate method to create an NSOutlineView that mimics the look of Mail.app or iTunes - (BOOL)outlineView:(NSOutlineView *)sender isGroupItem:(id)item { return ( item && [[item representedObject] isKindOfClass: [GroupNode class]] ) ; } My oulineVi

Re: crash in outlineView:isGroupItem:

2008-06-08 Thread Joan Lluch (casa)
El 08/06/2008, a las 22:11, Kyle Sluder escribió: On Sun, Jun 8, 2008 at 1:37 PM, Joan Lluch (casa) <[EMAIL PROTECTED]> wrote: return ( item && [[item representedObject] isKindOfClass:[GroupNode class]] ) ; Style note: you don't need to do this. [[item representedObject] isKindOfClass:[G

Re: simple text compression in Cocoa

2008-06-08 Thread Kyle Sluder
On Sun, Jun 8, 2008 at 3:26 AM, Wayne Shao <[EMAIL PROTECTED]> wrote: > I want to make it inconvenient to read this data from a debugger. So I try > to find an easy way to compress it or simply obfuscate it. This is an exercise in futility. Unless you have some contractual or legal obligation to

Re: crash in outlineView:isGroupItem:

2008-06-08 Thread Kyle Sluder
On Sun, Jun 8, 2008 at 1:37 PM, Joan Lluch (casa) <[EMAIL PROTECTED]> wrote: >return ( item && [[item representedObject] isKindOfClass:[GroupNode > class]] ) ; Style note: you don't need to do this. [[item representedObject] isKindOfClass:[GroupNode class]] will work just fine, because messag

Re: Is there a way to efficiently access NSArray element contents?

2008-06-08 Thread Jean-Daniel Dupas
Le 8 juin 08 à 20:51, Joan Lluch (casa) a écrit : El 08/06/2008, a las 20:13, Brent Fulgham escribió: I've been enjoying the NSArray/NSMutableArray classes as I work with various user interface features for a program I'm working on that interacts with a legacy C++ library. I've recently

Cocoaheads Lake Forest (93620) meeting Wednesday, 6/18 at 7pm

2008-06-08 Thread Scott Ellsworth
The next CocoaHeads: Wednesday June 18, 2008 07:00 PM PDT at Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630. CocoaHeads Lake Forest will be meeting on the third Wednesday in June, the week after WWDC. We will be meeting, as usual, in the community r

Re: Is there a way to efficiently access NSArray element contents?

2008-06-08 Thread Joan Lluch (casa)
El 08/06/2008, a las 20:13, Brent Fulgham escribió: I've been enjoying the NSArray/NSMutableArray classes as I work with various user interface features for a program I'm working on that interacts with a legacy C++ library. I've recently begun considering how to efficiently display the c

Re: Is there a way to efficiently access NSArray element contents?

2008-06-08 Thread Jean-Daniel Dupas
Le 8 juin 08 à 20:13, Brent Fulgham a écrit : I've been enjoying the NSArray/NSMutableArray classes as I work with various user interface features for a program I'm working on that interacts with a legacy C++ library. I've recently begun considering how to efficiently display the content

Is there a way to efficiently access NSArray element contents?

2008-06-08 Thread Brent Fulgham
I've been enjoying the NSArray/NSMutableArray classes as I work with various user interface features for a program I'm working on that interacts with a legacy C++ library. I've recently begun considering how to efficiently display the contents of a binary data stream. Currently I'm appendi

crash in outlineView:isGroupItem:

2008-06-08 Thread Joan Lluch (casa)
I am using outlineView:isGroupItem delegate method to create an NSOutlineView that mimics the look of Mail.app or iTunes - (BOOL)outlineView:(NSOutlineView *)sender isGroupItem:(id)item { return ( item && [[item representedObject] isKindOfClass: [GroupNode class]] ) ; } My oulin

Re: Java and Objective-C

2008-06-08 Thread Denis Bohm
On Jun 8, 2008, at 3:43 AM, Michael Ash wrote: On Sun, Jun 8, 2008 at 1:48 AM, Peter Duniho <[EMAIL PROTECTED]> wrote: So, when you write "true proxying of method invocations", what does that mean, exactly? Distributed Objects is probably the best example in terms of real-world use of a t

Re: Hillegass Book 3rd ed. ScreenShots differ?

2008-06-08 Thread John Joyce
XCode 3.1? thanks all! That much is enough to be reassuring. I was simply wondering if I had some Preference setting off, or if there was an update I wasn't finding with the changes to the ADC site. As I work at Apple, I respect the list rules and NDAs. (and I only use prerelease if I'm t

Re: Hillegass Book 3rd ed. ScreenShots differ?

2008-06-08 Thread Uli Kusterer
Am 08.06.2008 um 08:28 schrieb Oscar Morales Vivo: Seeing as Xcode 3.1 is under NDA (as far as I can tell) I hope Apple doesn't take it on Aaron for using it. His book is the best thing there is for bringing newbies into Cocoa (and Aaron himself is a treasure) and it would be petty to start

Re: NSPopupButton Item to Create New Object

2008-06-08 Thread Keary Suska
6/7/08 10:21 PM, also sprach [EMAIL PROTECTED]: > I have an NSPopupButton bound to an NSArrayController to provide > options for the user to select from. What I would like to do is have > one option (probably the first item) in the popup for the user to > select that would allow them to create a n

Re: zlib in 10.4 and 10.5

2008-06-08 Thread James Bucanek
Trygve Inda wrote (Sunday, June 8, 2008 1:25 AM -): Is zlib in all versions of 10.4 and 10.5? Yes. I use zlib extensively in my application, which runs on 10.4 and 10.5. Will any version of zlib always uncompress something created with a different version?

Re: Hillegass Book 3rd ed. ScreenShots differ?

2008-06-08 Thread Oscar Morales Vivo
Seeing as Xcode 3.1 is under NDA (as far as I can tell) I hope Apple doesn't take it on Aaron for using it. His book is the best thing there is for bringing newbies into Cocoa (and Aaron himself is a treasure) and it would be petty to start a ruckus on that. On Jun 8, 2008, at 11:21 , Uli K

Re: Hillegass Book 3rd ed. ScreenShots differ?

2008-06-08 Thread Uli Kusterer
Am 08.06.2008 um 08:07 schrieb John Joyce: Anyway, I'm sitting down with my new Mac, and the 3rd ed. of the Hillegass book, and the thing I notice is that when starting a New Project, the window for selecting an XCode template still appears basically the same as in XCode 2.x, but in the Hil

Re: Hillegass Book 3rd ed. ScreenShots differ?

2008-06-08 Thread Torsten Curdt
XCode 3.1? On Jun 8, 2008, at 08:07, John Joyce wrote: Maybe this should go to the XCode list, but I know there was much talk about the 3rd edition of "the" book here. Anyway, I'm sitting down with my new Mac, and the 3rd ed. of the Hillegass book, and the thing I notice is that when starti

Hillegass Book 3rd ed. ScreenShots differ?

2008-06-08 Thread John Joyce
Maybe this should go to the XCode list, but I know there was much talk about the 3rd edition of "the" book here. Anyway, I'm sitting down with my new Mac, and the 3rd ed. of the Hillegass book, and the thing I notice is that when starting a New Project, the window for selecting an XCode temp

How to implement floating HUD on fullscreen NSOpenGLView ?

2008-06-08 Thread Mike
I think this is more related to general cocoa so I post it here. I have OpenGL-view which can be toggled to fullscreen or not. ( [self enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; ) This seems to work very well and is extremely simple solution. However I was hoping to get me

Re: Converting a MenuRef to a NSMenu

2008-06-08 Thread Uli Kusterer
Am 08.06.2008 um 05:11 schrieb Felipe Monteiro de Carvalho: I just meant that maybe, this is possible. AFAIK, no. There's (undocumented, Apple-private) SPI to get the MenuRef used for showing an NSMenu, but since an NSMenu is (sort of) a superset of a MenuRef, going the other way round is

Re: NSTreeControllerTreeNode not documented? [solved]

2008-06-08 Thread Joan Lluch (casa)
El 08/06/2008, a las 13:31, Norbert Heger escribió: On Jun 8, 2008, at 11:28 , Joan Lluch (casa) wrote: An NSOutlineView which is binded to a NSTreeController gives instances of NSTreeControllerTreeNode in the item (or items) parameter of their datasource or delegate methods. For example

Re: App hangs when displaying any sheet in 10.5 [SOLVED]

2008-06-08 Thread Graham Cox
These sounded just the ticket... but unfortunately they generate literally thousands of unwarranted warnings, so again, if they do pick up genuine transgressions it is way below the noise floor. Almost every call to a Cocoa instance method (or one private to my code for that matter) generat

Re: App hangs when displaying any sheet in 10.5 [SOLVED]

2008-06-08 Thread Graham Cox
No, this is not it. The method definitely did have a prototype - in fact it had *two*, differing only in return type. Judging by the assembler code, it used the one returning an int (actually an enum) not a float. It's still unclear why this generated code that trashed memory, but it did. I

Re: Converting a MenuRef to a NSMenu

2008-06-08 Thread Felipe Monteiro de Carvalho
I just meant that maybe, this is possible. -- Felipe Monteiro de Carvalho ___ 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.a

Re: NSTreeControllerTreeNode not documented?

2008-06-08 Thread Norbert Heger
On Jun 8, 2008, at 11:28 , Joan Lluch (casa) wrote: An NSOutlineView which is binded to a NSTreeController gives instances of NSTreeControllerTreeNode in the item (or items) parameter of their datasource or delegate methods. For example: - (BOOL)outlineView:(NSOutlineView *)outlineView wr

Re: Java and Objective-C

2008-06-08 Thread Jean-Daniel Dupas
Le 8 juin 08 à 12:43, Michael Ash a écrit : On Sun, Jun 8, 2008 at 1:48 AM, Peter Duniho <[EMAIL PROTECTED]> wrote: So, when you write "true proxying of method invocations", what does that mean, exactly? Distributed Objects is probably the best example in terms of real-world use of a techn

Re: Java and Objective-C

2008-06-08 Thread Michael Ash
On Sun, Jun 8, 2008 at 1:48 AM, Peter Duniho <[EMAIL PROTECTED]> wrote: > So, when you write "true proxying of method invocations", what does that > mean, exactly? Distributed Objects is probably the best example in terms of real-world use of a technique which is difficult in stricter languages. C

Re: 3rd Party Nonsense (was Re: Regular Expressions?)

2008-06-08 Thread Michael Ash
On Sat, Jun 7, 2008 at 7:19 PM, Mark Munz <[EMAIL PROTECTED]> wrote: > On 6/7/08, Michael Ash <[EMAIL PROTECTED]> wrote: > >> Of course Mac OS X does come with a regex library, it just doesn't >> have an ObjC interface. There's more to what's available than Cocoa, >> and one of the great things

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Paul Sargent
On 8 Jun 2008, at 01:23, Bill Bumgarner wrote: One of the tenets of GCC is that *it controls the layout of the stack always* and this is done quite explicitly because of performance. I think this is the crucial point when considering how any GC will work with gcc. If gcc controls the s

Re: Cocoa n00b frustrations

2008-06-08 Thread Andreas Mayer
Am 08.06.2008 um 05:29 Uhr schrieb Andy Lee: If you look at the docs for NSControl you'll see the following delegate methods, which may be what you want: Yes. And since Andy was too humble to mention it, let me do so: Instead of Apple's online documentation or the Xcode doc browser, you

NSTreeControllerTreeNode not documented?

2008-06-08 Thread casa
An NSOutlineView which is binded to a NSTreeController gives instances of NSTreeControllerTreeNode in the item (or items) parameter of their datasource or delegate methods. For example: - (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard

zlib in 10.4 and 10.5

2008-06-08 Thread Trygve Inda
Is zlib in all versions of 10.4 and 10.5? Will any version of zlib always uncompress something created with a different version? I am thinking to store some compressed data on our site that a Cocoa app will need to download and would like to compress it. This will be for NSData in a plist. Any e

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Hamish Allan
On Sun, Jun 8, 2008 at 3:10 AM, Michael Ash <[EMAIL PROTECTED]> wrote: > In many cases, including this one, the release build is actually > exposing faulty code, whereas the debug build is hiding it by working > as the programmer wants it to despite the code not actually being > correct. My thank

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Hamish Allan
On Sun, Jun 8, 2008 at 1:23 AM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > Consider: > > { >int foo; > >... calculate on foo ... > >int bar = getirdone(foo); > >while(1) { >func(bar); >func2(bar); >... etc ... >} > } > > Without being able to recycle th

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Hamish Allan
Hi Peter, On Sun, Jun 8, 2008 at 1:15 AM, Peter Duniho <[EMAIL PROTECTED]> wrote: > Maybe it's just because I've been using GC systems more than you have, and > so I've gotten used to thinking about memory allocations in the paradigm > that GC systems impose. I'm starting to realise that this is

simple text compression in Cocoa

2008-06-08 Thread Wayne Shao
Hi, I have a chunk of plain text (about 2K bytes) in memory, most of which is static. Since this data reveals main logic of my algorithm, I want to make it inconvenient to read this data from a debugger. So I try to find an easy way to compress it or simply obfuscate it. Note that, it is fine if