Re: Spotlight and Leopard

2009-03-29 Thread Scott Anguish
On 29-Mar-09, at 1:31 AM, Pierce Freeman wrote: Hi everyone. I have been looking into a way to search the user's hard drive for a files and have settled on Spotlight. I will say ahead of time that if anyone has a better way to search for files that are in changing places, I would love

Re: [SOLVED] Re: Can NSTrackingArea rects be nested?

2009-03-29 Thread Quincey Morris
On Mar 28, 2009, at 13:17, Stuart Malin wrote: As for NSTrackingInVisibleRect: I'm a bit mystified by its utility. I had though that what I was achieving by including this option was that the tracking area would not be triggered for parts of the rect that were visually occluded. However,

NSArchiver atomic?

2009-03-29 Thread Michael Vannorsdel
Does anyone know if NSArchiver's archive to file methods do atomic file writes? ___ 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

Custom windows and NSWindowBackingLocationVideoMemory

2009-03-29 Thread Michael Vannorsdel
I have a custom shaped window that refuses to use VRAM as its backing buffer. It's a relatively small borderless window with a semi transparent rounded rect shape. Are there certain things that will prevent a window from using VRAM on supported hardware? Other stock windows do this just

Memory allocation pattern related question

2009-03-29 Thread Daniel Luis dos Santos
Hello, I have a shared library and some client code. In the shared library I am adopting the following method signature pattern : - (int) someMethod: (aType*)someInParam anotherParam: (aType**)someOutParam; I use the return value to indicate success or failure in the execution of the

Re: NSArchiver atomic?

2009-03-29 Thread Jim Correia
On Mar 29, 2009, at 5:39 AM, Michael Vannorsdel wrote: Does anyone know if NSArchiver's archive to file methods do atomic file writes? Yes - anyone who has read the API documentation for those methods knows whether or not they write the files atomically. Jim

Re: Memory allocation pattern related question

2009-03-29 Thread Jason Stephenson
Daniel Luis dos Santos wrote: Hello, I have a shared library and some client code. In the shared library I am adopting the following method signature pattern : - (int) someMethod: (aType*)someInParam anotherParam: (aType**)someOutParam; I use the return value to indicate success or

Re: Memory allocation pattern related question

2009-03-29 Thread Ken Thomases
On Mar 29, 2009, at 8:35 AM, Daniel Luis dos Santos wrote: I have a shared library and some client code. In the shared library I am adopting the following method signature pattern : - (int) someMethod: (aType*)someInParam anotherParam: (aType**)someOutParam; I use the return value to

NSConfused... matrices and NSData

2009-03-29 Thread James Maxwell
Sorry for the long post, but I'm trying to wrap my head around NSData, NSMutableData and matrices. So I made an example to test my (mis)conception of how this all should work. Here it is: - (void)matrixTesting { int numRows = 5; int numCols = 7;

Re: NSConfused... matrices and NSData

2009-03-29 Thread Ken Thomases
On Mar 29, 2009, at 11:43 AM, James Maxwell wrote: Sorry for the long post, but I'm trying to wrap my head around NSData, NSMutableData and matrices. So I made an example to test my (mis)conception of how this all should work. Here it is: - (void)matrixTesting {

Re: NSConfused... matrices and NSData

2009-03-29 Thread Michael Ash
On Sun, Mar 29, 2009 at 12:43 PM, James Maxwell jbmaxw...@rubato-music.com wrote: Sorry for the long post, but I'm trying to wrap my head around NSData, NSMutableData and matrices. So I made an example to test my (mis)conception of how this all should work. There are two ways to store

Re: NSConfused... matrices and NSData

2009-03-29 Thread James Maxwell
Okay, I got it. Thanks, folks. I had seen an example somewhere which, going by Mike's helpful bit of info, must have been in column-major order - so I had things switched around in my head. Actually, when I saw the example it didn't make sense to me, but I just followed it along blindly!

Re: Spotlight and Leopard

2009-03-29 Thread Pierce Freeman
Scott: Thanks for your reply. I more mean what has changed in the actual structure in Spotlight for Leopard. For example, I tried to follow this article: http://oreilly.com/pub/a/mac/2005/07/12/spotlight.html but it seems as if some of the code has been removed from Leopard (HISearchWindowShow,

Re: Spotlight and Leopard

2009-03-29 Thread Greg Guerin
Pierce Freeman wrote: For example, I tried to follow this article: http://oreilly.com/pub/a/mac/2005/07/12/spotlight.html but it seems as if some of the code has been removed from Leopard (HISearchWindowShow, etc). HISearchWindowShow is a Carbon function. If you don't include the

Re: NSArchiver atomic?

2009-03-29 Thread Michael Ash
On Sun, Mar 29, 2009 at 2:57 PM, Michael Vannorsdel mikev...@gmail.com wrote: Guess I should clarify.  Has anyone verified it; I've had an issue with partial writes archiving built-in classes.  The program used to get signals to terminate and archive some basic classes (NSArray, NSString,

Re: NSArchiver atomic?

2009-03-29 Thread Michael Vannorsdel
Guess I should clarify. Has anyone verified it; I've had an issue with partial writes archiving built-in classes. The program used to get signals to terminate and archive some basic classes (NSArray, NSString, NSNumber) to disk. But these files would only contain some of the archive

Re: XMLParser

2009-03-29 Thread David Blanton
/* parser:didStartElement:namespaceURI:qualifiedName:attributes:attributeDi ct */ - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *) elementName namespaceURI:(NSString *)namespaceURI qualifiedName: (NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { }

Re: XMLParser

2009-03-29 Thread David Blanton
acolol way to parse is make you element names method names - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *) elementName namespaceURI:(NSString *)namespaceURI qualifiedName: (NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { elementName =

should release or not? (basic memory management question)

2009-03-29 Thread Ignacio Enriquez
Hi everyone. I still have some doubts of should I release or not? and the most important reaons why should I or why shouldn't I do it. Any answer would be very appreciated. Consider this: NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSArray *rawArray = [defaults

Re: NSArchiver atomic?

2009-03-29 Thread Michael Vannorsdel
Yes no surprise.. But if NSArchiver is indeed atomic I would think the saved file would either be saved complete with new data or complete old data and not with partial data in situations like an untimely crash or resource loss. Unless I have the wrong expectation of atomic file writes,

Re: should release or not? (basic memory management question)

2009-03-29 Thread Clark Cox
On Sun, Mar 29, 2009 at 12:24 PM, Ignacio Enriquez nach...@gmail.com wrote: Hi everyone. I still have some doubts of  should I release or not? and the most important reaons why should I or why shouldn't I do it. Any answer would be very appreciated. Consider this: NSUserDefaults *defaults

Re: NSArchiver atomic?

2009-03-29 Thread Clark Cox
All bets are off if you do unsupported things inside of a signal handler. For instance it is possible that the routines used to write the file *seemed* to complete successfully when they, in fact, didn't. In which case the code went along its merry way and did the rename. On Sun, Mar 29, 2009 at

Re: Spotlight and Leopard

2009-03-29 Thread Matt Neuburg
On Sat, 28 Mar 2009 22:31:01 -0700, Pierce Freeman piercefreema...@comcast.net said: Hi everyone. I have been looking into a way to search the user's hard drive for a files and have settled on Spotlight. I will say ahead of time that if anyone has a better way to search for files that are in

Re: should release or not? (basic memory management question)

2009-03-29 Thread Ignacio Enriquez
Thanks Clark. Cleared my doubts ;) On Mon, Mar 30, 2009 at 4:38 AM, Clark Cox clarkc...@gmail.com wrote: On Sun, Mar 29, 2009 at 12:24 PM, Ignacio Enriquez nach...@gmail.com wrote: Hi everyone. I still have some doubts of should I release or not? and the most important reaons why

Re: NSArchiver atomic?

2009-03-29 Thread Michael Vannorsdel
Alright thanks, what I was looking for. On Mar 29, 2009, at 1:41 PM, Clark Cox wrote: All bets are off if you do unsupported things inside of a signal handler. For instance it is possible that the routines used to write the file *seemed* to complete successfully when they, in fact, didn't. In

[BUG?] - [NSLayoutManager usedRectForTextContainer:] returns incorrect value

2009-03-29 Thread Iceberg-Dev
Problem: I'm seeing incorrect results when I try to get the height of a string with a particular font and maximum width. Context: I'm running the code below. I have a single NSWindow with a checkbox and a button. In the awakeFromNib method of the main controller, I

Re: Spotlight and Leopard

2009-03-29 Thread Scott Anguish
On 2009-03-29, at 1:14 PM, Pierce Freeman wrote: Scott: Thanks for your reply. I more mean what has changed in the actual structure in Spotlight for Leopard. For example, I tried to follow this article: http://oreilly.com/pub/a/mac/2005/07/12/spotlight.html but it seems as if some of

2-button *vertically*-oriented UIAlertView ?

2009-03-29 Thread WT
Hello, in the iPhone application I'm writing, I need to display an alert that may have 2 or 3 buttons, depending on whether or not the device supports some features. The first 2 buttons always have the same titles in the two scenarios but, in the 2-button scenario, the buttons appear

Re: NSArchiver atomic?

2009-03-29 Thread Dave Keck
From the docs: + (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path ... writeToFile:atomically:, using path for the first argument and YES for the second. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Spotlight and Leopard

2009-03-29 Thread Pierce Freeman
Thanks for your reply Matt. I have been looking about all the problems with using Spotlight (including this problem) and am thinking that formulating a UNIX find command would probably be easier. Please comment back with any thoughts about this idea. On 3/29/09 12:51 PM, Matt Neuburg

Absolutely Mysterious Compilation Error

2009-03-29 Thread Тимофей Даньшин
Hello. I have a class called TableMaker. And i import its header in the header of another class. The funny thing is that every once in a while the app fails to build, XCode pointing to the line TableMaker *tableMaker; in that other header file as the cause of the failure. If i comment out

Re: Spotlight and Leopard

2009-03-29 Thread Pierce Freeman
I'm not aware of that being removed (and typically I would be) It's in the headers on Leopard. That example does have an issue in that it doesn't link against Carbon. But if you do that, it compiles without warning, and clicking on the search button brings up the current Leopard HI for

Re: Absolutely Mysterious Compilation Error

2009-03-29 Thread Stephen J. Butler
2009/3/29 Тимофей Даньшин ok5.ad...@gmail.com: I have a class called TableMaker. And i import its header in the header of another class. The funny thing is that every once in a while the app fails to build, XCode pointing to the line TableMaker *tableMaker; in that other header file as the

Re: Absolutely Mysterious Compilation Error

2009-03-29 Thread Stephen J. Butler
2009/3/29 Тимофей Даньшин ok5.ad...@gmail.com: It says error: syntax error before 'TableMaker' Could be a circular include problem. Try this: In OtherClass.h: - remove the #import TableMaker.h - add @class TableMaker; In OtherClass.m: - add #import TableMaker.h

Re: 2-button *vertically*-oriented UIAlertView ?

2009-03-29 Thread Dave DeLong
UIActionSheet might be an appropriate alternative to the AlertView. HTH, Dave On Mar 29, 2009, at 3:28 PM, WT wrote: Hello, in the iPhone application I'm writing, I need to display an alert that may have 2 or 3 buttons, depending on whether or not the device supports some features. The

Re: Absolutely Mysterious Compilation Error

2009-03-29 Thread Тимофей Даньшин
Yes, that cleared it. Thank you a lot. Could you, please, tell me, where i can read more about circular includes and what the ways of dealing with them are? It seems rather an odd thing after Java. On Mar 30, 2009, at 3:25 AM, Stephen J. Butler wrote: 2009/3/29 Тимофей Даньшин

Re: user access privileges to plist in /library/preferences

2009-03-29 Thread Memo Akten
Hi Greg, /Users/Shared may work, I'll give that a shot thanks. On 27 Mar 2009, at 18:26, Greg Guerin wrote: I'd like the file to be user independent, so it should always read/ write to the same file whoever logs in (it actually collects stats of usage). Is there a better place to store the

Re: Spotlight and Leopard

2009-03-29 Thread Greg Guerin
Pierce Freeman wrote: Due to problems with Spotlight not searching other drives on default, I have decided on integrating the UNIX find command. Please reply with any ideas you have regarding this, including (please) something about saving the locations of the files that it found to an

Re: Custom windows and NSWindowBackingLocationVideoMemory

2009-03-29 Thread Michael Vannorsdel
I've found the reason for it is that the window is not opaque (setOpaque:NO). So are all non-opaque windows ineligible for VRAM backing? I don't see any documentation on window attribute requirements for it, only GPU requirements. On Mar 29, 2009, at 2:23 PM, Michael Vannorsdel wrote:

Custom sort order on NSTableColumn

2009-03-29 Thread Trygve Inda
I have an NSTableView with 4 columns. There is an NSArrayController behind it and two columns use bindings to grab data from the array directly. The other two columns have to calculate their content based on other fields in the array. I need to define a custom sort comparison method for these.

ack no class

2009-03-29 Thread Mark Sibly
Hi, I'm the author of BlitzMax, a multi-platform 'basic like' compiler. I've recently had a few reports that apps generated by the Mac version are producing a mysterious ack no class error when they start up - similar to this:  2009-03-24 22:26:14.460 test[10329:717] ack no class This appears

Re: [Solved] NSTableView updating checkboxes

2009-03-29 Thread Jo Phils
Hi again Graham (and others that helped), Just want to post back saying I got it all working. Thank you very much for all of the help I really do appreciate it! Rick From: Graham Cox graham@bigpond.com To: Jo Phils jo_p...@yahoo.com Cc: Cocoa-Dev List

Properties and the runtime

2009-03-29 Thread Luke the Hiesterman
Up to this point, I've thought of properties as syntactic sugar for method calls. That is myObject.size should compile the same as [myObject size] unless of course a custom getter is set in the property declaration, then it would compile the same as if I had called that getter. What makes

Re: Properties and the runtime

2009-03-29 Thread Bill Bumgarner
On Mar 29, 2009, at 10:06 PM, Luke the Hiesterman wrote: I can't think of anything about properties that needs to be dealt with at runtime. My understanding has it that all information necessary for what properties do is available at compile time. E.g. the method to call, return types, how

Re: Properties and the runtime

2009-03-29 Thread Luke the Hiesterman
So, if I declared a property called money and synthesized said property, would [object setMoney:money] and object.money = money compile to the same code? That, of course, implies that we're also inserting property-related code to simple method calls if they happen to correspond with a

Decode a base64 image for iphone

2009-03-29 Thread developers mac
Hello friends, I am getting an image of base64 type encoded one. I have to decode it. Can some one suggest me on this. I am new to this concept. Any help would be greatly appreciated. Thanks in Advance! ___ Cocoa-dev mailing list

Bug in CALayer Transition....?

2009-03-29 Thread Anshul jain
Hi All, I am trying to play a transition every time the content of layer changes for that i have over written -(idCAAction)actionForKey: (NSString *)key . it is working fine. But when the CALayer is scale say by 0.5 then the transition doesn't happen nicely. Is this a Bug. or I am

Re: Properties and the runtime

2009-03-29 Thread Bill Bumgarner
On Mar 29, 2009, at 10:21 PM, Luke the Hiesterman wrote: So, if I declared a property called money and synthesized said property, would [object setMoney:money] and object.money = money compile to the same code? That, of course, implies that we're also inserting property-related code to

Re: Properties and the runtime

2009-03-29 Thread Luke the Hiesterman
On Mar 29, 2009, at 10:35 PM, Bill Bumgarner wrote: @synthesize synthesizes the implementation of the methods only and that is where the runtime dependency is introduced. Does this statement imply that there is no runtime dependency if I do not synthesize my properties? Luke

Re: Properties and the runtime

2009-03-29 Thread Bill Bumgarner
On Mar 29, 2009, at 10:39 PM, Luke the Hiesterman wrote: On Mar 29, 2009, at 10:35 PM, Bill Bumgarner wrote: @synthesize synthesizes the implementation of the methods only and that is where the runtime dependency is introduced. Does this statement imply that there is no runtime dependency if