Re: How to make NSSplitView not dragable

2009-04-28 Thread Benjamin Dobson
On 28 Apr 2009, at 17:44:38, Ashish Tiwari wrote: 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 dra

Re: Storing a table view in user defaults

2009-04-28 Thread Ryan Briones
God, thank you! You have saved my sanity. On Tue, Apr 28, 2009 at 11:35 PM, Steven Riggs wrote: > 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 > > > >

Re: Storing a table view in user defaults

2009-04-28 Thread Ryan Briones
Hey, thanks! I actually ran across your code last night when I was first doing this. I ran your code and it worked fine. I created a test project to "copy" your code, and mine failed. I tried looking at every checkbox and every key path, nothing worked. I've uploaded my the "test project" to github

Re: Storing a table view in user defaults

2009-04-28 Thread Ryan Briones
On Tue, Apr 28, 2009 at 2:31 PM, Jerry Krinock wrote: > > 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. Sorry for not using the proper te

Re: iphone SDK session duration

2009-04-28 Thread Bess Ho
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 I leave the app on simulator by pressing the home butt

NSButtonCell visibility binding in NSOutlineView

2009-04-28 Thread Chris Tracewell
I am looking for the best method of turning off the visibility of an NSButtonCell object for individual rows in an OutlineView/TableView. I have an OutlineView that is bound to a TreeController. There are two columns. In the last column I am using a checkbox cell that should only be visible

Re: How to get finder type "Open With" dialog box

2009-04-28 Thread Kyle Sluder
On Wed, Apr 29, 2009 at 1:52 AM, Parimal Das wrote: > What i want to do is, when my code encounters a unknown file extension, it > should open the finder type "Open With" dialog box for user to choose the > app from the list. There is no "Open With" dialog box, at least not one that's analogous t

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 = [NSW

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() whe

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 -- som

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_ referenced

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 wh

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 severa

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 ownersh

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: `/Users/user/Desktop

Re: File Reading Problems

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

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 and *** -[NSConcreteFileHandle length]: unrecognized selector

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 moderato

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]; NSLog(

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: 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 o

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 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. Maybe this wo

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

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 rea

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 reque

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 ([lowercas

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 vie

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 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) attribute.

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 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.

Re: How to make NSSplitView not dragable

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 12:44 PM, Ashish Tiwari 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? Specifically, have you tried

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 pro

Re: Need guidance on data structure

2009-04-28 Thread Kyle Sluder
On Mon, Apr 27, 2009 at 9:47 PM, Graham Cox 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 can only have a m

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 To: Erg Consultant Cc: cocoa-dev Sent: Tuesday, April 28, 2009 2:11:40 PM Subject: Re: Why is NSString->FSRef so hard? On Tue, Apr 28, 2009 at 5:

Re: Why is NSString->FSRef so hard?

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 5:03 PM, Erg Consultant 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 is wrapped in a .app b

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 To: cocoa-dev Sent: Tuesday, April 28, 2009 9:59:07 AM Subject: Re: Why is

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 I'v

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 To:

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 C

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. Shoul

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 To: cocoa-dev@lists.apple.com Sent: Tuesday, April 28, 2009 8:18:56 AM Subject: Re: C string constant->NSString constant without

[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 t

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/ . If you have legacy data, you'll have to export that from an old version and

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 va

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 sugge

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 dif

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: 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 *m

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: 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 ret

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" wrote: On Tue, Apr 28, 2009 at 10:18 AM, Erik Buck wrote: Don't hard code paths! Use NSHomeDirectory() or NSTemporaryDirectory() or NSSearchPathForDirectoriesInDomains(). Not only that, but hardcodi

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: 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: NSDateFormatter for ISO8601

2009-04-28 Thread Jeffrey Oleander
> On Mon, 2009/04/27, Martijn van Exel 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 need to give 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 d

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 gues

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 ret

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" wrote: > Don't bother with

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 fr

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 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

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 th

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. .

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 e-ma

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

2009-04-28 Thread Graham Lee
On 28/04/2009 16:51, "Stephen J. Butler" wrote: > On Tue, Apr 28, 2009 at 10:18 AM, Erik Buck wrote: > >> Don't hard code paths! Use NSHomeDirectory() or NSTemporaryDirectory() or >> NSSearchPathForDirectoriesInDomains(). > > Not only that, but hardcoding filenames in tmp directories is > gener

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 <

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 n

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 dictionaryW

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 and

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 AppD

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 #import NSString* screenNameForDisplayI

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.

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 ge

Re: Why is NSString->FSRef so hard?

2009-04-28 Thread Clark Cox
On Mon, Apr 27, 2009 at 10:13 PM, Erg Consultant 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 ___ Cocoa-dev mailing

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 be

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 = GetCurrentProces

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 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 work (and I didn't t

Re: Why is NSString->FSRef so hard?

2009-04-28 Thread Michael Ash
On Tue, Apr 28, 2009 at 1:13 AM, Erg Consultant 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 gets created from >

Re: URL Parsing

2009-04-28 Thread Mr. Gecko
Can't really do that because I'm needing it to be in html format not attributed string. On Apr 28, 2009, at 7:15 AM, Mike Abdullah wrote: 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 w

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" #def

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

2009-04-28 Thread Erik Buck
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   Don't hard code paths!  Use NSHomeDirectory() or NSTemporaryDirectory() or NSSearchPathForDirectori

Re: Thread safety

2009-04-28 Thread Keary Suska
On Apr 28, 2009, at 8:32 AM, Trygve Inda wrote: "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

Remote host reachability

2009-04-28 Thread Kiran Kumar S
what is the best way to check remote host reachability without effecting main thread, at the time of lauching itself i am trying to access remote host thru DO, and if the remote host is up then there is no problem , but if the remote is down its taking long time to launch. Please help me o

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 ch

Re: Opening a saved project

2009-04-28 Thread Graham Cox
On 28/04/2009, at 10:17 PM, Mahaboob wrote: So how can I get the path of the saved project when I'm double clicking it? Is your app document-based? If so, it should automatically make a document object and pass the URL to its -readFromURL:ofType:error: method. If it's not working maybe

Opening a saved project

2009-04-28 Thread Mahaboob
I did file association and saved one project using myExtension. When I'm double clicking this saved project my application gets opened but, it not shows the contents that I were saved. So how can I get the path of the saved project when I'm double clicking it? Thanks in advance mahaboob ___

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

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 URL to it. On Apr 27, 2009, at 10:01 PM, K

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

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) a

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 au

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 wr

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 Observ

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 doubl

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 ~/Library/Pre

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 represent

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 wer

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 comment

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, proce

Re: Scheduling application

2009-04-28 Thread Mahaboob
Thanks for your assistance. 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? Also I paste the plist file in to LaunchDaemons from LaunchAgents but, it is not working. I'm attaching the plist file here. Is there

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 ___ Cocoa-dev

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 MacRo

  1   2   >