Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Stephen J. Butler
On Tue, Apr 28, 2009 at 12:21 AM, Erg Consultant erg_consult...@yahoo.com wrote: LSOpenCFURLRef doesn't work either - kLSApplicationNotFoundErr. The nature of the file is the app's exe which is normally inside the MacOS dir. However, all this works perfectly fine if there are no special

Re: Second frontmost app?

2009-04-28 Thread Peter N Lewis
On 28/04/2009, at 11:02 , Dave DeLong wrote: Is there a way to get the second frontmost app? For example, right now Mail.app is the frontmost, then Safari, because Safari was the active app before I switched to Mail. Is there any sort of API to that tells me that if I were to cmd-tab,

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Erg Consultant
I should mention I am using XCode 2.5 under 10.5 so I cannot use the 10.5 SDK nor Obj-C 2.0. Erg From: Stephen J. Butler stephen.but...@gmail.com To: Cocoa-Dev List cocoa-dev@lists.apple.com Sent: Monday, April 27, 2009 11:14:44 PM Subject: Re: Why is

Float value change

2009-04-28 Thread Tharindu Madushanka
Hi, I have float values in my iPhone program, when I type in a textfield and print it it shows a little different value than what I have typed, I used printf to see the results. I can't understand why its happening. How can I resolve this. For example textfield.floatValue actual value typed -

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Chris Hanson
On Apr 27, 2009, at 9:14 PM, Erg Consultant wrote: I write the original STL string to a tmp file, then read it back in. The file is encoded in MacRoman. I tried UTF8 with both converting and reinterpreting but if I use UTF8 when I read it back from file, the read returns nil. If I use

Re: Float value change

2009-04-28 Thread Tharindu Madushanka
Hi, I am trying to store values in a SQLite database and retrieve them, they are currency values, so what is the alternative or solution I will have to look for, I am confused with this. Please is there any work around ?? Regards, -Tharindu ___

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Erg Consultant
Yes, I've verified that everything is correct. I zero'ed the launch param block and set kLSLaunchDefaults. Oddly, I can now get it to work in the built release version (binary) but if I run it from the debugger, LSOpenApplication returns noErr, but if I try to get the pid of the launched,

Re: Float value change

2009-04-28 Thread Graham Cox
On 28/04/2009, at 5:24 PM, Tharindu Madushanka wrote: what is the alternative or solution I will have to look for NSDecimal? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Second frontmost app?

2009-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 09 à 05:02, Dave DeLong a écrit : Hey everyone, Is there a way to get the second frontmost app? For example, right now Mail.app is the frontmost, then Safari, because Safari was the active app before I switched to Mail. Is there any sort of API to that tells me that if I

Re: Float value change

2009-04-28 Thread Andrew Farmer
On 28 Apr 09, at 00:38, Graham Cox wrote: On 28/04/2009, at 5:24 PM, Tharindu Madushanka wrote: what is the alternative or solution I will have to look for NSDecimal? Or integers. Just because a number is represented to the user with a decimal point doesn't mean that the internal

Binding question

2009-04-28 Thread Arun
Hi, I have an application in which i am trying to display information about the student in a table. The table has 2 columns. One representing the enble/disble in a check box and the other column representing the student column. I have enabled double-click action on the table column. So once i

Observing properties which are not objects

2009-04-28 Thread Andreas Grosam
Maybe I miss something, but it seems, the standard KVO does not work for properties whose values are non-objects, say int, float etc. How can I effortless accomplish to observe at such properties? For instance: @interface Model { int value; } @property int value; @end @interface

Re: Dividing NSView to subviews

2009-04-28 Thread Naresh Kongara
Hi, For larger views I'm not even getting the blur view, its giving some garbage output... If the view needs to be divided into 20 to 25 images , each image of print rect size. Thanks NareshK On Apr 27, 2009, at 11:42 AM, Peter N Lewis wrote: On 27/04/2009, at 12:16 , Naresh Kongara

NSPopUpButton update

2009-04-28 Thread ALEXander
Hello, i use an NSPopUpButton to display color choices that the user can set in user defaults. There is one view with an NSCollectionView controlled by an NSDictionarycontroller, which populates the dictionary CTColorsDictionary in user defaults with color values (using NSKeyedArchiver)

Re: Observing properties which are not objects

2009-04-28 Thread Graham Cox
On 28/04/2009, at 8:23 PM, Andreas Grosam wrote: Maybe I miss something, but it seems, the standard KVO does not work for properties whose values are non-objects, say int, float etc. How can I effortless accomplish to observe at such properties? Scalar properties (int, float, etc) are

Finder Sidebar Shared Items

2009-04-28 Thread Steven Huey
Hello, I'm trying to find out how to get the list of items in the Shared group of the Finder sidebar. * I see that using the LSSharedFileList API along with the kLSSharedFileListRecentServerItems constant I can fetch the list of Servers from the Recent Items menu * The

soft line breaks in NSLayoutManager

2009-04-28 Thread Fabry, Geza
Hi, I have a formatted text in an NSTextStorage which I would like to draw. I also have an array of character locations where to break the text into lines. Is there a way to add soft line breaks to the layout without modifying the unicode string (inserting line break characters)? In the ATSU-world

Re: URL Parsing

2009-04-28 Thread Mike Abdullah
Also have a look at: http://trac.adiumx.com/wiki/AutoHyperlinksFramework On 28 Apr 2009, at 05:05, Mr. Gecko wrote: One thing I can try is to put every word in a array, go through them, see if they contain http or https in the beginning, if so add a href=URLURL/a to it. On Apr 27, 2009,

Re: Scheduling application

2009-04-28 Thread Jerry Krinock
On 2009 Apr 28, at 00:35, Mahaboob wrote: The folder permission of LaunchDaemons is read only. So I can't write the plist file into this folder programmatically. How can I do it? First, read or re-read Apple's TN2083 and verify that your ^really^ need to create a system daemon instead of a

Thread safety

2009-04-28 Thread Trygve Inda
The docs say that: Note that although NSSerializer, NSArchiver, NSCoder, and NSEnumerator objects are themselves thread-safe, they are listed here because it is not safe to change the data objects wrapped by them while they are in use. For example, in the case of an archiver, it is not safe to

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Dave DeLong
It's possible it doesn't always work, but it worked for me when I tried it... Dave On Apr 28, 2009, at 9:18 AM, Erik Buck wrote: I haven't tried, but I don't think the following works because of the way the pre-processor inserts spaces: #define kConstCString This is a const c string

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Michael Ash
On Tue, Apr 28, 2009 at 1:13 AM, Erg Consultant erg_consult...@yahoo.com wrote: Apple's doc's specifically say to stay away from using the CString routines which require encodings. So now the encoding issue goes away. The problem is LSOpenApplication() does not like the FSRef I pass it which

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Stephen J. Butler
On Tue, Apr 28, 2009 at 10:18 AM, Erik Buck erik.b...@sbcglobal.net wrote: I haven't tried, but I don't think the following works because of the way the pre-processor inserts spaces: #define kConstCString This is a const c string #define kConstNSString @kConstCString Well, if that doesn't

Re: Second frontmost app?

2009-04-28 Thread Dave DeLong
Well, I got this working with a timer that just keeps track of the activeApplication and the previously activeApplication, but I'm intrigued by this approach, so I'd like to see if this works, too. Here's what I've got: ProcessSerialNumber psn; OSErr result =

Re: URL Parsing

2009-04-28 Thread Mike Abdullah
Have a look at how it works; very simple to write your own version using their scanner that generates HTML. In fact I have a rough implementation as a patch sitting in their tracker system somewhere. On 28 Apr 2009, at 16:34, Mr. Gecko wrote: Can't really do that because I'm needing it to

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Clark Cox
On Mon, Apr 27, 2009 at 10:13 PM, Erg Consultant erg_consult...@yahoo.com wrote: Apple's doc's specifically say to stay away from using the CString routines which require encodings. Where do they say that? -- Clark S. Cox III clarkc...@gmail.com

NSMetadataQueryDidUpdateNotification problem with volumes

2009-04-28 Thread Eddie Aguirre
I've setup a NSMetaDataQuery to search for particular file types. I've set the search scope to NSMetadataQueryLocalComputerScope. The initial search phase works correctly. The query returns all of the expected files on all of the local volumes. Now if I add a file to the root volume I

Cookie accept policy

2009-04-28 Thread Kay Jurkuhn
Hi list! I've tried to establish some http communication with the help of the URL loading system. I had to discover that the cookie accept policy setting of the shared cookie storage effects all applications using the URL loading system. My application needs to accept cookies at all times.

Re: Getting Display Names

2009-04-28 Thread Cédric Luthi
Are these names only accessible from private frameworks or is there an AppKit or CoreGraphics API I have yet to stumble across that maps the display unit number or display ID to a localized (or not) display name? The answer is in I/O Kit: #import IOKit/graphics/IOGraphicsLib.h #import

Bindings confusion

2009-04-28 Thread Simon Raisin
Hi, I'm running into a binding issue is my main application so I wrote a small test app to try to track down the problem: primarily that I cannot get the UI to update appropriately when it is configured to observe my model objects via bindings. // AppDelegate.h @class ModelObject; @interface

Group Identity Programming

2009-04-28 Thread Jessica Billings
Hi all, First of all, I apologize because I have only been developing Cocoa for a few months and I'm learning as I go. Hopefully I'm not making some newbie mistake. I am trying to write a program that, among other things, generates a list of user and group identities using the identity picker

NSArrayController: Objects with empty strings

2009-04-28 Thread MyApps
Hi list, I am new to the cocoa development. I have some question to NSArrayController I add an object to the controller array like this: CODE ## NSMutableDictionary *theDicRow = [NSMutableDictionary

Storing a table view in user defaults

2009-04-28 Thread Ryan Briones
I'm a relative newb when it comes to cocoa programming, but I've been trying to finish of a project and put it out there so I can get some feedback and continue to get better. My problem is that I have a table view that's bound to an array controller backed by user defaults in IB. Adding a single

Re: Cookie accept policy

2009-04-28 Thread Nick Zitzmann
On Apr 28, 2009, at 12:57 AM, Kay Jurkuhn wrote: Is there another way to change the cookie accept setting only for my application/process to accept all cookies? No. As you discovered, the cookie storage settings are global and can't be changed on a per-application basis. Nick Zitzmann

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Graham Lee
On 28/04/2009 16:51, Stephen J. Butler stephen.but...@gmail.com wrote: On Tue, Apr 28, 2009 at 10:18 AM, Erik Buck erik.b...@sbcglobal.net wrote: Don't hard code paths! Use NSHomeDirectory() or NSTemporaryDirectory() or NSSearchPathForDirectoriesInDomains(). Not only that, but hardcoding

How to make NSSplitView not dragable

2009-04-28 Thread Ashish Tiwari
Hi All, I have a horizontal NSSplitView, I want the splitter bar should remain in a fixed postion and user should not be able to change size of upper subview or lower subview by dragging it. Note: Split bar should be visible but not be drag able. Thanks, Ashish DISCLAIMER == This

Re: Bindings confusion

2009-04-28 Thread Quincey Morris
On Apr 28, 2009, at 06:04, Simon Raisin wrote: I'm running into a binding issue is my main application so I wrote a small test app to try to track down the problem: primarily that I cannot get the UI to update appropriately when it is configured to observe my model objects via bindings.

Re: Second frontmost app?

2009-04-28 Thread Jean-Daniel Dupas
Don't bother with that. I did a try, and it look like the Process Manager order has nothing to do with the cmd + tab order. it returns -600, probably because psn is the last process in the Process Manager list. Sorry for the noise. Le 28 avr. 09 à 17:55, Dave DeLong a écrit : Well, I got

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 09 à 17:47, Michael Ash a écrit : On Tue, Apr 28, 2009 at 1:13 AM, Erg Consultant erg_consult...@yahoo.com wrote: Apple's doc's specifically say to stay away from using the CString routines which require encodings. So now the encoding issue goes away. The problem is

Re: Second frontmost app?

2009-04-28 Thread Dave DeLong
Sounds good. For documenting purposes, here's what I did to get this working: In the appropriate class, I have an NSMutableArray called activeApps and a timer called appTimer. The timer is scheduled to fire every 0.5 seconds. When it fires, it gets the activeApplication dictionary from

Re: Second frontmost app?

2009-04-28 Thread Gary L. Wade
You're starting off with GetCurrentProcess, which returns the process number of your application; have you tried GetFrontProcess, which returns the front process? This will not be your application if you're in the background. On 04/28/2009 9:57 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote:

Re: Second frontmost app?

2009-04-28 Thread Dave DeLong
Yes, I tried both, and got the same result each time (-600 when trying to get the next process). Dave On Apr 28, 2009, at 11:06 AM, Gary L. Wade wrote: You're starting off with GetCurrentProcess, which returns the process number of your application; have you tried GetFrontProcess, which

Re: Problem with 'launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:'???

2009-04-28 Thread Laurent Daudelin
Ken. When not providing the descriptor, it would launch the app and print the untitled document that was automatically opened. Tried it with Comic Life and Microsoft Word, among others. Of course, I'm running 10.5.6 here. With FSRef-based AE descriptor, it opens the right document. I

Re: Second frontmost app?

2009-04-28 Thread Jean-Daniel Dupas
To iterate over all apps, you should pass { 0, kNoProcess } in the first GetNextProcess call. But as I mention, the result list is not usefull top solve this issue. That said, using Carbon event to track application switching as suggested sooner would be a cleaner and more reliable way to

Re: NSDateFormatter for ISO8601

2009-04-28 Thread Jeffrey Oleander
On Mon, 2009/04/27, Martijn van Exel mve...@gmail.com wrote: Unrelated: one of the XML attributes that needed parsing was a ISO8601 style date string, for which neither NSDate nor NSDateFormatter curiously does not seem to provide a parser. ? Of course, it will parse ISO dates. You just

Re: click in NSButtonCell in NSTableView without selecting table row? [SOLVED]

2009-04-28 Thread Dan Rowley
Thanks, Corbin - to summarize for posterity, the implementation of - (BOOL)outlineView:(NSOutlineView *)ov shouldSelectItem:(id)item is using -clickedColumn and -clickedRow to determine the location of the click, and not selecting the row (returning NO) if the cell in that location is an enabled

Re: Storing a table view in user defaults

2009-04-28 Thread Jerry Krinock
On 2009 Apr 28, at 08:04, Ryan Briones wrote: My problem is that I have a table view that's bound to an array controller backed by user defaults in IB. I don't know what backed by means. The 'content' binding of your array controller should be bound to an NSUserDefaults object (labelled

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Greg Parker
On Apr 28, 2009, at 9:39 AM, Graham Lee wrote: On 28/04/2009 16:51, Stephen J. Butler stephen.but...@gmail.com wrote: On Tue, Apr 28, 2009 at 10:18 AM, Erik Buck erik.b...@sbcglobal.net wrote: Don't hard code paths! Use NSHomeDirectory() or NSTemporaryDirectory() or

Re: click in NSButtonCell in NSTableView without selecting table row? [SOLVED]

2009-04-28 Thread Corbin Dunn
is using -clickedColumn and -clickedRow to determine the location of the click, and not selecting the row (returning NO) if the cell in that location is an enabled NSButtonCell. I had originally discarded this approach because of this line in the documentation for -clickedColumn: The

Re: Group Identity Programming

2009-04-28 Thread Keary Suska
On Apr 28, 2009, at 8:58 AM, Jessica Billings wrote: I am trying to write a program that, among other things, generates a list of user and group identities using the identity picker and then checks to see if the logged-on user matches any user identity or is a member of any group. I can do

Re: NSArrayController: Objects with empty strings

2009-04-28 Thread Keary Suska
On Apr 28, 2009, at 8:59 AM, MyApps wrote: First off, a suggestion: please don't delimit code sections like you do. In fact, you don't need any delimiters other than whitespace (as you can see with the edited text below). And you can see, it is just as readable, and, IMHO, it is actually

Re: NSArrayController: Objects with empty strings

2009-04-28 Thread Greg Guerin
MyApps wrote: But I wanna have the empty string back. So it seems, that the empty string is converted to nill and the controller is killing them out. This works fine for me. CODE: NSMutableDictionary* dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: @Text A, @colA,

Re: Repositioning the Field Editor

2009-04-28 Thread K. Darcy Otto
Continuing on with the mystery, I have tried the following code in my NSTableView subclass (below, not yet solved though). I have got it so that the rect returned by [fieldEditor frame] is not empty, but gives exactly the frame it should. Still though, modifying the frame to something

Re: passing complex objects between threads

2009-04-28 Thread Daniel Child
Thanks for the sugestion. I will keep the idea of passing object IDs in mind when that situation comes up. But I think I misled you. My data was not in Core Data yet, but rather in an archive I needed to unfreeze and place in Core Data. In the end, I did something similar to what you

Re: NSArrayController: Objects with empty strings

2009-04-28 Thread Keary Suska
On Apr 28, 2009, at 1:39 PM, Alexander Spohr wrote: Am 28.04.2009 um 21:22 schrieb Keary Suska: NSMutableDictionary *theDicRow = [NSMutableDictionary dictionaryWithObjectsAndKeys: @Text A, @colA, @, @colB, nil ]; I am not surprised to see this behavior, for various

Re: Cocoa-dev Digest, Vol 6, Issue 641

2009-04-28 Thread Daniel Child
I remember having this problem while developing Core Data apps for testing purposes. It often happened while I modified the app in various ways. I think the solution was to delete the store in ApplicationSupport/ app name. If you have legacy data, you'll have to export that from an old

[OT] Re: Need guidance on data structure

2009-04-28 Thread Alastair Houghton
On 28 Apr 2009, at 02:47, Graham Cox wrote: Because of the cyclic nature of the network though, there isn't a way I can see to simply sort the objects into the right order. I snipped most of the above; anyone who cares to read it should refer to the original message. I think the crux of

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Erg Consultant
I tried this and it absolutely works great - although I too had thought that it wouldn't. Who woulda thunkit? Erg From: Erik Buck erik.b...@sbcglobal.net To: cocoa-dev@lists.apple.com Sent: Tuesday, April 28, 2009 8:18:56 AM Subject: Re: C string

Re: Storing a table view in user defaults

2009-04-28 Thread Jerry Krinock
On 2009 Apr 28, at 11:41, Ryan Briones wrote: Sorry for not using the proper terminology. I have a table view whose columns are bound to an array controller (Controller Key: arrangedObjects, Model Key Path: name, etc) and the array controller is bound You didn't say which binding.

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Erg Consultant
I was reading it wrong. Page 12 Strings Programming Guide For Cocoa: Important: NSString provides a number of methods to use Cstrings directly (such as stringWithCString:,initWithCString:, initWithCString:length:, and initWithCStringNoCopy:length:freeWhenDone:). These methods use the default

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Erg Consultant
Except in the case where one line of code creates the temp file and then another immediately uses it and deletes is - as in my case. There is zero chance the user could FUS faster than my 2 lines of code create and delete the file. Erg From: Graham Lee

Re: Storing a table view in user defaults

2009-04-28 Thread Steven Riggs
Check out the sample code here that demonstrates storing a dictionary in defaults with no code. http://idisk.mac.com/steven.riggs-Public?view=web I hope it helps... Steven Riggs On Apr 28, 2009, at 11:04 AM, Ryan Briones wrote: I'm a relative newb when it comes to cocoa programming, but

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Erg Consultant
Well, I finally got it to work - but it took a lot of work. How does one launch an exe inside an app bundle if LSOpenApplication isn't desgined to do that? Erg From: Jean-Daniel Dupas devli...@shadowlab.org To: cocoa-dev cocoa-...@lists.apple..com Sent:

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 5:03 PM, Erg Consultant erg_consult...@yahoo.com wrote: How does one launch an exe inside an app bundle if LSOpenApplication isn't desgined to do that? exe? You need to specify what you mean: executable binary, which is just a plain binary file, or application, which

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Erg Consultant
This is a DRM situation where there are multiple app executables inside the main .app bundle. From: Kyle Sluder kyle.slu...@gmail.com To: Erg Consultant erg_consult...@yahoo.com Cc: cocoa-dev cocoa-dev@lists.apple.com Sent: Tuesday, April 28, 2009 2:11:40 PM

Re: Need guidance on data structure

2009-04-28 Thread Kyle Sluder
On Mon, Apr 27, 2009 at 9:47 PM, Graham Cox graham@bigpond.com wrote: A road can be connected to other roads. Currently each road keeps a list of the subroads that are connected to it, which is a parent-child relationship. A parent road can have any number of child roads, but a child road

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Jerry Krinock
On 2009 Apr 23, at 13:53, Melissa J. Turner wrote: Unwinding to the original message, the most correct thing to do would be to add a derived property letterGrade which is automatically updated whenever grade is, which then allows you to search against that. I don't know if a derived

Re: How to make NSSplitView not dragable

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 12:44 PM, Ashish Tiwari ashish_tiw...@persistent.co.in wrote: I have a horizontal NSSplitView, I want the splitter bar should remain in a fixed postion and user should not be able to change size of upper subview or lower subview by dragging it. What have you tried?

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 4:58 PM, Erg Consultant erg_consult...@yahoo.com wrote: Except in the case where one line of code creates the temp file and then another immediately uses it and deletes is - as in my case. There is zero chance the user could FUS faster than my 2 lines of code create

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 5:15 PM, Jerry Krinock je...@ieee.org wrote: If Melissa is referring to a managed property, if it is non-transient, then yes this could be used in the predicate of a Core Data fetch.  The disadvantage is that now every object in every store has this redundant (derived)

CA -animator animation only works the first time

2009-04-28 Thread Erg Consultant
I have two standard Cocoa objects in my window that I animate using CA's AppKit -animator method. When my nib loads, I get the original NSRects of the two items by sending them the -frame message. I then recalc the rects to move the two views offscreen. When I show my window, I animate both

NSXMLParser and NSDocument

2009-04-28 Thread Jeffrey Oleander
I've been having 2 intermittent compilation errors on 10.3.9 in - (BOOL)loadDataRepresentation:(NSData*)data ofType:(NSString*)fileType { BOOL success; NSString * lowercaseFileType = [fileType lowercaseString]; NSLog(@fileType=%S, lowercaseFileType); if

Re: Why is NSString-FSRef so hard?

2009-04-28 Thread Charles Srstka
On Apr 28, 2009, at 4:13 PM, Erg Consultant wrote: This is a DRM situation where there are multiple app executables inside the main .app bundle. NSTask. Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

NSRunLoop vs. NSThread sleep

2009-04-28 Thread Eric Hermanson
Hello, When implementing the while-loop in the main function of an NSThread, is it correct to assume it is more efficient on the operating system to run the current run-loop until a specified date rather than just use NSThread sleepUntilDate to obtain the delay? I ask because I don't

Re: iphone SDK session duration

2009-04-28 Thread Luke the Hiesterman
On Apr 28, 2009, at 5:10 PM, Bess Ho wrote: Sorry for the delay in response. I'll need more help. I follow suggestions on using applicationDidFinishLaunching: and applicationWillTerminate: methods on AppDelegate. It won't print NSLog when I stop the app on Console and throw errors when

Re: NSDateFormatter for ISO8601

2009-04-28 Thread Bill Garrison
On Apr 28, 2009, at 1:57 PM, Jeffrey Oleander wrote: On Mon, 2009/04/27, Martijn van Exel mve...@gmail.com wrote: Unrelated: one of the XML attributes that needed parsing was a ISO8601 style date string, for which neither NSDate nor NSDateFormatter curiously does not seem to provide a

Re: C string constant-NSString constant without defining twice?

2009-04-28 Thread Gwynne Raskind
On Apr 28, 2009, at 5:15 PM, Kyle Sluder wrote: Except in the case where one line of code creates the temp file and then another immediately uses it and deletes is - as in my case. There is zero chance the user could FUS faster than my 2 lines of code create and delete the file. By virtue

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Melissa J. Turner
(apologies for the delay; I've been on vacation for the last few days and just got back) On Apr 28, 2009, at 14:32, Kyle Sluder wrote: So step 1 is to stop clinging to normalization rules. (My database professor would kill me for that sentence, but it's true.) There really is no redundancy

Re: NSXMLParser and NSDocument

2009-04-28 Thread Graham Cox
On 29/04/2009, at 8:34 AM, Jeffrey Oleander wrote: I've been having 2 intermittent compilation errors on 10.3.9 in - (BOOL)loadDataRepresentation:(NSData*)data ofType: (NSString*)fileType { BOOL success; NSString * lowercaseFileType = [fileType lowercaseString];

Re: NSXMLParser and NSDocument

2009-04-28 Thread Graham Cox
On 29/04/2009, at 11:51 AM, Graham Cox wrote: You can't have static objects in Objective-C Correction - I meant to say *stack* objects... --G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

File Reading Problems

2009-04-28 Thread Pierce Freeman
Hi everyone. I have a small problem with readToEndOfFileInBackgroundAndNotify which is that I can't seem to get it to work right. ;) I am seeding the connection with the file name, and everything looks right except that I keep getting NSConcreteFileHandle: 0x1abfd0 and *** -[NSConcreteFileHandle

Re: File Reading Problems

2009-04-28 Thread Stephen J. Butler
On Tue, Apr 28, 2009 at 9:19 PM, Pierce Freeman piercefreema...@comcast.net wrote: - (void)readAllTheData:(NSNotification *)note { NSString *errors = nil; NSData *contentsOfDockFile = [note object]; NSLog(@%@, contentsOfDockFile); NSDictionary *testing =

Re: File Reading Problems

2009-04-28 Thread Pierce Freeman
Thanks for your help. I don't get those strange errors anymore, however no if I try to save the NSDIctionary to a file (NSDictionary's writeToFile), my app seems to freeze up and in the Debugger it says: Program loaded. sharedlibrary apply-load-rules all Attaching to program:

Re: File Reading Problems

2009-04-28 Thread Adam R. Maxwell
On Apr 28, 2009, at 7:50 PM, Pierce Freeman wrote: Thanks for your help. I don't get those strange errors anymore, however no if I try to save the NSDIctionary to a file (NSDictionary's writeToFile), You're releasing a variable that you don't own (testing). See the Cocoa memory

Re: File Reading Problems

2009-04-28 Thread Pierce Freeman
Hey Adam: Thanks for your reply. I added [testing retain] after the declaration of the variable, and I no longer get the wheel of death and my app freezing up. In response to your comment about why I am using NSFileHandle, it is because in the final version of this app I will need to scan

Re: Storing a table view in user defaults

2009-04-28 Thread Steven Riggs
You were right there. All you have to do to get it to work is check 'Handles content as compound value' on the array controller content array binding. All the best, Steven Riggs On Apr 28, 2009, at 10:02 PM, Ryan Briones wrote: Hey, thanks! I actually ran across your code last night

Re: errors building framework

2009-04-28 Thread Daniel Child
That was it. Thanks. On Apr 28, 2009, at 1:07 AM, cocoa-dev-requ...@lists.apple.com wrote: I am trying to create a framework out of some files that I use in a few apps. I expected this to be easy, but instead got a kazillion warnings, all of which take the form: objc_class_name_NAME

Errors occur when using NSOutputStream to transfer big files

2009-04-28 Thread yiling wu
Hi, All I'm trying to use the NSOutputStream class to transfer some audio file through Bonjour service which is implemented on the iPhone simulator.I try the following code with some small text files. It works well. But there are always some error occurs() when I try to send the bigger ones --

Re: Errors occur when using NSOutputStream to transfer big files

2009-04-28 Thread Andrew Farmer
On 28 Apr 09, at 21:11, yiling wu wrote: I'm trying to use the NSOutputStream class to transfer some audio file through Bonjour service which is implemented on the iPhone simulator.I try the following code with some small text files. It works well. But there are always some error occurs()

How to get finder type Open With dialog box

2009-04-28 Thread Parimal Das
Hello ppl Cocoa gives me default file associations with apps in this code NSString * path_ok= @/Users/pd/Desktop/pd.rtf; [ws openFile:path_ok withApplication:nil]; But when i try this i get an obvious error NSString * path= @/Users/pd/Desktop/pd2.large; NSWorkspace * ws =