Re: NSPersistentDocument Tutorial (SOLVED)

2008-03-13 Thread Ian Jackson
I assumed that fullNameAndID would be available among the choices presented in the bindings pane. That not being the case, I tried typing it in, and it worked. Yay! Ian. On 13/03/2008, at 1:20 AM, Adam P Jenkins wrote: On Mar 12, 2008, at 5:15 AM, Ian Jackson wrote: I was happily pluggi

Re: How to make a UI like in Mail?

2008-03-13 Thread Thomas Engelmeier
On 12.03.2008, at 23:54, Thomas Wickl wrote: I´m new to Cocoa and I really need a hint in UI Design. How can I create this Panel like it is shown in a lot of Application like Mail? That is not a panel (a panel is a window with a small title bar), it is a "source list", a special case of

Re: performSelectorOnMainThread problem

2008-03-13 Thread Thomas Engelmeier
On 13.03.2008, at 02:27, Nick Rogers wrote: In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES]; with the error that self does not recognize the selector updateProgress. I have imported the main AppController.h i

NSSpeechSynthesizer/UKSpeechSynthesizer speechSynthesizer:didFinishSpeaking: called immediarely

2008-03-13 Thread Ben Lachman
According to the NSSpeechSynthesizer docs: speechSynthesizer:didFinishSpeaking: is invoked when the speaking of the string ends. The second parameter of this method indicates whether the text was entirely spoken or was disrupted (as might happen if the user dismisses a spoken alert). This

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Thomas Engelmeier
On 13.03.2008, at 04:03, Jens Alfke wrote: Part of the fun of being an early adopter is that you have to figure stuff out before there are books to explain it. It's your choice; you could wait six months or a year for some books. But then you won't be one of the first. (Actually, the cur

Restricting Out of bounds Memory Allocation

2008-03-13 Thread Mayank Varshney
Hi I tried setting limits to Resident set Size of a program and still I can access memory outside the specified limit. Is there any way to restrict memory allocation if it falls outside the specified limit or if amount of memory to be allocated is more than RSS. Any help or pointers in this regar

How to solve application hang issue?

2008-03-13 Thread parag vibhute
Hi guys, I have implemented cocoa application in which I am using threading. While running the application hangs in between & I am unable to find out where exactly in code it is hanging. Can you tell me how to debug hang issue? Thanks, Palav -- There are many things in your life that will catc

Re: How to solve application hang issue?

2008-03-13 Thread Stephane Sudre
On Mar 13, 2008, at 11:43, parag vibhute wrote: Hi guys, I have implemented cocoa application in which I am using threading. While running the application hangs in between & I am unable to find out where exactly in code it is hanging. Can you tell me how to debug hang issue? Thread Viewer

Re: Mute System

2008-03-13 Thread I. Savant
On Mar 13, 2008, at 12:10 AM, Christopher Nebel wrote: Uh, yeah. We consider using AppleScript from an otherwise Objective- C app for anything other than user-supplied scripts to be bad form, because it's wildly inefficient. In particular, you shouldn't use it just because you can't find t

Re: Xcode Editor's Regex now uses PCRE instead of ICU?

2008-03-13 Thread Thomas Engelmeier
On 13.03.2008, at 08:37, Clark Cox wrote: On Wed, Mar 12, 2008 at 5:40 PM, Alastair Houghton <[EMAIL PROTECTED]> wrote: Yes, that's true. You can see the sources for CFString in the Darwin source tree. Furthermore, string constants (even @"" and CFSTR("") ones) are encoded in ASCII by th

Re: How to make a UI like in Mail?

2008-03-13 Thread Stephane Sudre
On Mar 13, 2008, at 10:04, Thomas Engelmeier wrote: On 12.03.2008, at 23:54, Thomas Wickl wrote: I´m new to Cocoa and I really need a hint in UI Design. How can I create this Panel like it is shown in a lot of Application like Mail? That is not a panel (a panel is a window with a small t

Re: NSSpeechSynthesizer/UKSpeechSynthesizer speechSynthesizer:didFinishSpeaking: called immediarely

2008-03-13 Thread Paul Bruneau
On Mar 13, 2008, at 5:27 AM, Ben Lachman wrote: According to the NSSpeechSynthesizer docs: speechSynthesizer:didFinishSpeaking: is invoked when the speaking of the string ends. The second parameter of this method indicates whether the text was entirely spoken or was disrupted (as might ha

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Jeff LaMarche
On Mar 13, 2008, at 5:43 AM, Thomas Engelmeier wrote: Maybe it paid off to be a "late adoptor". "Inside Macintosh:AppleTalk" and "New Inside Macintosh:Quicktime" / "New Inside Macintosh:Interapplication Communication" set a very high standard for documentation - far higher than the IBM UI

What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Greg Robertson
For the beginner cocoacast.com has some follow along screencasts on Objective C 2.0 as well as the Aaron Hillegass examples. They are not books but are about as close to a tutorial as you will find and like the apple docs the price is right. Greg ___ C

Autorelease question

2008-03-13 Thread Daniel Luis dos Santos
Hello, I have the following code : if (![fileMgr fileExistsAtPath: indexFilePath]) { NSMutableDictionary *index = [[NSMutableDictionary alloc] init]; [index setObject: [NSNumber numberWithLong: DEFAULTS_BLOCKSIZE] forKey: INDEXKEY_BLOCKSIZE]; [index setObject: [NSNu

Re: Autorelease question

2008-03-13 Thread Ben Hatfield
If you use convenience methods (as in the else branch) it is autoreleased. See here for details: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html#//apple_ref/doc/uid/2043 On Thu, Mar 13, 2008 at 8:19 AM, Daniel Luis dos Santos < [EMAIL PROTECT

Re: Autorelease question

2008-03-13 Thread Paul Bruneau
Hi, Daniel- You are right. I think you did a great job of troubleshooting the problem. In your first branch, you alloc'd and init'd your dictionary which gives you a retained object. in your second branch, you used what is called a "convenience method" to get your dictionary which comes

Re: Autorelease question

2008-03-13 Thread Hank Heijink (Mailinglists)
On Mar 13, 2008, at 9:19 AM, Daniel Luis dos Santos wrote: NSDictionary *index = [NSDictionary dictionaryWithContentsOfFile: indexFilePath]; This dictionary is autoreleased when it's given to you, hence the error when you try to release it. Refer to

Re: Autorelease question

2008-03-13 Thread Chris Holloway
You are correct, [NSDictionary dictionaryWithContentsOfFile:indexFilePath] will return an autoreleased object, so you do not need to call [index release]. Take a look at this article: http://www.stepwise.com/Articles/Technical/HoldMe.html On 13/03/2008, Daniel Luis dos Santos <[EMAIL PROTECTED]>

Re: How to make a UI like in Mail?

2008-03-13 Thread Conor
>> I�m new to Cocoa and I really need a hint in UI Design. How can I >> create this Panel like it is shown in a lot of >> Application like Mail? http://developer.apple.com/samplecode/SourceView/index.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: [Q] How can I repair file name with wrong encoding?

2008-03-13 Thread Jens Alfke
On 12 Mar '08, at 10:27 PM, S.J.Chun wrote: It seems that when Finder unzips the zip file from Windows(which have files of CP949 encoded filename), it does not make unzipped file name as byte-by-byte equally as CP949; it does use some kind of unknown transformation of encoded name. That's too

How do I empty WebView;s cache?

2008-03-13 Thread Keith Wilson
How do I empty WebView's caches? I have an app that generates web pages and I use WebView so the user can preview the results. Each web page links to some JPEGS. The user can change settings, preview individual web pages, go back and forward, etc and make sure that it works OK. Some of th

Re: Xcode Editor's Regex now uses PCRE instead of ICU?

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 4:01 AM, Thomas Engelmeier wrote: As of Leopard or as of Xcode 3.x? I think it just matters which version of gcc is being used, so that would make it an Xcode feature, basically. And, if I read the paragraph above correctly, the compiler will expand @"UTF-8 string" in

Re: Xcode Editor's Regex now uses PCRE instead of ICU?

2008-03-13 Thread Clark Cox
On Thu, Mar 13, 2008 at 4:01 AM, Thomas Engelmeier <[EMAIL PROTECTED]> wrote: > > On 13.03.2008, at 08:37, Clark Cox wrote: > > > On Wed, Mar 12, 2008 at 5:40 PM, Alastair Houghton > > <[EMAIL PROTECTED]> wrote: > >> > > > >> Yes, that's true. You can see the sources for CFString in the Darwin

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Jens Alfke
On 12 Mar '08, at 11:23 PM, Seth Willits wrote: Obj-C 2.0 takes 20 minutes to learn. There's not that much different, and the docs cover it pretty well. For the most part; but there are some subtleties* that can take some extra time to grasp later on as you run into them. (They are docum

Re: How to make a UI like in Mail?

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 4:06 AM, Stephane Sudre wrote: Isn't a window with a small title bar a palette window? I thought a panel could either be a standard window used for dialogs or a palette window. Yeah. The difference is functional, not visual (confusingly enough) — an NSPanel doesn't beco

Re: NSSpeechSynthesizer/UKSpeechSynthesizer speechSynthesizer:didFinishSpeaking: called immediarely

2008-03-13 Thread Dave Verwer
I have been using this callback extensively recently in the way you describe and have not seen this issue either. On 3/13/08, Paul Bruneau <[EMAIL PROTECTED]> wrote: > On Mar 13, 2008, at 5:27 AM, Ben Lachman wrote: > > > According to the NSSpeechSynthesizer docs: > > > > speechSynthesizer:didF

AppleScript Support with Plugin

2008-03-13 Thread Herr Thomas Bartelmess
Hello, can somebody please help me. I want to create a pluging witch adds applescript support to my application.. Thanks for all kind of help ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator com

Re: runtime error (-> ObjectAlloc)

2008-03-13 Thread Daniel Child
An autorelease pool got me through the parsing operation without issue. Thanks for your input. In ObjectAlloc, is there a way to figure out what exactly how each "General Block" matches up with objects in code? I can make rough guesses based on the data types and their behavior, but can the

sorting large tables

2008-03-13 Thread Daniel Child
Hi, I am using sortArrayUsingFunction: context: to sort a fairly large table (100k recs). Judging from the readout of comparisons being made the sort appears to be about 80% done when everything comes to a halt. No message, no nothing. It just stops. The exact same function works if the t

Re: sorting large tables

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 8:52 AM, Daniel Child wrote: I am using sortArrayUsingFunction: context: to sort a fairly large table (100k recs). Judging from the readout of comparisons being made the sort appears to be about 80% done when everything comes to a halt. No message, no nothing. It just sto

Re: sorting large tables

2008-03-13 Thread Keary Suska
on 3/13/08 9:52 AM, [EMAIL PROTECTED] purportedly said: > Unfortunately, the table is not KVO-compliant so I cannot use > NSSortDescriptor. And I need to pass the primary and secondary sort > fields at runtime, so I cannot use sortUsingSelector since it takes > no parameters. -sortUsingSelector t

Re: AppleScript Support with Plugin

2008-03-13 Thread Sherm Pendley
On Thu, Mar 13, 2008 at 6:36 AM, Herr Thomas Bartelmess < [EMAIL PROTECTED]> wrote: > Hello, > can somebody please help me. > I want to create a pluging witch adds applescript support to my > application.. Here's a good starting point for making your app scriptable: < http://developer.apple

Re: [newbie] NSTableView - First NSColumn should not be affected by horizontal scrollbar

2008-03-13 Thread Tobias R.
On 3/10/08, Stephane Sudre <[EMAIL PROTECTED]> wrote: > > Short answer: No. > > It might be easier to use 2 NSTableViews side by side, hide the > vertical scrollbars on the leftmost tableview and synchronize the > scrolling Scrolling works. MyController: IBOutlet id leftScrollView; IBOutlet i

Re: AppleScript Support with Plugin

2008-03-13 Thread Herr Thomas Bartelmess
Sorry for my bad explaination, i have to write a plugin for a programm (this programm is not written by me), and my plugin should be callable from the outside (with applescript). anyway... thanks for the help thomas Am 13.03.2008 um 17:41 schrieb Sherm Pendley: On Thu, Mar 13, 2008 at 6:36 A

Re: AppleScript Support with Plugin

2008-03-13 Thread John C. Daub
on 3/13/08 5:36 AM, Herr Thomas Bartelmess at [EMAIL PROTECTED] wrote: > can somebody please help me. > I want to create a pluging witch adds applescript support to my > application.. Try these resources: http://developer.apple.com/cocoa/applescriptforapps.html http://developer.apple.com/docume

Multiple downloads crash in Leopard

2008-03-13 Thread Rahul Shetty
Hi All, We are developing an application that runs both on Tiger (10.4.9 to be specific) and Leopard. We do quite a lot of downloads simultaneously ( in the range of 100-200). NSURLDownload is used for the purpose. We witness some random crashes while doing so. We use separate thre

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread David Carlisle
Does anyone know the status of the "Cocoa Design Patterns" book by Erik Buck, "rough-cuts" version or otherwise? Amazon says 12 January 2009. On Mar 12, 2008, at 5:54 PM, colo wrote: And might there be others ? ___ Cocoa-dev mailing list (Cocoa-

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Jason Sallis
My preorder on Amazon says it's shipping from July 10-18 On Thu, Mar 13, 2008 at 11:37 AM, David Carlisle <[EMAIL PROTECTED]> wrote: > Does anyone know the status of the "Cocoa Design Patterns" book by > Erik Buck, "rough-cuts" version or otherwise? > > Amazon says 12 January 2009. > > On Mar 12,

Re: How do I empty WebView;s cache?

2008-03-13 Thread Nick Zitzmann
On Mar 13, 2008, at 8:51 AM, Keith Wilson wrote: How do I empty WebView's caches? The first thing I'd try would be [[NSURLCache sharedURLCache] removeAllCachedResponses]... Nick Zitzmann ___ Cocoa-dev mailing list

Re: AppleScript Support with Plugin

2008-03-13 Thread Herr Thomas Bartelmess
Thanks for your Help everyone. I haven't get what i needed yet. I have to write a plugin for an application (Daylite from Marketcircle). An this plugin should extend the scripting commands (Incoming Call). So i have to extend the .sdef file from a plug-in. Thanks for any help from anyone Th

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Thomas Engelmeier
On 13.03.2008, at 13:39, Jeff LaMarche wrote: On Mar 13, 2008, at 5:43 AM, Thomas Engelmeier wrote: Maybe it paid off to be a "late adoptor". "Inside Macintosh:AppleTalk" and "New Inside Macintosh:Quicktime" / "New Inside Macintosh:Interapplication Communication" set a very high standar

How does Omnifocus avoid getting focus?

2008-03-13 Thread Drew McCormack
Omnifocus has a quick note panel that you can bring up with a hot key. When it comes up, Omnifocus does not become the active app, but the entry panel does get key focus. I know you can do this with a helper app, but I don't think Omnifocus is actually starting a helper app. At least, I don

Re: How does Omnifocus avoid getting focus?

2008-03-13 Thread Tom Bunch
NSNonactivatingPanelMask On Mar 13, 2008, at 12:45 PM, Drew McCormack wrote: Omnifocus has a quick note panel that you can bring up with a hot key. When it comes up, Omnifocus does not become the active app, but the entry panel does get key focus. I know you can do this with a helper app,

Re: What is the status on the New Cocoa 2.0 Books?

2008-03-13 Thread Greg Robertson
Sounds like it might be delayed, from her mailing list: I can't write about the SDK for TUAW, for O'Reilly and can't pub anything (we're even worried about technical review!) for Addison Wesley. -- Erica, upcreek ___ Cocoa-dev mailing list (Cocoa-dev@l

[ANN] 10.5.2 Core Data debug library available

2008-03-13 Thread Ben Trumbull
All, For ADC members, debug libraries for 10.5, and now 10.5.1 & 10.5.2, are available in the Developer Tools section of Downloads as "Debug and Profile Libraries for Mac OS X 10.5". There's a tech note about how to use these frameworks with DYLD_IMAGE_SUFFIX. 'man dyld' also works. Since

Re: sorting large tables

2008-03-13 Thread Daniel Child
That makes a lot of sense to me, and that's the situation I'm trying to get to. But right now all I have is the original (unsorted) raw data. So I need to load it into memory and sort it. Since the sorting operation hangs some kazillion compare:s into the process, I can't exactly trace my w

Re: AppleScript Support with Plugin

2008-03-13 Thread John C. Daub
on 3/13/08 1:42 PM, Herr Thomas Bartelmess at [EMAIL PROTECTED] wrote: > Thanks for your Help everyone. > I haven't get what i needed yet. > I have to write a plugin for an application (Daylite from > Marketcircle). An this plugin should extend the scripting commands > (Incoming Call). So i have t

File upload with NSURLRequest fails

2008-03-13 Thread Tom Harrington
I'm trying to upload a file with the NSURL* API, but on the server end the PHP code is unable to decode the $_FILES array. The PHP code works fine when posted from an HTML form (and from clients on other platforms). Traffic sniffed on the wire looks good as far as I can tell, so what would be the

re: sorting large tables

2008-03-13 Thread Ben Trumbull
Unfortunately, the table is not KVO-compliant so I cannot use NSSortDescriptor. And I need to pass the primary and secondary sort fields at runtime, so I cannot use sortUsingSelector since it takes no parameters. NSSortDescriptor requires an object be *KVC* compliant. It does not use KVO. S

Re: File upload with NSURLRequest fails

2008-03-13 Thread Tom Harrington
On Thu, Mar 13, 2008 at 2:50 PM, Tom Harrington <[EMAIL PROTECTED]> wrote: > [postBody appendData:[[NSString stringWithString:@"Content-Type: > null\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; Someone asked about this. FYI, "null" is what the other clients use, but if I use "imag

Best Way To Lookup From a Huge Table

2008-03-13 Thread Karan Lyons
What's the best way to lookup something from a huge table? I'm trying to write a piece of code that checks weather data given a zipcode. But I first need to change that zipcode into another format in order for it to work with the online service I'm querying. For example: 1

Re: Best Way To Lookup From a Huge Table

2008-03-13 Thread John Stiles
NSDictionary should be all you need here. It internally uses a hash table to find keys, so it should be extremely fast. Karan Lyons wrote: What's the best way to lookup something from a huge table? I'm trying to write a piece of code that checks weather data given a zipcode. But I fir

Re: File upload with NSURLRequest fails

2008-03-13 Thread Tom Harrington
Also, for what it's worth, I can hit the server just fine at the command line with: curl -F "[EMAIL PROTECTED];filename=7195554321_1_20080311132327_jpg" http://server:8080/php/post.php ...yet for some reason the NSURLRequest approach fails. Any/all tips are welcome. On Thu, Mar 13, 2008 at 3:0

weak linking of ImageKit framework

2008-03-13 Thread Daniel Dalquen
I am developing an app that should run on Tiger as well as Leopard. I want to use IKSlideshow when running on Leopard, so I wrote a class (let's call it MyDataSource) that implements the methods of IKSlideshowDataSource, which is instantiated in the method that will start the slideshow. Thi

Re: [Q] How can I repair file name with wrong encoding?

2008-03-13 Thread Aki Inoue
Yes, sounds like there really is a bug. Please file a bug and attached the zip archive possible. Thank you, Aki On 2008/03/13, at 7:48, Jens Alfke wrote: On 12 Mar '08, at 10:27 PM, S.J.Chun wrote: It seems that when Finder unzips the zip file from Windows(which have files of CP949 encode

Re: [Q] How can I repair file name with wrong encoding?

2008-03-13 Thread John Stiles
Maybe it's treating the filename bytes as Latin-1? Just a guess, but that'd be the first thing I'd check. Second would be MacRoman. Aki Inoue wrote: Yes, sounds like there really is a bug. Please file a bug and attached the zip archive possible. Thank you, Aki On 2008/03/13, at 7:48, Jens

Re: Multiple downloads crash in Leopard

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 10:31 AM, Rahul Shetty wrote: We do quite a lot of downloads simultaneously ( in the range of 100-200).NSURLDownload is used for the purpose. We witness some random crashes while doing so. We use separate threads to carry out these downloads. One thread is made to h

Re: sorting large tables

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 1:42 PM, Daniel Child wrote: That makes a lot of sense to me, and that's the situation I'm trying to get to. But right now all I have is the original (unsorted) raw data. So I need to load it into memory and sort it. You don't necessarily need to sort all of it at once. Y

Re: Best Way To Lookup From a Huge Table

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 2:11 PM, Karan Lyons wrote: The table itself is pretty simple: It's just two columns, one with every zipcode in the US, and the other with the corresponding weather code. If the weather-codes are all as short as in your example, you could create a file that's just an on

Re: How do I empty WebView;s cache?

2008-03-13 Thread Keith Wilson
Thanks Nick, [[NSURLCache sharedURLCache] removeAllCachedResponses] did not work but thanks for the pointer - I will play around and see what does work. Keith On 14/03/2008, at 4:41 AM, Nick Zitzmann wrote: On Mar 13, 2008, at 8:51 AM, Keith Wilson wrote: How do I empty WebView's ca

Core Animation - Modifying CAConstraints

2008-03-13 Thread Karl Goiser
Hello Cocoaers, I have a situation where I want to re-order sublayers of a layer which are positioned using CAConstraints. Is this at all possible? The constraints array property of a CALayer is declared as: @property(copy) NSArray *constraints; Which tells me that I can't modify the array

QCView openGLContext

2008-03-13 Thread Lorenzo
Hi, I build my app against 10.4 SDK. The compiler says that there are no errors. My app runs on Leopard very well. But on Tiger I get this error all the time and my app won't launch. -- [MYQCView openGLContext] : selector not recognized [self = 0x1492fee0] -- If I comment this line below [[qcV

Re: QCView openGLContext

2008-03-13 Thread Sam McDonald
I have programmed cocoa for less than a year, so if I say something stupid please bare with me. Of the programming I have done most of it has been with QC apps. From what I remember the openGLContext was added in 10.5 (and made me very excited). In my 10.4 application I created a glcontex

Re: BitMap data format and autorelease

2008-03-13 Thread Trygve Inda
> I'd use something like this (typed in Mail): > > [NSGraphicsContext saveGraphicsState]; > [NSGraphicsContext setCurrentContext:[NSGraphicsContext > graphicsContextWithBitmapImageRep:imageRep]]; > > // draw here > > [NSGraphicsContext restoreGraphicsState]; > > which avoids creating an NSImag

get currently logging in users

2008-03-13 Thread lazuardi
Dear All, I have a problem getting currently logging in users at Tiger. I use darwin's "who" command to retrieve those list. At leopard, it works well. But at Tiger it didn't give me the correct data. When I have username more than 8 characters (i.e. developer), Tiger will only give me the

Re: get currently logging in users

2008-03-13 Thread Andrew Farmer
On 13 Mar 08, at 17:49, lazuardi wrote: Does anybody know how to get the full username of the currently logging in user at Tiger? Foundation Functions Reference suggests NSUserName(). There are a bunch of related functions (home directories, full username, etc) available in there as well.

Re: QCView openGLContext

2008-03-13 Thread Lorenzo
Thank you Sam, Your code looks promising. One question, should the renderView be a simple NSView, a QCView or an NSOpenGLView? If not a QCView, should I fire a timer each 1/60 sec in order to render with renderAtTime into the NSView or OpenGLView? Best Regards -- Lorenzo email: [EMAIL PROTECTED]

Re: BitMap data format and autorelease

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 5:44 PM, Trygve Inda wrote: Is this thread-safe? Or is it better to create the NSImage so I can call lockFocus ? The two are equally thread-safe, I'm pretty sure. I have never been brave enough to use AppKit on multiple threads, but I believe the current graphics contex

Re: BitMap data format and autorelease

2008-03-13 Thread Adam R. Maxwell
On Mar 13, 2008, at 5:44 PM, Trygve Inda wrote: I'd use something like this (typed in Mail): [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:imageRep]]; // draw here [NSGraphicsContext restoreGraphicsState]; wh

Re: get currently logging in users

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 5:49 PM, lazuardi wrote: Does anybody know how to get the full username of the currently logging in user at Tiger? You could have answered this yourself by opening Xcode's documentation window (Help > Documentation), typing "username" into the search field, and setting

Re: get currently logging in users

2008-03-13 Thread lazuardi
On 2008/03/14, at 9:59, Andrew Farmer wrote: On 13 Mar 08, at 17:49, lazuardi wrote: Does anybody know how to get the full username of the currently logging in user at Tiger? Foundation Functions Reference suggests NSUserName(). There are a bunch of related functions (home directories, fu

Re: QCView openGLContext

2008-03-13 Thread Sam McDonald
With that application I used an NSView, but I was very new to cocoa and only did that because that is what some sample code did. A QCView in 10.4 didn't do a whole lot for you if you aren't using bindings if I remember right. NSView worked fine for use, but now looking at NSOpenGLView, it

Strange retainCount from NSTimer

2008-03-13 Thread Brian Greenstone
I'm hoping someone can shed some light on this for me. I'm getting some unusual retainCount values from the following code: NSTimer *theTimer; theTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:

Re: Strange retainCount from NSTimer

2008-03-13 Thread John Stiles
I guess this just proves the age-old rule, "never rely on the return value of -retainCount to make sense." :) Seriously, this does seem weird, but -retainCount seems to have a mind of its own. Just have faith in the memory management rules. Brian Greenstone wrote: I'm hoping someone can shed s

Re: sorting large tables

2008-03-13 Thread Ben Trumbull
oops, lost the list on the cc: At 2:55 PM -0700 3/13/08, [EMAIL PROTECTED] wrote: In answer to your question, each record is a "GenericRecord" which contains an array of fields and a numfields count (which varies by record). The table is a "GenericTable" that has an ivar that holds an array of

Re: Strange retainCount from NSTimer

2008-03-13 Thread Chris Suter
On 14/03/2008, at 12:37 PM, Brian Greenstone wrote: But that shouldn't be, right? Shouldn't the retainCount of theTimer be 1 after scheduledTimerWithTimeInterval? Then shouldn't it be bumped up to 2 after adding the timer to the Run Loop? It appears that the retain count is starting at

Re: Strange retainCount from NSTimer

2008-03-13 Thread Tom Bunch
I would expect, at "A", for the timer to have any retain count of at least one, and an equal number of releases pending in your autorelease pool. Maybe the run loop's autorelease pool is getting popped or drained as a side effect of adding the timer or something. If you really want to fig

Re: get currently logging in users

2008-03-13 Thread Kyle Sluder
On Thu, Mar 13, 2008 at 9:11 PM, lazuardi <[EMAIL PROTECTED]> wrote: > I hope to retrieve the whole list of users that currently logging in > at the machine. who (and last) use wtmp and utmp. man utmp(5) for info on how you can access this information in your own programs. --Kyle Sluder __

Re: get currently logging in users

2008-03-13 Thread lazuardi
On 2008/03/14, at 10:51, Kyle Sluder wrote: who (and last) use wtmp and utmp. man utmp(5) for info on how you can access this information in your own programs. Yes, I did use utmp as the darwin did at who command, referenced from shell_cmds-811 from darwin source. but, as I said at my m

Re: Strange retainCount from NSTimer

2008-03-13 Thread Michael Ash
On Thu, Mar 13, 2008 at 9:37 PM, Brian Greenstone <[EMAIL PROTECTED]> wrote: > I'm hoping someone can shed some light on this for me. I'm getting > some unusual retainCount values from the following code: > > NSTimer *theTimer; > > theTimer = [NSTimer scheduledTimerWithTimeInterva

Re: sorting large tables

2008-03-13 Thread Daniel Child
On Mar 13, 2008, at 6:24 PM, Jens Alfke wrote: You don't necessarily need to sort all of it at once. You just need to find the first few items, to display in your table view. If the user scrolls past those, you need to find more. You can do this by streaming the data from a file, keeping on

Can core data save to a remote file?

2008-03-13 Thread Adam Gerson
I would like multiple copies of my coredata app to read from and save to the same XML file located on a server. I see that persistentStoreCoordinator just uses an NSURL which is great for remote reading because I can pass it an http url. However, Is there a good way to establish writableility throu

Re: IKSlideshow - SOLVED

2008-03-13 Thread Adam Gerson
http://developer.apple.com/samplecode/CocoaSlides/ On Wed, Mar 12, 2008 at 11:09 PM, Adam Gerson <[EMAIL PROTECTED]> wrote: > I am looking at the code to create an automatic slideshow inside my > application. When I start the slideshow playing with > runSlideshowWithDataSource:inMode:options:

What's the trick to eliminating 'halos' on buttons?

2008-03-13 Thread Todd Blanchard
I've got this pane with a bunch of checkboxes. When the thing comes up, the first checkbox always has a blue glow (focus rings you call em?). Anyhow, they don't suit my app. I want to turn them off, but I don't see an option in IB for this. What's the trick to disabling all focus rings i

Re: get currently logging in users

2008-03-13 Thread Michael Watson
Why not peruse the sources of the who utility and see how it finds the data you want? http://www.opensource.apple.com/darwinsource/10.5/shell_cmds-116/who/ -- m-s On 13 Mar, 2008, at 22:27, lazuardi wrote: On 2008/03/14, at 10:51, Kyle Sluder wrote: who (and last) use wtmp and utmp. ma

Re: sorting large tables

2008-03-13 Thread Dave Hersey
For one thing: // in GenericRecord implementation int sortGenericRecord (GenericRecord *rec1, GenericRecord *rec2, void *fieldNum) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; int *columnPtr = (int *) fieldNum; int column = *columnPtr; NSString *rec1Fi

Re: What's the trick to eliminating 'halos' on buttons?

2008-03-13 Thread Dave Hersey
Set the control's focus ring to "none" in IB. - d On Mar 13, 2008, at 11:56 PM, Todd Blanchard wrote: I've got this pane with a bunch of checkboxes. When the thing comes up, the first checkbox always has a blue glow (focus rings you call em?). Anyhow, they don't suit my app. I want to tu

Re: How do I empty WebView;s cache? (SOLVED)

2008-03-13 Thread Keith Wilson
None of the NSURLCache sharedURLCache stuff seemed to work, so I simply changed the name of my temp folder (temp1, temp2, temp3,,,) each time the user changes a parameter and regenerates the web site files. Then the WebView has a new path for each hyper-link and ignores what has been cached

Re: Core Animation - Modifying CAConstraints

2008-03-13 Thread Dimitri Bouniol
As far as i know, you can either set the constraints property to nil and re-set the constraints you want to use, or set up your own layout manager to handle positioning the layers. On Mar 13, 2008, at 4:23 PM, Karl Goiser wrote: Hello Cocoaers, I have a situation where I want to re-order s

newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib

2008-03-13 Thread Edward Scholl
Working through the Currency Converter tutorial, and I get to the "Add the ConverterController Class to Your Nib File" (http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/06Controller/chapter_6_section_6.html) part, where I choose file-read class, and select ConverterController.

Re: get currently logging in users

2008-03-13 Thread lazuardi
Why not peruse the sources of the who utility and see how it finds the data you want? http://www.opensource.apple.com/darwinsource/10.5/shell_cmds-116/who/ yes, I have done checking both of the leopard and tiger's darwin sources, before I ask to the mailinglists. The main difference betwe

Re: newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib

2008-03-13 Thread Dave Hersey
Just a guess, but if you're using Interface Builder 3, that approach doesn't work anymore. Instead, you need to drag an "Object" object (it looks like a blue cube) from the Library to your nib, and then change its class to what you want using the "i" tab in the Inspector. If you need more

Re: sorting large tables

2008-03-13 Thread Nir Soffer
On Mar 14, 2008, at 05:34, Daniel Child wrote: @interface GenericRecord : NSObject { NSMutableArray *record; ... plus a couple ivars not used for the sort } Field access is slower because you have to call two methods instead of one - one of the generic recorder, and then the array ob

Re: Can core data save to a remote file?

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 8:38 PM, Adam Gerson wrote: I see that persistentStoreCoordinator just uses an NSURL which is great for remote reading because I can pass it an http url. Not necessarily. There are APIs in the system that take URLs, but only work with file: URLs. (For example, NSDocument.

Re: newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib

2008-03-13 Thread Edward Scholl
Thanks Dave and Dave- that was exactly the problem. I searched the archives, but couldn't quite find the solution. I don't feel like quite the total dummy now. ;D On Thu, Mar 13, 2008 at 9:33 PM, Dave Hersey <[EMAIL PROTECTED]> wrote: > Just a guess, but if you're using Interface Builder 3, t

How to make a Panel like in Mail?

2008-03-13 Thread Thomas Wickl
Hello, I´m new to Cocoa and I really need a hint in UI Design. How can I create this Panel like it is shown in a lot of Application like Mail? http://www.spongedpics.com/upload/WH1205339930W47d8071ae5a64-Panel.jpg And also how do they make this Bar at the Bottom? http://www.spongedpics.com/

Re: Can core data save to a remote file?

2008-03-13 Thread Kyle Sluder
On Thu, Mar 13, 2008 at 11:38 PM, Adam Gerson <[EMAIL PROTECTED]> wrote: > I would like multiple copies of my coredata app to read from and save > to the same XML file located on a server. Core Data does not support simultaneous access to a store. > I see that > persistentStoreCoordinator just

Re: get currently logging in users

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 9:30 PM, lazuardi wrote: yes, I have done checking both of the leopard and tiger's darwin sources, before I ask to the mailinglists. You are asking to the *wrong* mailinglist. This one is for Cocoa (Foundation/AppKit/etc.) programming. Your question is about lower- level

Re: sorting large tables

2008-03-13 Thread Jens Alfke
On 13 Mar '08, at 8:34 PM, Daniel Child wrote: It sounds like my program shouldn't be freezing in the first place, since my files are not THAT big. Here are the details. The most useful details would involve a sample* of what your program's doing. My guess is that it's just taking an extre

  1   2   >