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

2008-03-12 Thread Seth Willits
On Mar 12, 2008, at 6:24 PM, Michael Gregoire wrote: Though tutorials and guides are severely lacking in the Objective-C 2.0 arena. Obj-C 2.0 takes 20 minutes to learn. There's not that much different, and the docs cover it pretty well. -- Seth Willits ___

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

2008-03-12 Thread S.J.Chun
Hi, I've used this code, but it does not work; if ([self canBeConvertedToEncoding:_KoreanInWindows]) { NSData *newData = [self dataUsingEncoding:_KoreanInWindows]; NSString *newString = [[NSString alloc] initWithData:newData encoding:_KoreanInWindows];

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

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 9:40 PM, S.J.Chun wrote: For example, a file in zip archive from Windows(Korean), the file name will have CP949 encoding. If I unzip this file the file name looks weird as you already expected. How can I repair the name of file? That depends on what the un-zip program did

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

2008-03-12 Thread Kyle Sluder
On Thu, Mar 13, 2008 at 12:40 AM, "S.J.Chun" <[EMAIL PROTECTED]> wrote: > For example, a file in zip archive from Windows(Korean), the file name > will have CP949 encoding. If I unzip this file the file name looks weird as > you already expected. How can I repair the name of file? Are you looki

Re: Core Data - Cascading Not Working? (William Hunt)

2008-03-12 Thread William Hunt
Problem Solved As an update to my previous question... I'm an idiot. I forgot to actually connect my two objects. They were created, but not actually "connected." --- Artificially Quoted.. --- Hello, again! Ok, my new problem deals with a very simple object graph that isn't propagating

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

2008-03-12 Thread S.J.Chun
Hi, I know there's application called "File Name Encoding Repair.app". What I want to know is how can I make my application fix like this application. For example, a file in zip archive from Windows(Korean), the file name will have CP949 encoding. If I unzip this file the file name looks weird as

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

2008-03-12 Thread Jeff LaMarche
On Mar 12, 2008, at 11:03 PM, Jens Alfke wrote: (Actually, the current docs are quite good, all things considered. Back in the day, the system documentation used to consist of badly- Xeroxed copies of napkins that the programmers had scrawled some instructions on, while suffering from exhau

Re: Mute System

2008-03-12 Thread Christopher Nebel
On Mar 12, 2008, at 12:23 PM, I. Savant wrote: On Wed, Mar 12, 2008 at 2:49 PM, Herr Thomas Bartelmess <[EMAIL PROTECTED] > wrote: Hi everyone, does somebody know, what i have to do to control the system Aduio Volume (mute, increase, decrease). I searched a lot, but without result A quick

Re: Convenience initializer not working: "unrecognized selector"

2008-03-12 Thread Adam Leonard
Read up on the difference between class and instance methods http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_3_section_3.html#/ /apple_ref/doc/uid/TP30001163-CH12-TPXREF122 And the how memory allocation/initiation works http://developer.apple.com/documenta

Re: Convenience initializer not working: "unrecognized selector"

2008-03-12 Thread Chris Suter
On 13/03/2008, at 2:25 PM, K. Darcy Otto wrote: But if I do this, I get the unrecognized selector error: Fraction *frac1 = [Fraction initWith:2 over:2]; Try [[Fraction alloc] initWith:2 over:2] - Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists

Convenience initializer not working: "unrecognized selector"

2008-03-12 Thread K. Darcy Otto
I'm trying to create an initializer that allows me to combine initialization and some setting of variables, but I get an error that an "unrecognized selector" has been sent to the object. Here is what I have so far: Fraction.h: #import @interface Fraction : NSObject { NSInteger n

IKSlideshow

2008-03-12 Thread Adam Gerson
I am looking at the code to create an automatic slideshow inside my application. When I start the slideshow playing with runSlideshowWithDataSource:inMode:options: the slide show controls (next, previous, end show, etc..) are showing. I would like to hide these by default when the slideshow starts.

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

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 6:09 PM, colo wrote: As I two really want to get started at learning how to code for the NDA thing as well That NDA thing must be just that awesome to wait so long for some docs Part of the fun of being an early adopter is that you have to figure stuff out before there are

Re: Window not showing

2008-03-12 Thread Rob Napier
Your problem is that you have two separate Progress objects (or possibly only one Progress object that doesn't point to anything). The Progress object that you alloc in appDidFinish has nothing to do with your NIB and no knowledge of your NIB objects. NIB-loaded objects all have to be tied togethe

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

2008-03-12 Thread Vince LaMonica
FYI I talked to the publisher tuesday and the Cohen book, "The XCode 3 Book" has been canceled :( /vjl/ On Wed, Mar 12, 2008 at 8:48 PM, Gary L. Wade <[EMAIL PROTECTED]> wrote: I know hillegass is doing one but has anyone a date on it ? And might there be others ? Barnes and Noble shows a p

Re: performSelectorOnMainThread problem

2008-03-12 Thread Dave Hersey
You definitely should specify the colon, but I suspect this points to a bigger problem: I have imported the main AppController.h into this secondary class file. The "secondary class" part makes me wonder. Is this method actually defined in the object where you're calling performSelecto

Re: performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
Here's the declaration of updateProgress: - (void)updateProgress:(NSMutableDictionary *)dict; Console Log: [Switching to process 2321 thread 0x9013] 2008-03-13 07:21:09.194 DiskViewer[2321] *** -[Progress updateProgress:]: selector not recognized [self = 0x3377a0] [Switching to process 2321 l

Core Data - Cascading Not Working?

2008-03-12 Thread William Hunt
Hello, again! Ok, my new problem deals with a very simple object graph that isn't propagating deletes as I expect. Here's the simplified setup: Entity: Map has a to-many relationship "rooms" to entity Room -- delete rule Cascade Entity: Room has a to-one relationship "map" to entity Map --

Re: Ignore mouse in QTMovieView

2008-03-12 Thread douglas a. welton
subclass QTMovieView and override the -mouseDown method... On Mar 12, 2008, at 5:35 PM, Herr Thomas Bartelmess wrote: Hello my problem is: i have a QTMovieView. Is there a possibility to make is immune for mouseclicks, so that it can't be controled? Thanks for any help Thomas ___

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

2008-03-12 Thread Michael Gregoire
That's ok with me, frankly I thought that XCode 2 Book was garbage. On Mar 12, 2008, at 9:48 PM, Vince LaMonica wrote: FYI I talked to the publisher tuesday and the Cohen book, "The XCode 3 Book" has been canceled :( /vjl/ On Mar 12, 2008, at 9:24 PM, Michael Gregoire <[EMAIL PROTECTED]> w

Re: Problem with NSDragPboard

2008-03-12 Thread Jamie Phelps
Thanks to both of you guys. Chalk another one up for missing info from my textbook. JP On Mar 12, 2008, at 12:12 AM, Jens Alfke wrote: You need to declare the type(s) on the pasteboard, before setting the data. —Jens On Mar 11, 2008, at 11:42 PM, Dave Hersey wrote: The only thing I c

Re: performSelectorOnMainThread problem

2008-03-12 Thread John Stiles
Maybe you should show us the definition of -updateProgress and tell us what you mean by "didn't work." For instance, are any errors logged to the Run Log? Nick Rogers wrote: Yes I was using updateProgress with the colon earlier, but still didn't worked. Wishes, Nick On 13-Mar-08, at 7:00 A

Re: Help with Bindings

2008-03-12 Thread Rob Keniger
On 13/03/2008, at 1:44 AM, [EMAIL PROTECTED] wrote: Sofor the Master view I have a Tableview. Now I know how to handle aTableview with bindings (using the NSArrayController) I have read up onthat and done several of the examples and think I understand thatpretty good. But one question, If I use

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

2008-03-12 Thread colo
Ah, then that was my focus of this discussion. Thank you. >Though tutorials and guides are severely lacking in the Objective-C 2.0 arena. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
Yes I was using updateProgress with the colon earlier, but still didn't worked. Wishes, Nick On 13-Mar-08, at 7:00 AM, John Stiles wrote: If -updateProgress is taking "data" as an argument, then you probably want @selector(updateProgress:) Note the colon. Nick Rogers wrote: Hi, In

Re: How does -drawPageBorderWithSize: place pageHeader?

2008-03-12 Thread Mike Wright
On Mar. 12, 2008, at 20:01 , Tom Bunch wrote: Mike, I've messed around with this and boy has it been a head scratcher. Still haven't got it accounting properly for all combinations of scale, print size, and margins. The default implementation of drawPageBorderWithSize: seems to want to

Re: performSelectorOnMainThread problem

2008-03-12 Thread John Stiles
If -updateProgress is taking "data" as an argument, then you probably want @selector(updateProgress:) Note the colon. Nick Rogers wrote: Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES]; with the error tha

performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
Hi, 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 into this secondary class file. still the pr

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

2008-03-12 Thread Michael Gregoire
Actually, the "docs" are already online at apple.com. Books are not "docs", they're tutorials. Though tutorials and guides are severely lacking in the Objective-C 2.0 arena. On Mar 12, 2008, at 9:09 PM, colo wrote: Wow thats a long time to wait for new docs and working tutorials for the new

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

2008-03-12 Thread colo
Wow thats a long time to wait for new docs and working tutorials for the new Leopard API's . As I two really want to get started at learning how to code for the NDA thing as well That NDA thing must be just that awesome to wait so long for some docs On Wed, Mar 12, 2008 at 8:48 PM, Gary L. Wade

Re: shared NSImage from bundle

2008-03-12 Thread Jim Puls
On Mar 11, 2008, at 3:48 AM, Torsten Curdt wrote: Thanks!! Perfect On 11.03.2008, at 11:17, Jean-Daniel Dupas wrote: The method your looking for is + (void)initialize { } Warning: This method can be called more than once (if a subclass does not override it) so you should do something like

[SOLVED] Re: What is [NSTextStorage fontSetChanged]?

2008-03-12 Thread 慧 松本
I don't understand yet what is [NSTextStorage fontSetChanged] exactly. But I found a workaround for my problem that the document edited flag is set by the fontSetChanged notification while nothing was edited in the document. I added the following override method to my custom NSTextStorage

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

2008-03-12 Thread Gary L. Wade
>I know hillegass is doing one but has anyone a date on it ? >And might there be others ? Barnes and Noble shows a publication of June 13, 2008, and Amazon.com shows a publication of May 26, 2008:

Fwd: Localise between different versions of English in System Preferences

2008-03-12 Thread Alexander Hartner
Thanks all for your help. I managed to add other languages, but still not able to localise my System Preferences Panel. I added a localisation foren_GB.lproj and en_US.lproj, as well as de and fr. However it still loads the generic English (English.lproj) file. I already added the British a

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

2008-03-12 Thread I. Savant
I know hillegass is doing one but has anyone a date on it ? And might there be others ? I'm sure he and his publishers have a date but they haven't given it publicly. Also, it's important to note that you're confusing the API (Cocoa) with the language in which it is written (Objective-

Re: How to make a UI like in Mail?

2008-03-12 Thread Apple Cocoa List
Check out DBInterfaceDemo from: http://www.mere-mortal-software.com/blog/sourcecode.php Todd On Mar 12, 2008, at 5:54 PM, Thomas Wickl wrote: 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? ht

Re: How does -drawPageBorderWithSize: place pageHeader?

2008-03-12 Thread Tom Bunch
The astute reader will realize that I swapped the origin.y for the header and the footer. -Tom On Mar 12, 2008, at 5:01 PM, Tom Bunch wrote: Mike, I've messed around with this and boy has it been a head scratcher. Still haven't got it accounting properly for all combinations of scale,

Re: How does -drawPageBorderWithSize: place pageHeader?

2008-03-12 Thread Tom Bunch
Mike, I've messed around with this and boy has it been a head scratcher. Still haven't got it accounting properly for all combinations of scale, print size, and margins. The default implementation of drawPageBorderWithSize: seems to want to print about 1/3 of the way from the margin to t

Re: best time to alter GUIs

2008-03-12 Thread Ken Thomases
On Mar 12, 2008, at 10:45 AM, Daniel Child wrote: On Mar 8, 2008, at 1:11 AM, Ken Thomases wrote: We can think of three stages of loading a window from a NIB and showing it: 1. Loading the NIB bundle's contents into memory 2. Unarchiving the NIB's contents and instantiating the object gra

What is the status on the New Cocoa 2.0 Books?

2008-03-12 Thread colo
I know hillegass is doing one but has anyone a date on it ? And might there be others ? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admin

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Nathan Vander Wilt
--- Jens Alfke <[EMAIL PROTECTED]> escribió: > > On 12 Mar '08, at 2:49 PM, Nathan Vander Wilt wrote: > > > I don't understand what this "base" coordinate > system > > is (not the window's, otherwise the conversions > would > > likely be offset by the view's position therein, > > right?). But w

Ignore mouse in QTMovieView

2008-03-12 Thread Herr Thomas Bartelmess
Hello my problem is: i have a QTMovieView. Is there a possibility to make is immune for mouseclicks, so that it can't be controled? Thanks for any help Thomas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Quincey Morris
On Mar 12, 2008, at 14:49, Nathan Vander Wilt wrote: I don't understand what this "base" coordinate system is (not the window's, otherwise the conversions would likely be offset by the view's position therein, right?). But whatever it is, it seems to be shared by the CALayer. I'd appreciate a g

How to make a UI like in Mail?

2008-03-12 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: Mute System

2008-03-12 Thread Keith Duncan
what i have to do to control the system Aduio Volume (mute, increase, decrease). I use CoreAudio; AppleScript is too inefficient for my uses. static OSStatus GetDefaultAudioDevice(AudioDeviceID *device) { OSStatus status; UInt32 size; size = sizeof(*device); st

Ignore QTMovieView Inputs

2008-03-12 Thread Herr Thomas Bartelmess
Hello sorry for my constant asking... i have a QTMovieView. Is there a possibility to make is immune for mouseclicks, so that it can't be controled? Thanks for any help Thomas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 2:49 PM, Nathan Vander Wilt wrote: I don't understand what this "base" coordinate system is (not the window's, otherwise the conversions would likely be offset by the view's position therein, right?). But whatever it is, it seems to be shared by the CALayer. The Cocoa Drawi

Re: warning: assignment from distinct Objective-C type

2008-03-12 Thread Keith Duncan
There's no reason why it can't be named "create..." and return a retained object, My personal preference is to use Create... for naming functions which return alloc/malloc memory, inline with the CoreFoundation memory management rules. I tend to use -(id)new... for methods, again for the

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 3:06 PM, Nathan Vander Wilt wrote: When one draws a rectangle in a CALayer delegate, and the -drawLayer:: concatenates (and/or sets?) its own transform before drawing, when the layer has a transform, and the root parent layer has both a transform and a sublayer transform, and

Re: Deleting a folder

2008-03-12 Thread Jean-Daniel Dupas
Le 12 mars 08 à 23:12, Mr. Gecko a écrit : I was going to do that but it is not internal I used NSFileManager - removeFileAtPath:handler: instead [[NSFileManager defaultManager] removeFileAtPath:@"/folder/" handler:nil]; On Mar 12, 2008, at 3:45 PM, Herr Thomas Bartelmess wrote: unix command

Re: BitMap data format and autorelease

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 2:22 PM, Trygve Inda wrote: NSImageRep does not seem to allow lockFocus With Adam's method... Is there any reason I might want an NSImage? Sorry, my mistake. Probably the NSImage-less way is slightly better, as it might avoid some unnecessary caching of the image in displa

re: Deleting a folder

2008-03-12 Thread Mr. Gecko
I was going to do that but it is not internal I used NSFileManager - removeFileAtPath:handler: instead [[NSFileManager defaultManager] removeFileAtPath:@"/folder/" handler:nil]; On Mar 12, 2008, at 3:45 PM, Herr Thomas Bartelmess wrote: unix command rm -r thomas Am 12.03.2008 um 21:42 schrieb

Re: Deleting a folder

2008-03-12 Thread John Stiles
This is pretty dangerous if you get it wrong (spaces in the path? quotes? weird control characters?). Also, it makes it extremely difficult to provide feedback if errors occur. I wouldn't take that route. Herr Thomas Bartelmess wrote: unix command rm -r thomas Am 12.03.2008 um 21:42 schrieb M

Adding several UIViews in random places of the screen at intervals

2008-03-12 Thread Benjamin Ortuzar Seconde
Hi guys, Im interested in finding a good way to display Views in different parts of the application at random times, so the user can interact with them. The application is supposed to be a game in which several creatures appear in different parts of the screen and u must click on them to kill them.

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Nathan Vander Wilt
> > CALayers don't have this bounds/frame distinction > > They do, actually. The bounds is the internal view > of the coordinate > system, and the frame is the external view. At first this sounded incorrect, because it's emphasized that frame is just a function of other propertiesbut I was

Re: Deleting a folder

2008-03-12 Thread Herr Thomas Bartelmess
unix command rm -r thomas Am 12.03.2008 um 21:42 schrieb Mr.Gecko: Hello I have been trying to find a way to delete a folder so when some one chooses replace in the save panel it would delete the folder before it recreates it. What is the easiest way of doing that? _

Re: NSTokenField bug in 10.5.2?

2008-03-12 Thread Tom Bunch
It looks like the answer here is that there's no great workaround. Linked against 10.4, NSTokenField will not preserve your whitespace. The delegate method: - (id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString is not called with an edi

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Nathan Vander Wilt
--- Quincey Morris <[EMAIL PROTECTED]> escribió: > On Mar 12, 2008, at 13:13, Jens Alfke wrote: > > > On 12 Mar '08, at 12:13 PM, Nathan Vander Wilt > wrote: > > > >> I want to be able to convert a mouse > >> coordinate into a point suitable for > -hitTest:'ing on > >> my root layer. I can convert

How does -drawPageBorderWithSize: place pageHeader?

2008-03-12 Thread Mike Wright
I have an app (Universal, compiled using XCode 2.5, running on an Intel iMac, under Leopard) that lets the user set page margins when printing. It also lets them specify the printing of headers and footers. The odd thing I'm seeing with this is that the placement of the pageHeader string va

Re: Encoding NSString for URL

2008-03-12 Thread Jerry Krinock
On 2008 Mar, 11, at 23:56, JanakiRam wrote: CFURLCreateStringByAddingPercentEscapes...not encoding special characters such as @#$%&* etc. CFURLCreateStringByAddingPercentEscapes only encodes the characters mentioned in RFC 2396, which is: All non-ASCII characters plus these fourteen: `

Re: runtime error

2008-03-12 Thread John Stiles
I haven't used Tiger's ObjectAlloc in a while but I am pretty sure you can get stack crawls. If not, MallocDebug definitely supports this. Instruments can do stack crawls as well. Daniel Child wrote: I see your point now. Thanks. Putting in the pool enabled the application to complete parsing

Re: BitMap data format and autorelease

2008-03-12 Thread Trygve Inda
Jens said: > As I said, call -lockFocus on the imagerep. Then issue drawing > commands (just as though you were in a view's -drawRect: method). Then > calll -unlockFocus. NSImageRep does not seem to allow lockFocus With Adam's method... Is there any reason I might want an NSImage? > [NSGraphics

Re: memory warnings

2008-03-12 Thread John Stiles
I'm sure what you say is true. If you try to allocate right up to the limit, yes, you will eventually hit failures. But knowing your heap is, say, 90% full is still pretty useful information. You can jettison stuff and try to reduce your footprint well before you reach "the wall." Jens Alfke w

Re: Controlling line tightening

2008-03-12 Thread John Stiles
BTW, I've just documented this limitation in Radar: rdar://5795937 AppKit string tightening should work with non-truncating line break modes This one is up to you—if you think it would be a useful addition, great; if not, I guess you can punt it as "Behaves Correctly" or something. John

Re: NSTimer and seg faults

2008-03-12 Thread Gregory Short
Thanks everyone! For the relevant documentation, solutions, and explanations. Hopefully next time my question will be a little tougher. ;) -G ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator com

Re: NSTimer and seg faults

2008-03-12 Thread Hank Heijink (Mailinglists)
You're getting an autoreleased date and autoreleased timer from the methods you call, but you're not retaining either your timer our your date, so they'll both be gone after you leave awakeFromNib. Read the memory management guide for how all this works:

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Quincey Morris
On Mar 12, 2008, at 13:13, Jens Alfke wrote: On 12 Mar '08, at 12:13 PM, Nathan Vander Wilt wrote: I want to be able to convert a mouse coordinate into a point suitable for -hitTest:'ing on my root layer. I can convert from the mouse coordinates to the view's coordinates, but then I am not su

Re: NSTimer and seg faults

2008-03-12 Thread Hamish Allan
Hi Gregory, The method [NSDate date] returns an autoreleased object, which has been dealloced by the time your NSTimer fires. I'd recommend reading the documentation on memory management, starting with: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html Best wi

Re: NSTimer and seg faults

2008-03-12 Thread Andrew Farmer
On 12 Mar 08, at 13:56, Gregory Short wrote: Howdy all, first-time poster here. I'm pretty new to Objective-C and it's associated run-time environment, so I apologize if this is a total newbie question that has been answered before (I couldn't find anything, but I might not know where to lo

Re: BitMap data format and autorelease

2008-03-12 Thread Adam R. Maxwell
On Wednesday, March 12, 2008, at 01:26PM, "Trygve Inda" <[EMAIL PROTECTED]> wrote: >> >Is there a benefit to calling: > >image = [[NSImage alloc] initWithSize:NSMakeSize(width, height)]; >[image addRepresentation:imageRep]; > >Then using: > >[image lockFocusOnRepresentation:imageRep]; > >[image

NSTimer and seg faults

2008-03-12 Thread Gregory Short
Howdy all, first-time poster here. I'm pretty new to Objective-C and it's associated run-time environment, so I apologize if this is a total newbie question that has been answered before (I couldn't find anything, but I might not know where to look.) My problem is this: I have an NSTimer wh

Re: Quit application when window closes

2008-03-12 Thread Kyle Sluder
On Tue, Mar 11, 2008 at 6:22 AM, Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote: > How can I implement the behavior that the application closes when my > window closes? Please don't do this if you've got a document-based application. It's best for apps that display only one dialog, like

Re: Deleting a folder

2008-03-12 Thread Randall Meadows
On Mar 12, 2008, at 2:42 PM, Mr.Gecko wrote: Hello I have been trying to find a way to delete a folder so when some one chooses replace in the save panel it would delete the folder before it recreates it. What is the easiest way of doing that? NSFileManager -removeFileAtPath:handler: _

Deleting a folder

2008-03-12 Thread Mr . Gecko
Hello I have been trying to find a way to delete a folder so when some one chooses replace in the save panel it would delete the folder before it recreates it. What is the easiest way of doing that? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: BitMap data format and autorelease

2008-03-12 Thread Trygve Inda
> > On 12 Mar '08, at 12:01 PM, Trygve Inda wrote: > >> (1) draw an NSImage into this bitmap >> (2) draw some semi-opaque text over the bitmap > > As I said, call -lockFocus on the imagerep. Then issue drawing > commands (just as though you were in a view's -drawRect: method). Then > calll -unlo

Re: runtime error

2008-03-12 Thread Daniel Child
I see your point now. Thanks. Putting in the pool enabled the application to complete parsing of the raw data. Unfortunately, the program now stops several minutes into the sorting operation (the large table has to be sorted). I'll look for a spot to place an autorelease pool, though I don'

Re: Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 12:13 PM, Nathan Vander Wilt wrote: I want to be able to convert a mouse coordinate into a point suitable for -hitTest:'ing on my root layer. I can convert from the mouse coordinates to the view's coordinates, but then I am not sure how to proceed. There doesn't seem to be a

Re: BitMap data format and autorelease

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 12:01 PM, Trygve Inda wrote: (1) draw an NSImage into this bitmap (2) draw some semi-opaque text over the bitmap As I said, call -lockFocus on the imagerep. Then issue drawing commands (just as though you were in a view's -drawRect: method). Then calll -unlockFocus. (

Re: memory warnings

2008-03-12 Thread Jens Alfke
On 12 Mar '08, at 11:00 AM, John Stiles wrote: You can dive into BSD to get some values which might help you. I'm not an expert on this, but I've listened in on email threads where OS X kernel engineers were giving answers. Trying to preflight memory allocations is, basically, not feasibl

Re: Mute System

2008-03-12 Thread Jean-Daniel Dupas
The easiest way is to use AppleScript (there is a get volume settings' and a 'set volume' command in StandardAdditions). The other way is to use CoreAudio. Le 12 mars 08 à 19:49, Herr Thomas Bartelmess a écrit : Hi everyone, does somebody know, what i have to do to control the system Aduio Vo

Re: Mute System

2008-03-12 Thread I. Savant
On Wed, Mar 12, 2008 at 2:49 PM, Herr Thomas Bartelmess <[EMAIL PROTECTED]> wrote: > Hi everyone, does somebody know, > what i have to do to control the system Aduio Volume (mute, increase, > decrease). > > I searched a lot, but without result A quick Google search revealed this AppleScript:

Core Animation geometry, layer hosting, and resolution independence

2008-03-12 Thread Nathan Vander Wilt
I am having trouble understanding how Core Animation geometry interacts with NSView geometry in a layer-hosting situation. I have an NSView that hosts a root layer, and it has two sublayers that I need the user to be able to drag each around. I want to be able to convert a mouse coordinate into a

Mute System

2008-03-12 Thread Herr Thomas Bartelmess
Hi everyone, does somebody know, what i have to do to control the system Aduio Volume (mute, increase, decrease). I searched a lot, but without result thanks for your help Thomas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: Controlling line tightening

2008-03-12 Thread John Stiles
Right, we went over this a month or two ago. But in this case, I actually needed finer-grained control over the tightening—for instance, I didn't want an ellipsis when the tightening threshold is exceeded. Instead, when the tightening threshold is exceeded, I just want it to use the maximum tig

Re: BitMap data format and autorelease

2008-03-12 Thread Trygve Inda
> Then you definitely want to create your own NSBitmapImageRep — the > init method will give you total control over the pixel format. Then > you can lockFocus and draw whatever you want into it. So I have created this: imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL

Re: Controlling line tightening

2008-03-12 Thread Aki Inoue
John, The tightening is controlled by -[NSParagraphStyle tighteningFactorForTruncation]. http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSParagraphStyle_Class/Reference/ Reference.html#//apple_ref/occ/instm/NSParagraphStyle/ tighteningFactorForTruncation

Re: Setting the badgeValue in ToolbarItem in ViewController file.

2008-03-12 Thread Benjamin Ortuzar Seconde
Hi Kyle, Very confusing indeed. I don't know where to talk about iphone development then. :( Maybe an IRC channel, or forum for us ? Thanks, ben On Wed, Mar 12, 2008 at 1:55 PM, Kyle Sluder < [EMAIL PROTECTED]> wrote: > On Wed, Mar 12, 2008 at 10:34 AM, Benjamin Ortuzar Seconde > <[EMAIL PROTEC

Re: Controlling line tightening

2008-03-12 Thread John Stiles
Followup: this requires a bit of math but it works great in practice. I have a lot more control over the tightening now, which is just what I needed. Thanks! John Stiles wrote: Interesting! I didn't think to use kerning directly. Thank you for the idea!! It makes sense since obviously I am try

Re: memory warnings

2008-03-12 Thread Alexander Cohen
Thanks, ill look into this. Its much better than nothing. AC On 12-Mar-08, at 2:00 PM, John Stiles wrote: You can dive into BSD to get some values which might help you. vm_statisticsvmstats; mach_msg_type_number_t count; kern_return_t result = host_statistics(mach_host_se

Re: memory warnings

2008-03-12 Thread John Stiles
You can dive into BSD to get some values which might help you. vm_statisticsvmstats; mach_msg_type_number_t count; kern_return_t result = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t) &vmstats, &count); uint64 freeMem= uint64(vmstats.free_count +

Re: Setting the badgeValue in ToolbarItem in ViewController file.

2008-03-12 Thread Kyle Sluder
On Wed, Mar 12, 2008 at 10:34 AM, Benjamin Ortuzar Seconde <[EMAIL PROTECTED]> wrote: > Im trying to develop an Iphone app. Though it's still a bit confusing, iPhone discussion is not permitted on this list. Check back in the archives for the explanation form Scott Anguish (and the confusion that

Re: memory warnings

2008-03-12 Thread Nick Zitzmann
On Mar 12, 2008, at 11:40 AM, Alexander Cohen wrote: Is there any way to be notified when my app is running low on memory? Not really. My app is very memory intensive and needs to have a lot of images in memory at the same time, id like to be able to clear some cache if memory gets too l

Re: Cocoa-dev Digest, Vol 5, Issue 393

2008-03-12 Thread Nick Zitzmann
On Mar 12, 2008, at 11:35 AM, Daniel Child wrote: Each record is allocated and explicitly released at the end of the loop after adding it to the table. I thought autorelease might wait too long to get rid of it, so I do it explicitly. As for Instruments, unfortunately I'm doing this on Tig

Re: Cocoa-dev Digest, Vol 5, Issue 393

2008-03-12 Thread John Stiles
Daniel Child wrote: Each record is allocated and explicitly released at the end of the loop after adding it to the table. I thought autorelease might wait too long to get rid of it, so I do it explicitly. Just because you never autorelease it in your code, doesn't mean that it is never autorele

memory warnings

2008-03-12 Thread Alexander Cohen
Is there any way to be notified when my app is running low on memory? My app is very memory intensive and needs to have a lot of images in memory at the same time, id like to be able to clear some cache if memory gets too low. thx AC ___ Cocoa-d

Re: NSURLDownload and userInfo

2008-03-12 Thread Adam Leonard
Well, there are a few more places I see it used for delegate-like operations :) NSCachedURLResponse - also in WebKit NSTrackingArea NSEvent (called userData) NSBeginAlertSheet() (called contextInfo) So yeah, you are right it is not used everywhere, but I think it is used enough for it to be

Re: Cocoa-dev Digest, Vol 5, Issue 393

2008-03-12 Thread Daniel Child
Each record is allocated and explicitly released at the end of the loop after adding it to the table. I thought autorelease might wait too long to get rid of it, so I do it explicitly. As for Instruments, unfortunately I'm doing this on Tiger. On Mar 12, 2008, at 12:00 PM, [EMAIL PROTECTED]

Re: runtime error

2008-03-12 Thread Daniel Child
On Mar 12, 2008, at 12:00 PM, [EMAIL PROTECTED] wrote: Some points of interest: 1. vm_allocate(size=1069056) - Is each of your 'thousands and thousands of records' this large? If so then it is no wonder that you will run out of address space after a couple of thousand (on 32-bit) No. I build

Re: Where are the system spellchecker prefs stored?

2008-03-12 Thread John Stiles
Could you do it via the Accessibility APIs, perhaps? Davide Benini wrote: I see. I was planning to build a menulet to speed up switching language, which is kind of annoying, especially when you're writing in a couple of languages, switching all the time... I was actually wondering why no one

Re: Where are the system spellchecker prefs stored?

2008-03-12 Thread Douglas Davidson
On Mar 12, 2008, at 10:18 AM, Davide Benini wrote: I was planning to build a menulet to speed up switching language, which is kind of annoying, especially when you're writing in a couple of languages, switching all the time... I was actually wondering why no one had done such a menulet bef

  1   2   >