Re: Listener related crashing bug releasing subviews of a custom view

2008-02-22 Thread Shawn Erickson
On Fri, Feb 22, 2008 at 9:08 AM, glenn andreas [EMAIL PROTECTED] wrote: but finalize may work for that purpose on GC). IIRC in the GC case you don't need to worry because observed objects have a zeroing weak reference on observers. -Shawn ___

Re: Adding spaces to an NSString

2008-03-18 Thread Shawn Erickson
On Tue, Mar 18, 2008 at 5:40 PM, J. Todd Slack [EMAIL PROTECTED] wrote: Hello All, I am a little stumped today, not sure why, but how would I add a space after every character in an NSString and produce a new NSString from it. So I have something like: (ignore the quotes, I just did it

Re: NSCondition easter-egg hunt

2008-04-03 Thread Shawn Erickson
NSCondition has existed since before 10.0 but simply not included in any headers. You can use it on any version of Mac OS X by simply conditionally defining the class in a header of your own. Apple (well at least a few developers) has recommended this in the past. @interface NSCondition :

Re: Apple support incidents

2008-04-04 Thread Shawn Erickson
On Fri, Apr 4, 2008 at 12:48 PM, Stebel Wolfram [EMAIL PROTECTED] wrote: Hi all, i wondered if somebody sells it's unused apple support incidents of adc membership and just tried it on ebay. Look there if you need cheap support incidents. Selling / trading incidents like that is breach of

Re: NSMutableArray removeObject: crash

2008-04-04 Thread Shawn Erickson
On Fri, Apr 4, 2008 at 1:08 PM, Kevin Wojniak [EMAIL PROTECTED] wrote: I am getting a report of a crash with a stack trace ending like this: 0 libobjc.A.dylib 0x92d066f9 objc_msgSend + 41 1 com.apple.CoreFoundation0x96d4b720

Re: Main Thread UI and Detached Thread

2008-04-04 Thread Shawn Erickson
On Fri, Apr 4, 2008 at 12:08 AM, Mike [EMAIL PROTECTED] wrote: If that is the case then why does the progress bar get updated with the correct value every time when I insert the sleep( 1 ) call? Obviously it wouldn't be displaying the correct value if garbage was being sent to the selector.

Re: Tight loop processing

2008-04-10 Thread Shawn Erickson
On Thu, Apr 10, 2008 at 11:14 AM, Don Arnel [EMAIL PROTECTED] wrote: I thought maybe there was a simple message I could send to NSApp, but it looks like putting the loop in a new thread is the way to go. Thanks! Likely throwing this loop off to an NSThread is the cleanest and most efficient

Re: Vended Object Setters

2008-04-17 Thread Shawn Erickson
On Thu, Apr 17, 2008 at 8:01 AM, Justin Giboney [EMAIL PROTECTED] wrote: bycopy worked, thank you. Does this mean though that I need to duplicate all of methods, with one set for internal commands and one for remote commands? You need an interface that has the needed bycopy, etc. qualifiers

Re: GUI Time Field

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 12:34 PM, Justin Giboney [EMAIL PROTECTED] wrote: I am trying to put a automatic date and time field into my GUI. I have a text field connected to a variable called theDateTime in my controller class. If I set the variable manually the text field works just fine. But

Re: Problems with [NSArray count]

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 2:03 PM, Peter Browne [EMAIL PROTECTED] wrote: Hi, I'm returning to Cocoa after quite a long break, and it seems that I'm a little rusty... All I want to do is find out the number of items in an NSArray and store that as a variable, which I can then find the square

Re: Problems with [NSArray count]

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 2:10 PM, Shawn Erickson [EMAIL PROTECTED] wrote: On Tue, Apr 22, 2008 at 2:03 PM, Peter Browne [EMAIL PROTECTED] wrote: Hi, I'm returning to Cocoa after quite a long break, and it seems that I'm a little rusty... All I want to do is find out

Re: Problems with [NSArray count]

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 2:45 PM, Peter Browne [EMAIL PROTECTED] wrote: I'm getting an EXC_BAD_ACCESS error. I've since managed to solve the problem by inserting a [myArray retain]; but I'm not entirely sure WHY this fixed it... The process followed is: 1) the myController object

Re: Using OSMemoryBarrier() with KVO

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 4:37 AM, Paul Thomas [EMAIL PROTECTED] wrote: Is this enough? Or will I need to use a full blown lock? Yes and no... 1) KVO and multiple thread gets ugly quick, 2) using NSCondition/Lock may make more sense, 3) using just a volatile BOOL could be enough depending on how

Re: GUI Time Field

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 3:24 PM, Justin Giboney [EMAIL PROTECTED] wrote: Thank you for response, I hope I have improved my code. The setter isn't doing the proper memory management. Review the following...

Re: NSString memory management question

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 3:25 PM, Rick Mann [EMAIL PROTECTED] wrote: I wrote a routine that creates a CFStringRef from some USB calls. I use it like this: NSString* s = (NSString*) createStringDescriptor(dev, stringIndex); [mSerialNumberDisplay setStringValue: [s

Re: Making my own menubar

2008-05-02 Thread Shawn Erickson
On Fri, May 2, 2008 at 12:06 PM, Mike [EMAIL PROTECTED] wrote: I need to make a fullscreen app in which my window takes over the main display. I need to be able to prevent the user from accessing the main system menu bar. Hiding it is no problem but I need to create my own menubar at the top

Re: Unit Test error XCode 3.1 (Beta)

2008-05-02 Thread Shawn Erickson
On Fri, May 2, 2008 at 9:26 AM, Sean frazier [EMAIL PROTECTED] wrote: is there an Xcode 3.1/iPhone list? No. Check the release notes for information on how to submit feedback / ask for assistance. -Shawn ___ Cocoa-dev mailing list

Re: Graphics seen when volume is modified.

2008-05-02 Thread Shawn Erickson
On Fri, May 2, 2008 at 1:09 PM, Kyle Sluder [EMAIL PROTECTED] wrote: On Fri, May 2, 2008 at 2:41 PM, Christopher Nebel [EMAIL PROTECTED] wrote: Alternatively, you could mimic the effect using a transparent panel [1] -- I expect that's what Growl is doing. Unfortunately if you pass

Re: method definition not in @implementation context

2008-05-05 Thread Shawn Erickson
On Mon, May 5, 2008 at 1:16 PM, J. Todd Slack [EMAIL PROTECTED] wrote: Hi All, I am trying to get back into some Objective-C and I have gotten an error: fatal error: method definition not in @implementation context Can anyone tell me what this means? Some.m file... @implementation

Re: 8 Digit random number

2008-05-07 Thread Shawn Erickson
On Wed, May 7, 2008 at 1:50 PM, Mr. Gecko [EMAIL PROTECTED] wrote: Hello I am needing to find out how to do an 8 digit random number in cocoa. If there are no way than I can use random number from 1000 to in applescript and receive the retuned value.

Re: How to send email without using email client

2008-05-08 Thread Shawn Erickson
On Thu, May 8, 2008 at 8:10 AM, Jens Alfke [EMAIL PROTECTED] wrote: You shouldn't need a 3rd party framework just to do drawing. CoreData draws vector graphics, and Cocoa has wrappers like NSBezierPath. Think you meant Core Graphics. ___ Cocoa-dev

Re: NSTask waitForDataInBackgroundAndNotify and waitUntilExit

2008-05-12 Thread Shawn Erickson
Your placement of waitUntilExit is blocking the runloop which needs to be running to service the background notifications you requested. If you want async behavior then you cannot wait on the task (at least not in the way you are currently attempting). Review the following code example...

Re: @property question

2008-05-12 Thread Shawn Erickson
On Mon, May 12, 2008 at 2:30 PM, Craig Hopson [EMAIL PROTECTED] wrote: So, the question is, what is the difference between using self. notation and not? I have declared the properties to retain the objects. The compiler is happy, I just die at run time when I attempt to access the contents

Re: Bypassing Interface Builder

2008-05-15 Thread Shawn Erickson
On Thu, May 15, 2008 at 1:11 PM, Johnny Lundy [EMAIL PROTECTED] wrote: OK - I am getting a lot of education here. I am not a total n00b with Cocoa, and have been studying it and coding it for six years, but I realize that a lot of stuff I memorized how to do, I never understood what I was

Re: Bypassing Interface Builder

2008-05-15 Thread Shawn Erickson
On Thu, May 15, 2008 at 1:20 PM, Shawn Erickson [EMAIL PROTECTED] wrote: File's Owner. An object that owns the nib file and manages the objects within it. The File's Owner must be external to the nib file. You use the File's Owner object as the conduit for connections between objects

Re: NSDictionaryController with NSTableView and sorting of numeric data

2008-05-16 Thread Shawn Erickson
On Thu, May 15, 2008 at 10:43 PM, Kyle Sluder [EMAIL PROTECTED] wrote: On Thu, May 15, 2008 at 5:30 PM, [EMAIL PROTECTED] wrote: It would seem that NSDictionaryController keys have to be strings. Yes. It is very common that, despite NSDictionary accepting any object as a key, you must use

Re: Guidance for Cocoa's steep learning curve

2008-05-16 Thread Shawn Erickson
On Fri, May 16, 2008 at 11:22 AM, Scott Ribe [EMAIL PROTECTED] wrote: Forward references are what the concepts docs are for, but for some reason, they don't seem to be serving that purpose for some people. I'm not sure why. I get the feeling that some people never notice the Companion Guides

Re: NSViewController and Nib files

2008-05-20 Thread Shawn Erickson
On Tue, May 20, 2008 at 8:45 AM, Cathy Shive [EMAIL PROTECTED] wrote: Hi, I'm hoping that one of the Cocoa engineers out there can answer a question about NSViewController for me. In the documentation, it states that the view controller will handle memory management for the objects in its

Re: Problem with updating NSProgressIndicator

2008-05-20 Thread Shawn Erickson
On Mon, May 19, 2008 at 11:53 PM, Vitaly Ovchinnikov [EMAIL PROTECTED] wrote: Hello I work on Cocoa application that uses posix thread to perform big calculations. I need to display the progress. Big caculations are done with C++ and I have a callback function that called by the calculating

Re: Problem with updating NSProgressIndicator

2008-05-20 Thread Shawn Erickson
On Tue, May 20, 2008 at 1:54 PM, Vitaly Ovchinnikov [EMAIL PROTECTED] wrote: Ideas? What version of Mac OS X are you running? What version of Xcode are you using? -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Problem with updating NSProgressIndicator

2008-05-20 Thread Shawn Erickson
On Tue, May 20, 2008 at 1:59 PM, Vitaly Ovchinnikov [EMAIL PROTECTED] wrote: If you send your progress view a setUsesThreadedAnimation: message with a value of YES do it continue to animate? Just tried to send this message in my test project - it doesn't animate. I removed almost all code,

Re: Problem with updating NSProgressIndicator

2008-05-20 Thread Shawn Erickson
On Tue, May 20, 2008 at 2:06 PM, Vitaly Ovchinnikov [EMAIL PROTECTED] wrote: It is working fine for me using Mac OS X 10.5 and Mac OS X 10.4 when compiled with Xcode 2.5 against the 10.4u SDK (not tried any other version of Xcode or SDK). well, it seems that I know what my mac will download

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 9:47 AM, Peter Hudson [EMAIL PROTECTED] wrote: The line of code [NSArray arrayWithObjects: c0, ...c9, nil]; produces an array all right - but as you have used a class initializer, it will auto release when you return from the method where it was created. They are

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
You probably want to use a NSArrayController and bind the combo box to that. When you hit the buttons you change the array through the controller. Folks please don't point someone at things like NSArrayController when they are just getting started. Using controller layer / bindings can make a

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 10:11 AM, GĂ©rard Iglesias [EMAIL PROTECTED] wrote: Or am I missing something ? Yes :) You are misreading what he typed I inlined what he typed with the code... - (id) init { // First, you allocate and initialize the cityArray with an empty NSArray (not very useful,

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
Nonsense. Nonsense again. Yet more nonsense. Lets avoid this kind of tone in emails on this list... correct, clarify, explain, etc. and leave it at that. -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 11:35 AM, Johnny Lundy [EMAIL PROTECTED] wrote: Here's why the OP was not aware of the behavior of an NSArray class method: Here's the verbatim documentation for +arrayWithObjects: arrayWithObjects: Creates and returns an array containing the objects in the argument

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 11:47 AM, Vijay Malhan [EMAIL PROTECTED] wrote: What exactly do you mean by initializing the *class*? what exactly is initialized with +initialize() method? When exactly this method gets called? Look for the subsection titles Initializing a Class Object

Re: Trying to understand -- please help...

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 12:14 PM, Vijay Malhan [EMAIL PROTECTED] wrote: Thanks for the pointers to the documentation. This is sample snippet from the documentation. @implementation MyClass + (void)initialize { if ( self == [MyClass class] ) { /* put initialization code here

Re: docset for 10.4?

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 4:59 PM, Torsten Curdt [EMAIL PROTECTED] wrote: Anyone know where to get the documentation docset for 10.4? The current documentation set available online (or on your system if updated via Xcode) attempts to make it clear what API methods/functions/etc. are available in

Re: fundamental question: how do I call controller methods from other classes?

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 5:07 PM, Matthew Youney [EMAIL PROTECTED] wrote: What is the instance name of the controller object instantiated by Interface Builder? They do not have a name... at least not in the way you appear to be asking. Objects in the nib or external objects (file owner, etc.

Re: fundamental question: how do I call controller methods from other classes?

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 5:26 PM, Shawn Erickson [EMAIL PROTECTED] wrote: To be clearer... I am suggesting you review the whole chapter I linked below not just the first section of it looking primarily for discussion of outlets (IBOutlet) and actions. http://developer.apple.com/documentation

Re: ANN: Step by step introduction to programming with Cocoa

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 5:38 PM, Julius Guzy [EMAIL PROTECTED] wrote: I suggested some time back (A documetation suggestion 19 May 2008 13:31:30) but no one took me up on it, the idea of seeing if Apple would so to speak donate a copy of their documentation so it could be used as the basis

Re: any data on Mac OS X 10.5 install base?

2008-05-21 Thread Shawn Erickson
On Wed, May 21, 2008 at 5:49 PM, Wayne Shao [EMAIL PROTECTED] wrote: I am writing my first application in Cocoa. Still in learning mode. I am using many new APIs or framework kits for 10.5. This will limit the usefulness of my software. Is there any data on the install base? What is the

Re: creating a resource fork and writing raw bytes to it

2008-05-22 Thread Shawn Erickson
On May 21, 2008, at 11:49 PM, Charles Srstka wrote: FSRefs are also highly filesystem-dependent, and HFS+, the only file system (as far as I know) that currently fully supports them, is showing its age and ready to be replaced, possibly by a file system like ZFS that wasn't invented by

Re: removeFromSuperview, _registerDragTypesLater, and clean exits

2008-05-22 Thread Shawn Erickson
On Thu, May 22, 2008 at 5:27 PM, Geoff Schmidt [EMAIL PROTECTED] wrote: Any suggestions? Don't worry about it... the executable is terminating, its memory space is going away. If you want to worry about it consider returning NSTerminateLater from applicationShouldTerminate: then do your clean

Re: File's Owner

2008-05-23 Thread Shawn Erickson
On Fri, May 23, 2008 at 11:49 AM, Johnny Lundy [EMAIL PROTECTED] wrote: I sent feedback on this as File's Owner is mentioned several times and not defined. There seems to be some huge problem with File's Owner. Even Aaron Hillegass says that people have trouble understanding File's Owner - and

Re: NSTableView

2008-05-23 Thread Shawn Erickson
On Fri, May 23, 2008 at 1:22 PM, john darnell [EMAIL PROTECTED] wrote: If I did have, say, three tables on a dialog, how would the code know which function was for which table if that first element (or some other element) is not differentiated? An example of one way to do it follows...

Re: Pasteboard question

2008-05-23 Thread Shawn Erickson
On Fri, May 23, 2008 at 1:36 PM, Davide Scheriani [EMAIL PROTECTED] wrote: helo guys. I wanted to use the PasteBoard to use for may drag'n drop table view, and I wish to save a mutable array i the pastboard. I wrote this but I get null back: = CODE =

Re: NSURLConnection sendSynchronousRequest crash

2008-05-30 Thread Shawn Erickson
On Fri, May 30, 2008 at 8:35 AM, Colin Cornaby [EMAIL PROTECTED] wrote: Strangely enough, I actually was already disabling the cache in my NSURLRequest. I changed the disable caching flag to the newer constant (NSURLRequestReloadIgnoringLocalCacheData), and now the crash has changed... #0

Re: Best Practice for Returning Immutable Objects?

2008-06-03 Thread Shawn Erickson
On Tue, Jun 3, 2008 at 8:56 AM, Karl Moskowski [EMAIL PROTECTED] wrote: I have a few methods that return NSData objects, but the objects are created and manipulated as NSMutableData, and then copied to an immutable version along these lines: NSMutableData *myData = [NSMutableData data];

Re: Frame rate check

2008-06-04 Thread Shawn Erickson
On Tue, Jun 3, 2008 at 11:38 PM, Davide Scheriani [EMAIL PROTECTED] wrote: yes I was looking just to see the times draawREct get called. is it a weay to set a limit framerate as well? mean 25fps or to ask from the cpu/gpu 120fps? When you are asked to draw (drawRect:) you really must draw what

Re: ArrayController Out of Bounds

2008-06-04 Thread Shawn Erickson
On Wed, Jun 4, 2008 at 6:18 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: When this table contains some rows and I click on the table column header I always get: *** -[NSCFArray objectAtIndex:]: index (-1) beyond bounds (5) where 5 is the correct number of rows displayed. What am I doing

Re: ArrayController Out of Bounds

2008-06-04 Thread Shawn Erickson
On Wed, Jun 4, 2008 at 7:50 AM, Shawn Erickson [EMAIL PROTECTED] wrote: On Wed, Jun 4, 2008 at 6:18 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: When this table contains some rows and I click on the table column header I always get: *** -[NSCFArray objectAtIndex:]: index (-1) beyond

Re: How to implement window fade-in fade-out effects

2008-06-04 Thread Shawn Erickson
On Wed, Jun 4, 2008 at 7:10 AM, colo [EMAIL PROTECTED] wrote: Just curious if some frameworks have been thought of for Animation. In the likes of Jquery or others. For example window.show(fade_in, slow); That way animations can be very clean and simple to write and test. Core Animation

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Shawn Erickson
On Fri, Jun 6, 2008 at 4:27 PM, Quincey Morris [EMAIL PROTECTED] wrote: But the puzzling question is: how? Send a message to the NSData object after the block is done with the byte pointer. ([data self]) -Shawn ___ Cocoa-dev mailing list

Re: Rethinking my approach; rather overwhelmed.

2008-06-18 Thread Shawn Erickson
On Tue, Jun 17, 2008 at 9:28 PM, Josh de Lioncourt [EMAIL PROTECTED] wrote: Hi Louis and Andy, I'm certainly looking at this suggestion, but another developer suggested that I may be better served by hooking into the keyboard input functionality of OpenGL. Assuming that have focus on an

Re: hitTest question

2008-06-20 Thread Shawn Erickson
On Fri, Jun 20, 2008 at 10:29 AM, Eugen Belyakov [EMAIL PROTECTED] wrote: Somebody knows how NSView's hitTest method works internally? Yes folks inside Apple do. -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: NSString uppercaseString

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:37 PM, Sam Mo [EMAIL PROTECTED] wrote: Could I assume if the doc does not mention releasing the memory, then I don't have to worry about it? No :) Read and understand the memory management programming guide for Cocoa. Cocoa memory management is easy and consistent so

Re: while loop with sleep(): logging works, but not UI events

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:55 PM, Daniel Richman [EMAIL PROTECTED] wrote: Hi All, I'm trying to program a simple timer app: you enter a number of seconds, and it updates a text field every second with the number of secs remaining. The problem is that I'm not able to do anything with the UI

Re: while loop with sleep(): logging works, but not UI events

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:59 PM, Shawn Erickson [EMAIL PROTECTED] wrote: On Fri, Jun 27, 2008 at 8:55 PM, Daniel Richman [EMAIL PROTECTED] wrote: Hi All, I'm trying to program a simple timer app: you enter a number of seconds, and it updates a text field every second with the number of secs

Re: Style Question

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 9:30 PM, Alex Wait [EMAIL PROTECTED] wrote: Also since I am using this style, XCode doesn't tab in for me when I type { then a return. It will if you enable it (at least it always does for me). Use whatever coding style you want however do try to follow Cocoa like

Re: Style Question

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 9:44 PM, Alex Wait [EMAIL PROTECTED] wrote: I got another Style related question. /me points at ... http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/index.html -Shawn ___ Cocoa-dev mailing list

Re: switching content views

2008-06-28 Thread Shawn Erickson
On Jun 27, 2008, at 11:33 PM, dudley ackerman [EMAIL PROTECTED] wrote: i can call setContentView on my app's window only if i don't plug in a 2nd monitor. posts on this topic in the archives say you can't simple call setContentView on a window - i'm not clear if that means even

Re: NSExpression

2008-06-28 Thread Shawn Erickson
On Jun 28, 2008, at 12:13 AM, Chris [EMAIL PROTECTED] wrote: NSExpression defines this method: + (NSExpression *)expressionForFunction:(NSString *)name arguments: (NSArray *)parameters and the doco provides this example: [NSExpression expressionForFunction:(@selector(random))

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 7:58 AM, Michael Ash [EMAIL PROTECTED] wrote: On Sat, Jun 28, 2008 at 12:10 AM, Shawn Erickson [EMAIL PROTECTED] wrote: Also you should fire your timer every 0.75 of seconds (or so) to ensure your UI update is consistent/smooth. Firing every second may cause your timer

Re: while loop with sleep(): logging works, but not UI events

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 8:29 AM, Shawn Erickson [EMAIL PROTECTED] wrote: On Sat, Jun 28, 2008 at 8:13 AM, Daniel Richman [EMAIL PROTECTED] wrote: Thanks very much for this detailed explanation. I realize my mistake now; I was thinking about this in the wrong way. I eventually coded

Re: Methods that return autoreleased objects?

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 5:25 PM, john muchow [EMAIL PROTECTED] wrote: The last thread that I saw on this topic was dated sometime in 2004if there is something more recent that I didn't find, I apologize up front... I realize nothing has probably changed as far as the API and the

Re: Output of NSHTTPCookieStorage to NSTableView

2008-06-28 Thread Shawn Erickson
On Sat, Jun 28, 2008 at 9:46 PM, Chris Purcell [EMAIL PROTECTED] wrote: Hello, Not sure where my problem is I've tried a few things and no success. I am trying to output NSHTTPCookieStorage *cookies array to a table view. Whenever I call the objectValueForTableColumn:row method the app

Re: Method Sees Populated Array As Empty

2008-07-06 Thread Shawn Erickson
On Sun, Jul 6, 2008 at 4:26 AM, Mark Wales [EMAIL PROTECTED] wrote: So the document instance changes I guess. Why would that happen and how can I stop it? Only your code could tell us why. -Shawn ___ Cocoa-dev mailing list

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-06 Thread Shawn Erickson
On Sun, Jul 6, 2008 at 9:05 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: I think the rule may be: use __strong for retained/copied ivars, and nothing for assigned ivars. There is no equivalent of zeroing ref, but weak ref are really common in Cocoa. For example, delegate are not retain. the

Re: NSEntityDescription random crash

2008-07-10 Thread Shawn Erickson
On Thu, Jul 10, 2008 at 6:56 AM, Nicolas Lapomarda [EMAIL PROTECTED] wrote: The error I'm getting is random as well, but always takes the form *** -[NSCFString _entityForName]: unrecognized selector sent to instance xxx. You likely are not retaining an object that you expect to stay

Re: What is the best way?

2008-07-14 Thread Shawn Erickson
On Mon, Jul 14, 2008 at 9:57 AM, Ronnie B [EMAIL PROTECTED] wrote: Thats correct. The main window is not covered up. The second window is not modal I agree. In the second window I just need to collect some additional info that will go the the second's window controller. There will be OK and

Re: Trouble with performSelector afterDelay

2008-07-14 Thread Shawn Erickson
On Mon, Jul 14, 2008 at 3:59 PM, James Trankelson [EMAIL PROTECTED] wrote: Thanks, Ken, I had a suspicion that's what was going on there, so I just added a few extra [Worker retain] messages before I sent the message to be handled. Still, the object gets released. release != dealloc It

NSWindow delegate of unexpected class

2008-07-15 Thread Shawn Erickson
Does anyone know of a third-party haxie (input manager, etc.) that when loaded into an application hijacks the delegate of NSWindow instances? ...something that replaces the window's delegate with one of its own objects that presumable forwards messages onto our delegate. We happen to have some

Re: NSWindow delegate of unexpected class

2008-07-15 Thread Shawn Erickson
On Tue, Jul 15, 2008 at 4:25 PM, Shawn Erickson [EMAIL PROTECTED] wrote: Does anyone know of a third-party haxie (input manager, etc.) that when loaded into an application hijacks the delegate of NSWindow instances? ...something that replaces the window's delegate with one of its own objects

Re: Blue lines

2008-07-15 Thread Shawn Erickson
On Tue, Jul 15, 2008 at 5:31 PM, Andrew Thompson [EMAIL PROTECTED] wrote: I thought of just drawing my own line on a custom view (shouldn't be that hard), but interface builder manages to do it between objects that aren't connected by ANY view, and I am not sure how to do that. I am trying

Re: Relaunch Finder (without AppleScript)

2008-07-16 Thread Shawn Erickson
On Wed, Jul 16, 2008 at 6:57 AM, Piero Avola [EMAIL PROTECTED] wrote: Hello, I need to relaunch the Finder with my App. I don't want to use any scripts therefore. How can I do this with the Cocoa framework? NSWorkspace -Shawn ___ Cocoa-dev mailing

Re: Relaunch Finder (without AppleScript)

2008-07-16 Thread Shawn Erickson
On Wed, Jul 16, 2008 at 6:57 AM, Piero Avola [EMAIL PROTECTED] wrote: Hello, I need to relaunch the Finder with my App. I don't want to use any scripts therefore. How can I do this with the Cocoa framework? You likely should use AppleScript to do this... NSAppleScript* script =

Re: Base64 data string decode to save to file

2008-07-16 Thread Shawn Erickson
On Wed, Jul 16, 2008 at 7:21 AM, Pablo Herrera [EMAIL PROTECTED] wrote: I have data encoded as base64 within an NSData instance. What are recommended methods to decode the data so I may save it to file? http://www.google.com/search?q=NSData+base64 -Shawn

Re: Memory Allocation

2008-07-16 Thread Shawn Erickson
On Wed, Jul 16, 2008 at 2:19 PM, Michael Ash [EMAIL PROTECTED] wrote: On Wed, Jul 16, 2008 at 2:38 PM, Kyle Sluder [EMAIL PROTECTED] wrote: On Wed, Jul 16, 2008 at 2:02 PM, Alexandre Badez [EMAIL PROTECTED] wrote: -(id)init { if (![super init]) return nil; You must always

Re: Concurrent network transmission

2008-07-17 Thread Shawn Erickson
On Thu, Jul 17, 2008 at 9:53 AM, Jens Alfke [EMAIL PROTECTED] wrote: On 17 Jul '08, at 6:13 AM, em wrote: So, architecturally, for high speed transmission over a closed network neighborhood of say 9 minis, isn't there something like a SuperSocket that could co-ordinate these now '3' streams

Re: NSApp delegate without a nib

2008-07-17 Thread Shawn Erickson
On Thu, Jul 17, 2008 at 9:28 AM, Francisco Tolmasky [EMAIL PROTECTED] wrote: I've looked around the docs quite a bit and haven't been able to find an answer to this. Why do you think you need to avoid using a simple nib? What you are asking to do is not supported. -Shawn

Re: IB calls Java method?

2008-07-17 Thread Shawn Erickson
On Thu, Jul 17, 2008 at 10:16 AM, ahmed nabel [EMAIL PROTECTED] wrote: I want to use Interface Builder UI components to call Java methods (in their corresponding Java files). Is this possible? How? Please see my post on the Java mailing post:

Re: plist to listview?

2008-07-17 Thread Shawn Erickson
On Thu, Jul 17, 2008 at 2:32 PM, Joeles Baker [EMAIL PROTECTED] wrote: Hi, is there any straighforward way to create a listview from a xml plist source? (the plist contains one array, which contains several dictionaries. the dictionaries basically contain my listview columns). Yes. Load it

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 7:34 AM, Matthias Arndt [EMAIL PROTECTED] wrote: Robert, Am 18.07.2008 um 16:25 schrieb Robert Martin: In the next line, you reassign vAttributes to the contents of your iVar dictionary. Nothing points to that alloc'd dictionary in the first line anymore. Since

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 7:42 AM, Shawn Erickson [EMAIL PROTECTED] wrote: On Fri, Jul 18, 2008 at 7:34 AM, Matthias Arndt [EMAIL PROTECTED] wrote: Robert, Am 18.07.2008 um 16:25 schrieb Robert Martin: In the next line, you reassign vAttributes to the contents of your iVar dictionary

Re: Problem compiling first Cocoa app

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 7:34 AM, Paul Denlinger [EMAIL PROTECTED] wrote: I'm working on my first Cocoa lesson at http://www.cocoadevcentral.com/d/learn_cocoa/ Everything works fine until I try to compile the app. I get error code 71. Can you tell me what's wrong? Here is the error message:

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 8:55 AM, Matthew Williamson [EMAIL PROTECTED] wrote: but I need to be able to send Cocoa events into the system--meaning CGPostMouseEvent won't cut it. All the code examples I can find seem to use CGPostMouseEvent to accomplish this kind of thing. But I need to be

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 10:20 AM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: I should more clearly note that objectForKey: is not returning an autoreleased object. Also even if it did it would be an implementation detail (unless documented in the API

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 11:15 AM, Matthew Williamson [EMAIL PROTECTED] wrote: Ok, looking more at the Quartz event tap stuff, there's more there than I thought--tablet stuff is there, for instance. But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want

Re: Growl, NSTimer, and Launching Application help!

2008-07-21 Thread Shawn Erickson
On Mon, Jul 21, 2008 at 12:07 PM, Eric Lee [EMAIL PROTECTED] wrote: Problem 1: I've fully implemented growl, but how can you implement growl so that you can disable and enable growl by unchecking/checking a checkbox because too many small windows appearing might get a little annoying. Ask

Re: Weak link usage? @property?

2008-07-21 Thread Shawn Erickson
On Mon, Jul 21, 2008 at 3:07 PM, Scott Squires [EMAIL PROTECTED] wrote: So what's the correct form of weak linking to avoid retain cycles? If I have an instance variable in my child of it's parent: @interface MyChild blah blah... { MyParentClass * myParent; } @property

Re: NSLog on releasebuild

2008-07-23 Thread Shawn Erickson
On Wed, Jul 23, 2008 at 7:48 AM, Mike [EMAIL PROTECTED] wrote: Hello, During development and debug I typically use tons of NSLog()-messages to get info what's happening. I don't wish to include these messages to release-build so what is common/recommended way to get rid of them? Should I

Re: NSLog on releasebuild

2008-07-23 Thread Shawn Erickson
On Wed, Jul 23, 2008 at 8:33 AM, Phillip Jacobs [EMAIL PROTECTED] wrote: Is there anything particularly wrong with NSLog statements being in a release package? Performance wise? Security wise? Just wondering the root of the question. 1) Possible performance issue (just burning CPU for

Re: How to locate coding examples for specified commands [Newbie]

2008-07-26 Thread Shawn Erickson
On Sat, Jul 26, 2008 at 1:49 AM, Phil Faber [EMAIL PROTECTED] wrote: Can anyone direct me to an on-line resource that includes examples of how to use specific Cocoa commands? I assume you have looked at Apple extensive API and conceptual documentation? The are available directly in Xcode

Re: How to locate coding examples for specified commands [Newbie]

2008-07-26 Thread Shawn Erickson
On Sat, Jul 26, 2008 at 1:49 AM, Phil Faber [EMAIL PROTECTED] wrote: If someone can recommend a searchable resource, the first thing I'll be looking up is stringWithContentsOfFile:encoding:error: (I would have used this as an example above but can't find an example of its usage!) google

Re: Authenticate Password.

2008-07-28 Thread Shawn Erickson
On Mon, Jul 28, 2008 at 7:24 AM, Macarov Anatoli [EMAIL PROTECTED] wrote: With the help of this procedure I check whether the password has been entered correctly. But the code works only for the user with admins rights. How do I check the password being a standard user? You should never ask

Re: Using performSelector: on super

2008-08-05 Thread Shawn Erickson
On Tue, Aug 5, 2008 at 12:18 PM, James Bucanek [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote (Tuesday, August 5, 2008 5:41 AM +0100): My superclass (SuperSocket) provides a private method -close. Others have adiquetly explained the whole 'self' vs. 'super' issue,

Re: autorelease CGImageRef?

2008-08-06 Thread Shawn Erickson
On Wed, Aug 6, 2008 at 6:08 AM, Negm-Awad Amin [EMAIL PROTECTED] wrote: Am Mi,06.08.2008 um 14:26 schrieb Jean-Daniel Dupas: Be carefull when you mix CFType memory management, and obj-c memory management. It works well when you do not use GC, but may become problematic if you do not take

  1   2   3   4   >