Re: initializer for NSTextView subclass not being invoked on Nib instantiation

2009-04-08 Thread Jonathan Hess
Hey Stuart - This link should cover your questions: http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/1051i-CH4-SW19 You're using awakeFromNib for its intended purpose. Good Luck - Jon Hess On Apr 8, 2009, at 1:15 AM, S

Re: How to hook up IB actions to existing object (like File's Owner)?

2009-04-18 Thread Jonathan Hess
On Apr 15, 2009, at 2:08 PM, Sidney San Martín wrote: I want to hook up actions and bindings in a nib (loaded with +[NSBundle loadNibNamed:owner:]) to an object other than File's Owner (one which will already exist when the nib is loaded). Can I create a reference to a second object in Interfac

Re: Compiling a XIB creates a different NIB file everytime

2009-04-20 Thread Jonathan Hess
Hey Lyndsey - A NIB file contains many hash based unordered data structures, and won't have a byte for byte identical representation from one save/ compile operation to the next - even when the represented interface is identical. Jon Hess On Apr 20, 2009, at 10:47 AM, Lyndsey Ferguson wro

Re: Compiling a XIB creates a different NIB file everytime

2009-04-20 Thread Jonathan Hess
On Apr 20, 2009, at 1:44 PM, Lyndsey Ferguson wrote: On Apr 20, 2009, at 4:17 PM, Jonathan Hess wrote: A NIB file contains many hash based unordered data structures, and won't have a byte for byte identical representation from one save/ compile operation to the next - even whe

Re: NSArray merge sorting

2009-04-20 Thread Jonathan Hess
On Apr 20, 2009, at 5:32 PM, Greg Guerin wrote: Would NSSet cut the mustard here? NSArray allows duplicate items; NSSet does not. What do you propose happen if one or both NSArray inputs have items that compare as equal? Algorithmically speaking, a merge sort from two inputs into a new

Re: figuring out which TableView I am?

2009-04-26 Thread Jonathan Hess
Why not have a property/instance-variable that controls this directly and then set that in awakeFromNib from one of the controller classes that has an outlet to each of the table views? If I maintained your project after you, the tag variable inherited from a distant superclass would not be

Re: figuring out which TableView I am?

2009-04-26 Thread Jonathan Hess
On Apr 26, 2009, at 5:19 PM, Greg Guerin wrote: Jonathan Hess wrote: Why not have a property/instance-variable that controls this directly and then set that in awakeFromNib from one of the controller classes that has an outlet to each of the table views? If you needed a fully scalable

Re: figuring out which TableView I am?

2009-04-27 Thread Jonathan Hess
On Apr 27, 2009, at 2:10 AM, WT wrote: On Apr 27, 2009, at 6:44 AM, Michael Ash wrote: The correct approach here is to define a property, or a set of properties, on your table view subclass to control its appearance, then set up those properties in your controller in awakeFromNib. It is enti

Re: starting positions of the windows

2009-04-27 Thread Jonathan Hess
Hey Tony - Here's a link the Interface Builder User Guide which explains the sizing of NSWindow's and where they appear at runtime. http://tuvix.apple.com/documentation/DeveloperTools/Conceptual/IB_UserGuide/Layout/Layout.html#//apple_ref/doc/uid/TP40005344-CH19-SW14 ) Hopefully you'll fin

Re: create object from class name held in String?

2009-04-30 Thread Jonathan Hess
Hey Darren - Try NSClassFromString. Animal* anAnimal = [[NSClassFromString(@"Dog") alloc] init] Jon Hess On Apr 30, 2009, at 12:50 PM, Darren Minifie wrote: Hi everyone. I have the situation where I need to dynamically create an object based on the value held in a string at runtime. I'm

Re: Adding objects to NSMutableArray out of order?

2009-05-04 Thread Jonathan Hess
Hey Colin - It sounds like you are going to get results 1-n, out of order, here's what I would do: - (void)start { myArray = [[NSMutableArray alloc] init]; for(NSInteger idx = 0; idx <= n; idx += 1) { [myArray addObject:[NSNull null]]; } } - (void)processResult:(id)result

Re: Correct memory management in -awakeAfterUsingCoder: ?

2009-05-04 Thread Jonathan Hess
Hey Graham - I believe the expectation is that you return a retained instance from an override of awakeAfterUsingCoder:. This isn't clearly documented, so I would recommend filing a documentation bug. Good Luck - Jon Hess On May 4, 2009, at 9:45 PM, Graham Cox wrote: I am trying to track

Re: Integer as key in NSMutableDictionary

2009-05-04 Thread Jonathan Hess
Hey Weydson - NSDictionary equates keys by using -[NSObject isEqual:] and -[NSObject hash], so a number with a different pointer address but the same value as determined by isEqual: is fine. If identity vs value does become an important distinction for you, CFDictionary gives you control

Re: instantiateNibWithOwner: fails due to "mutated while enumerated"

2009-05-05 Thread Jonathan Hess
Hey Philip - Have you tried running with a breakpoint on objc_exception_throw? Looking at the backtrace when you hit the exception could shed some light on what is happening. If that doesn't work, you could try a breakpoint on NSLog(), or even write(). After you hit the breakpoint, a quic

Re: Calling a super call method from and instance

2009-05-07 Thread Jonathan Hess
Hey Dave - Usually wanting to do something like this points to some design flaw, but if you really want to invoke classA's implementation there are a number of ways to do it. One way would be to put a category on MyClassB like this: @implementation MyClassB(PassThrough) - (void)aboutMySupe

Re: NSToolbarItem with custom view in Interface Builder 3 (Leopard)

2009-05-11 Thread Jonathan Hess
Hey Gunnar - You won't be able to make this work with an instance of "custom view" dragged from the library. Here are a couple of suggestions for workarounds: You could add an outlet to the toolbar item you'd like to use a custom view with, and then place the custom view at the top level

Re: NSToolbarItem with custom view in Interface Builder 3 (Leopard)

2009-05-11 Thread Jonathan Hess
he Size pane of the inspector, not directly. If you drag a Custom View object into the allowed-items set, click it twice and set the name of the custom NSView class in the Identity pane of the inspector (Command-6)." Gunnar - Original Message From: Jonathan Hess To: Gunnar

Re: instance management in IB

2009-05-11 Thread Jonathan Hess
Hey Chris - This line "pointPath = [NSBezierPath bezierPath];" in the init method creates an NSBezierPath instance that may (will!) be destroyed with the next autorelease pool flush. You should be creating your bezier path with "pointPath = [[NSBezierPath alloc] init];" and then add a "[p

Re: instance management in IB

2009-05-12 Thread Jonathan Hess
On May 11, 2009, at 10:24 PM, Patrick Mau wrote: Hallo Chris The NIB loading guide states that custom objects, like your model object, are created using 'initWithCoder' and not plain 'init'. For many objects that is the case, but instances of "Custom View" and "Custom Object" will be cr

Re: Questions about the xib file downgrade from Leopard to Tiger

2009-05-13 Thread Jonathan Hess
Hey Daniel - What you're trying will probably work. IB is issuing a warning because it sees that MYCollectionView is a subclass of NSCollectionView, and it knows that NSCollectionView doesn't exist on Tiger. You can either ignore the warning, create the MYCollectionView in code, or tell IB

Re: Getting "Unknown class 'someClassName' in nib file" message

2009-05-13 Thread Jonathan Hess
Hey Stuart - Try putting a breakpoint on NSLog, and then run your app. When you hit the breakpoint, look at the backtrace. It will give you an idea of which NIB is being loaded. After you figure that out, open the NIB/XIB file in IB and in the object outline view make sure the class name

Re: initWIthFrame or awakeFromNib

2009-05-14 Thread Jonathan Hess
On May 13, 2009, at 9:32 PM, Joar Wingfors wrote: ...to follow up on that a bit: When you're instantiated from nib loading you will not see "-initWithFrame:" being called, but rather "-initWithCoder:". You can read more about that in the NSCoding & Nib Loading documentation. Depending on

Re: What's the differnece between API and Framework?

2009-05-21 Thread Jonathan Hess
An API is a set of functions, classes, methods, and other bits that give you a method to interface with a piece of software. A framework is one concrete way to package a body of software with a set of header files that describe its API. A web service is another way to give clients an API to

Re: Fixing logged error that doesn't throw exception

2009-05-27 Thread Jonathan Hess
The technique I typically use to debug these types of log messages is a breakpoint on NSLog. If that isn't hit, you could try a breakpoint on write. After you hit the breakpoint, verify that it's for the log message you're trying to debug, and then use the backtrace to get an idea of what e

Re: Adding NSMenuItem in IB

2009-06-01 Thread Jonathan Hess
On Jun 1, 2009, at 2:59 AM, Vijay Kanse wrote: Sorry for My Question, Actually i was dragging NSMenu from Library and I was trying to Add it as Sub Menu. Ah, the problem here is that NSMenu instances contain an array of NSMenuItem instances. NSMenuItem instances can each contain a single

Re: XIB and AppleGlot

2009-06-04 Thread Jonathan Hess
On Jun 4, 2009, at 6:28 AM, Eric Slosser wrote: (Sorry if this is OT, I couldn't find a better apple-hosted list...) How does one use AppleGlot and XIBs? I have an app, "My.app", that was previously localized. I'm working on version 2.0. My app is starting to use XIB files. These get co

Re: Should touch events related to a given view be implemented in the view or the view controller?

2009-06-04 Thread Jonathan Hess
Hey Michael - It might help to approach this problem with the idea of "If I had multiple view controllers using this view, how would I make that work best". Event handling is something you would normally manage at the UIView layer. After those events are handled, they're typically transla

Re: XIB and AppleGlot

2009-06-05 Thread Jonathan Hess
On Jun 5, 2009, at 3:38 AM, Eric Slosser wrote: On Jun 4, 2009, at 8:46 PM, Jonathan Hess wrote: On Jun 4, 2009, at 6:28 AM, Eric Slosser wrote: (Sorry if this is OT, I couldn't find a better apple-hosted list...) How does one use AppleGlot and XIBs? I have an app, "My.app&

Re: (newbie) help with combining navigation controller and tab bar controller

2009-06-05 Thread Jonathan Hess
Hey Beth - You should be able to drag a navigation controller from IB's Library directly into the on screen editor (window) for the UITabBarController. Assuming you started with the default tab bar controller, at this point you will have produced a document with this structure: MainWind

Re: selecting tab in a tabless NSTabView in IB

2009-06-07 Thread Jonathan Hess
On Jun 7, 2009, at 9:13 PM, Rob Keniger wrote: On 06/06/2009, at 6:08 AM, Stephen Blinkhorn wrote: Does anyone know if it is possible to change the current tab in a tabless NSTabView from within Interface Builder without having to go into the inspector and change tabless style to top tabs

Re: documenting bindings (was: Re: Dynamically loading a part of a Window in Cocoa)

2009-07-02 Thread Jonathan Hendry
On Jul 3, 2009, at 00:25 AM, Jeff Johnson wrote: This is why I tell people nibs are no good. Also bindings. ;-) Bindings are definitely the worst-case scenario for nibs. They tend to proliferate, and they are burrowed deep in the IB UI making them hard to miss if you don't check every wi

Re: Interface Builder Questions...

2009-07-06 Thread Jonathan Hess
On Jun 28, 2009, at 12:59 PM, Phil Hystad wrote: I am new to Interface Builder and I am still trying to figure out some subtle details of how things work. And, my frustration level is growing because although I have access to a very rich set of documentation, a number of questions I have

Re: Saving NSArray of custom objects

2009-07-13 Thread Jonathan Hess
Hey dkj - The method -[NSArray writeToFile: atomically:] uses property list serialization, and property lists support a fixed set of types. You want to serialize your NSArray with an NSCoder, like NSKeyedArchiver, and then read it back in with NSKeyedUnarchiver. Take a look at these two m

Re: ibtool and genstrings do nothing

2009-07-16 Thread Jonathan Hess
ibtool -generate-strings-file MainWindow.nib MainWindow.xib Will invoke ibtool, and tell it to open MainWindow.xib and then read all the localizable strings out of that XIB, and then write them into the argument of the "-generate-strings-file" argument. So after running that command, ibtool

Re: UITextView Doesn't seem to function

2009-07-16 Thread Jonathan Hess
Have you verified that the "about" pointer is actually set to point to a text field? If it was nil, it would explain the behavior your describing. Jon Hess On Jul 16, 2009, at 6:52 PM, Development wrote: Ok, I have tried: about.text = @"About text"; and [about setText:@"About Text"] but

Re: [iPhone] Why can't a UITextField be its own delegate?

2009-07-27 Thread Jonathan Hendry
On Jul 25, 2009, at 16:14 PM, WT wrote: Convoluted? I don't see it that way. This particular text field needs to limit its number of characters to a given interval. Seems like a good job for an NSFormatter attached to the field. ___ Cocoa-dev ma

Re: Making NSTextView not wrap lines

2009-07-30 Thread Jonathan Dann
From the archives: http://www.cocoabuilder.com/archive/message/cocoa/2008/5/23/207981 On 28 Jul 2009, at 18:11, Peter Mulholland wrote: Hello cocoa-dev, Basically, i'm trying to do a little debug console. I'm using the NSTextView in NSScrollView from Interface Builder. I've got a Print me

Re: Newbie query re multithreading

2009-08-18 Thread Jonathan Dann
smaller chunks than 1 per CPU (or effective cores). Can you post some example code that can shed some more light on what you're doing? Jonathan http://madebysofa.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: devil of a time with an NSImageView

2009-08-19 Thread Jonathan Hess
What happens if you include this log to your setImage method? NSLog(@"image view: %@", boxPic); Also, rather than logging you should see if you can find the time to learn to use the debugger. It's much more efficient than printf debugging. Good Luck - Jon Hess On Aug 19, 2009, at 2:31 PM,

Re: devil of a time with an NSImageView

2009-08-19 Thread Jonathan Hess
tell it to load a NIB, but the NIB file also instantiates a second instance of the class because the File's Owner was misunderstood. Hope that helps - Jon Hess On Aug 19, 2009, at 5:28 PM, Jack Carbaugh wrote: The result is null. On Aug 19, 2009, at 8:04 PM, Jonathan Hess wrote:

Re: devil of a time with an NSImageView

2009-08-20 Thread Jonathan Hess
c. A couple of weeks ago on this list, one of our Apple experts (Luke, maybe, but I can't remember for sure) said to use the more specialized method (such as 'windowDidLoad') *instead of* the generic 'awakeFromNib', if the class has it. I missed that thread. Do you happen to know some keywo

How to create an interface without interface builder

2009-08-20 Thread Jonathan Chacón
Hello, I'm a blind developer and I'm studing Cocoa and ObjetiveC. All documentation I found uses interface builder to add controls to the window. Does anybody know any sample or tutorial to create interfaces using objetiveC without interface bulder? thanks and regards

Re: Strange Problems with IBPlugin

2009-12-28 Thread Jonathan Hess
On Dec 26, 2009, at 9:38 PM, Carter Allen wrote: > Hello! > > Thanks in advance, I know this is a lot to ask. I am working on a framework > of custom classes for my own personal use, and it was going very well until > I started to work on the Interface Builder plugin part. Download the > non-wor

appController class in InterfaceBuilder

2010-01-12 Thread Jonathan Chacón
Does anybody know where is the appController class in the library of interfaceBuilder or how to define the controller using the keyboard in interfaceBuilder? thanks and regards Jonathan Chacón ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Accessing Variables from Multiple NIBs

2010-01-16 Thread Jonathan Buys
Hello, I have an AppController that looks like this: AppController.h: #import @class PostController; @interface AppController : NSObject { PostController *postController; NSString *theString; } - (IBAction)setString:(id)sender; - (IBAction)viewString:(id)sender; - (void)proce

Re: Unembed Objects

2010-01-18 Thread Jonathan Hess
On Jan 18, 2010, at 3:50 PM, David Blanton wrote: > I have embeded two views in a split view then embeded that result with > another view in a split view to get a resulting vert splitter and horz > splitter. > > Now I would like to Uembed an cannot no matter what selections I do get > Uembed

NSBundle unloading crash

2010-01-27 Thread Jonathan Guy
Hi all This problem has me pretty stumped. I've been trying to figure this out for about a week now with no success. I have an embedded framework which itself has two embedded bundles. The two bundles contain the same code of an open source project but just different versions. The framework is d

Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
ive-C spanish documentation but all books use interface Builder method to do this. Where can I find an easy example code? thanks and regards Jonathan Chacón ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
le or outleet in the declaration area of a class? sorry but I'm newbie in Cocoa and Objetive-C thanks and regards Jonathan Chacón El 28/01/2010, a las 17:36, Jens Alfke escribió: > > On Jan 28, 2010, at 6:38 AM, Jonathan Chacón wrote: > >> I can use interface builder t

Re: Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
Hello everybody, OK, thanks for the information... I'll find info about @selector, setActions in Objetive-C and I'll post this question in xCode list. I want to develop some games for blind users in iPhone thanks and regards Jonathan Chacón El 28/01/2010, a las 22:08,

Re: Hot to define a connection from source code?

2010-01-28 Thread Jonathan Chacón
Hello Roland, Could you tell me any example project where I examine the source code? thanks and regards Jonathan Chacón El 29/01/2010, a las 06:04, Roland King escribió: > Jonathan Chacón wrote: >> Hello everybody, >> OK, thanks for the information... >> I'll

Re: NSBundle unloading crash

2010-01-29 Thread Jonathan Guy
been passed back to me by a method in the bundle once it has been unloaded? (the dictionary contains only standard foundation kit objects). Also any other things to watch out for would be greatly appreciated. On 27 Jan 2010, at 22:30, Greg Parker wrote: > On Jan 27, 2010, at 2:01 AM, Jonathan

Re: Hot to define a connection from source code?

2010-01-29 Thread Jonathan Chacón
Hello, thanks for the information I'll download bubbleLevel sample code and I'll study it thanks and regards Jonathan Chacón El 29/01/2010, a las 11:23, B.J. Buchalter escribió: > > On Jan 29, 2010, at 12:17 AM, Jonathan Chacón wrote: > >> Hello Roland, >

Re: xibs working OK?

2008-02-22 Thread Jonathan del Strother
On Fri, Feb 22, 2008 at 12:27 AM, Chris Ryland <[EMAIL PROTECTED]> wrote: > Other than sporadic mentions of problems hither and thither, I don't > see anyone complaining about using .xib (vs .nib) format much. > > Does that mean they're safe to use? Any other experiences? > I've found they're be

Re: Problems with ScriptingBridge and iTunes

2008-03-01 Thread Jonathan 'Wolf' Rentzsch
ame thing -- Scripting Bridge may play games isKindOfClass: that bite us. My work-around is to test by class name: if ([[track className] isEqualToString:@"ITunesURLTrack"]) { /* ... */ } | Jonathan 'Wolf' Rentzsch http://rentzsch.com | Red Shed S

Re: Intercepting retain/release of object

2008-03-19 Thread Jonathan del Strother
On Wed, Mar 19, 2008 at 5:54 PM, Stuart Malin <[EMAIL PROTECTED]> wrote: > I am having some trouble in an app with an object and its retain > counts, so I added methods to intercept -retain and -release on my > affected object so I could set breakpoints to observe the value. But > doing so cause

Re: method declaration error

2008-03-27 Thread Jonathan del Strother
On Thu, Mar 27, 2008 at 12:21 PM, Nick Rogers <[EMAIL PROTECTED]> wrote: > i'm declaring the following method: > > - (BOOL)searchNodeTarget:(const ItemType)target > location:(int &)location; > > with error: "parse error before '&' token". > > can we not use (int &) this way? Re

-[CALayer setContents: cvPixelBufferRef ] ?

2008-04-03 Thread Jonathan del Strother
I have a CVPixelBufferRef, with a 2vuy pixel format. I'd like to display it in a CALayer. CALayer says that 'contents' is "typically a CGImageRef, but may be something else". I (optimistically) tried assigning the CVPixelBufferRef directly to the contents, but apparently that's not included in t

Re: -[CALayer setContents: cvPixelBufferRef ] ?

2008-04-03 Thread Jonathan del Strother
On Thu, Apr 3, 2008 at 8:23 PM, David Duncan <[EMAIL PROTECTED]> wrote: > On Apr 3, 2008, at 11:34 AM, Jonathan del Strother wrote: > > > > CALayer says that 'contents' is "typically a CGImageRef, but may be > > something else". I (optimistically) tr

Re: -[CALayer setContents: cvPixelBufferRef ] ?

2008-04-03 Thread Jonathan del Strother
On Thu, Apr 3, 2008 at 8:38 PM, David Duncan <[EMAIL PROTECTED]> wrote: > On Apr 3, 2008, at 12:28 PM, Jonathan del Strother wrote: > > > > > > If you have a CVPixelBufferRef, you can use the various functions > defined > > > for a CVPixelBuffer to access the

Re: How to get a notification which tells a folder name got changed

2008-04-09 Thread Jonathan del Strother
On Wed, Apr 9, 2008 at 11:13 AM, norio <[EMAIL PROTECTED]> wrote: > Hi, > > My app wants to know whether the name or the location of a folder got > changed. > Is there any notifications to tell those changes? You might try the FSEvents api ___ Cocoa-d

Re: Why should we set ivars to nil in dealloc?

2008-04-13 Thread Jonathan del Strother
On Sun, Apr 13, 2008 at 6:48 PM, Ferhat Ayaz <[EMAIL PROTECTED]> wrote: > I see in some Apple's Cocoa examples that ivars are set to nil in the > dealloc method. The auto generated Core Data AppDelegate for new projects > is doing this for each ivar. Here is a simple example: > > - (void)dealloc

Re: Memory leak when re-alloc Methods

2008-04-16 Thread Jonathan del Strother
On Wed, Apr 16, 2008 at 1:17 AM, Mario Gajardo Tassara <[EMAIL PROTECTED]> wrote: > > El 15-04-2008, a las 14:21, [EMAIL PROTECTED] escribió: > > > > > > > I have a nasty leak problem when i realloc several methods of the main > class of my app. > > > > > > > Without seeing your code, all I can s

Re: Weird build error

2008-04-17 Thread Jonathan del Strother
On Thu, Apr 17, 2008 at 11:47 PM, Don Arnel <[EMAIL PROTECTED]> wrote: > I've been working on a project for a few weeks now and suddenly today I get > this error while building (see below). I was getting this same error in one > of my real classes so after commenting out almost every bit of code an

Re: max # of file handles

2008-04-19 Thread Jonathan del Strother
On Fri, Apr 18, 2008 at 9:00 PM, Wesley Smith <[EMAIL PROTECTED]> wrote: > I'm trying to debug a Cocoa app that occasionally exceeds the max > allowable number of file handles open and I'm wondering if there's a > way to query how many are actually open. I haven't found anything in > the docs.

Re: How is this possible?

2008-04-20 Thread Jonathan del Strother
On Sun, Apr 20, 2008 at 4:25 PM, Don Arnel <[EMAIL PROTECTED]> wrote: > I have two different class objects that need to know about each other (see > below). But if I include the header from one class inside the header of the > other class the compiler complains. Is this even possible? > > ClassOne

CALayer backgroundFilters can't cope with animated backgrounds?

2008-05-02 Thread Jonathan del Strother
Hi, I have a CALayer covering my view, with a blur background filter. Works fine for static cases - everything behind the blur layer is blurred. However, for layers that update themselves continuously - eg QTMovieLayer or QCCompositionLayer - or even just plain layers that move, I get ugly trails a

Re: html question

2008-05-19 Thread Jonathan del Strother
On Mon, May 19, 2008 at 11:27 AM, <[EMAIL PROTECTED]> wrote: > Hi, > I want to convert string to its corresponding values.I found a method in > NSAttributedString initWithHtml,i think it will convert HTML to > attributed string.I found 3 attributes > NSString *NSExcludedElementsDocumentAttribute

Re: Cover Flow in Cocoa?

2008-05-23 Thread Jonathan del Strother
On Fri, May 23, 2008 at 10:33 PM, Wayne Shao <[EMAIL PROTECTED]> wrote: > I am thinking to use Cover Flow in cocoa app. > > - Is this a good idea for a desktop/laptop app? > - What APIs are available? CoverFlow outside of iTunes? Terrible idea, it'll never take off. __

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Jonathan del Strother
On Sat, May 31, 2008 at 10:03 AM, Hamish Allan <[EMAIL PROTECTED]> wrote: > On Sat, May 31, 2008 at 8:48 AM, Rick Mann <[EMAIL PROTECTED]> wrote: >> >> On May 31, 2008, at 00:32:30, j o a r wrote: >> >>> Search for "NSKeyValueObservingOptionNew" here: >> >> Already using that: > > Read it again: >

Re: Leak when animating Core Animation Superlayer

2008-06-01 Thread Jonathan del Strother
On 6/1/08, Stéphane Droux <[EMAIL PROTECTED]> wrote: > On Sun, Jun 1, 2008 at 1:40 PM, Brian Christensen <[EMAIL PROTECTED]> wrote: > >> >> Even with this new code I'm still not observing any leaking. Are you using >> garbage collection? With GC enabled you will observe fluctuations until >> the >>

Re: NSArray

2008-06-01 Thread Jonathan del Strother
On Mon, Jun 2, 2008 at 1:02 AM, Nathan <[EMAIL PROTECTED]> wrote: > here's my code: > > int x; > - (IBAction)addNew:(id)sender { >NSString *temp = @"Enter Todo Item Here"; >[Items addObject: temp]; >x=[Items count]; >[label setIntValue: x]; >[tableView setDataSou

Re: TDD/BDD testing methodologies?

2008-06-09 Thread Jonathan del Strother
On Mon, Jun 9, 2008 at 2:34 PM, David Troy <[EMAIL PROTECTED]> wrote: > Hi there, > > I am new to Cocoa and XCode and have spent the most recent part of my 20+ > years of programming using Ruby rather extensively. > > Part of the kool-aid in Ruby land is test-driven and behavior driven > developmen

Re: warning: return makes pointer from integer without cast

2008-06-10 Thread Jonathan del Strother
On Tue, Jun 10, 2008 at 1:32 PM, Steven Hamilton <[EMAIL PROTECTED]> wrote: > Hi folks, newbie here. > > A quickie query on a warning. > > Both returns in the following code give a 'warning: return makes pointer > from integer without cast' > > - (id)outlineView:(NSOutlineView *)outlineView > numbe

Re: Requesting Administrator Name and Password

2008-06-16 Thread Jonathan del Strother
On Mon, Jun 16, 2008 at 11:35 AM, Glover,David <[EMAIL PROTECTED]> wrote: > Hi all, > > > > I've created a little app that removes some files from within > /Applications. This works fine when logged in as an Administrator, but > won't run when logged in as a standard user. > > > > I've been spendi

Re: #import importing twice?

2008-06-19 Thread Jonathan del Strother
On Thu, Jun 19, 2008 at 9:36 AM, Martin Häcker <[EMAIL PROTECTED]> wrote: > Hi guys, > > I was today stung by a problem that I couldn't quite understand. > > I was importing a header file with #import and the compiler complained about > a duplicate interface declaration of the class defined in the

Re: Releasing objects causes BAD_ACCESS

2008-07-07 Thread Jonathan del Strother
On Mon, Jul 7, 2008 at 10:38 PM, Meik Schuetz <[EMAIL PROTECTED]> wrote: > Dear all, > > according to the document > > http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html > > the connection object as well as the receivedData object are released

Re: Get MD5 without crashing

2008-11-04 Thread Jonathan del Strother
Please just refer people to http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html when memory management comes up. And in Gecko's case, 'crypto' certainly does need to be released, since it's being alloc-inited. On Tue, Nov 4, 2008 at 1:48 PM, Alex

Programmatically constructing list of variable arguments?

2008-12-12 Thread Jonathan del Strother
I'm calling a method that takes a nil-terminated variable list of arguments. It doesn't supply a va_arg alternative (like NSLogv, -[NSString initWithFormat:arguments:] etc). The number of arguments isn't known at compile-time. I'd like to be able to take an NSArray of the arguments, and programm

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Jonathan del Strother
On Fri, Dec 12, 2008 at 2:14 PM, Kyle Sluder wrote: > On Fri, Dec 12, 2008 at 9:12 AM, Kyle Sluder > wrote: >> On Fri, Dec 12, 2008 at 8:53 AM, Jonathan del Strother >>> The number of arguments isn't known at compile-time. I'd like to be >>> able

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Jonathan del Strother
On Fri, Dec 12, 2008 at 2:54 PM, wrote: > > On 12 Dec 2008, at 15:41, Jonathan del Strother wrote: > >> Which works fine, but rapidly expands into a huge if-statement as you >> try and handle more states. Ideally I'd like to do something along >> the lines of: &

-[NSURLConnection cancel] doesn't release its delegate?

2008-12-18 Thread Jonathan del Strother
on a separate thread with its own run loop, and I was just cancelling the connection & immediately exiting the thread. Is this a bug, undocumented feature, or am I missing something? A teeny sample program demonstrating the problem appears below. -Jonathan #import #include static int32_t fac

Re: -[NSURLConnection cancel] doesn't release its delegate?

2008-12-19 Thread Jonathan del Strother
On Thu, Dec 18, 2008 at 6:43 PM, Stephen J. Butler wrote: > Actually, this works for me on 10.5.6, with XCode 3.1.1. The assert > doesn't trigger. > ... > Or it could be a bug that was fixed in the latest release.Try putting > a run loop in your main function instead. I'd try it, but like I said,

Re: Why would +[initialize] be called twice?

2009-08-24 Thread Jonathan del Strother
On Mon, Aug 24, 2009 at 6:19 PM, Michael A. Crawford wrote: > Why would the class initializer be called more than once when my app starts > up? Is this expected behavior?  In case you're wondering, it is called > twice. > > + (void)initialize > { >    // Create the defaults dictionary, fill it with

Re: Xcode Analyze memory misunderstanding

2009-08-27 Thread Jonathan del Strother
On Thu, Aug 27, 2009 at 11:29 AM, Reza Farhad wrote: > Dear all > > I am running my code through xcode "Build and Analyze" to check for bugs. > I have the function below which gives me the following error: > > Object with +0 retain counts returned to caller where a +1 (owning) retain > count is exp

Re: How to extract the "Artist" information of an song file?

2009-08-29 Thread Jonathan del Strother
2009/8/29 James : > Hi all, > How to extract the "Artist" information from an song file? > Is there any method about it ? Any clues is helpful for me. > Thank you in advance! If it's an AAC file, you can use the QTMetaData* functions. If you're looking to get it out of an mp3, you're unfortunatel

"Format not a string literal and no format arguments"

2009-08-29 Thread Jonathan del Strother
After upgrading to snow leopard & Xcode 3.2, I've starting getting this warning on NSLogs - NSLog(@"Hello"); // 'Format not a string literal and no format arguments' NSLog(@"Hello %@", name); // compiles fine I must have some weird project setting somewhere since a new test project didn't t

Re: "Format not a string literal and no format arguments"

2009-08-29 Thread Jonathan del Strother
cey Morris wrote: > On Aug 29, 2009, at 05:36, Jonathan del Strother wrote: > >> After upgrading to snow leopard & Xcode 3.2, I've starting getting >> this warning on NSLogs - >> >> NSLog(@"Hello");  //   'Format not a string literal and no form

Overriding -[UIViewController loadView], and loading from a nib

2009-11-03 Thread Jonathan del Strother
Heya, I'd like to get hold of the top level objects returned by -[NSBundle loadNibNamed:owner:options:] when UIViewController loads my view. Sadly UIViewController doesn't seem to provide any way of accessing these, so I thought I might be able to just load the nib myself : -(void)loadView {

Re: Overriding -[UIViewController loadView], and loading from a nib

2009-11-03 Thread Jonathan del Strother
2009/11/3 Jonathan del Strother : > Heya, > > I'd like to get hold of the top level objects returned by -[NSBundle > loadNibNamed:owner:options:] when UIViewController loads my view. > Sadly UIViewController doesn't seem to provide any way of accessing > these, so I tho

Re: Overriding -[UIViewController loadView], and loading from a nib

2009-11-03 Thread Jonathan del Strother
h the nib. > > Luke > > On Nov 3, 2009, at 5:27 AM, Jonathan del Strother wrote: > >> 2009/11/3 Jonathan del Strother : >>> >>> Heya, >>> >>> I'd like to get hold of the top level objects returned by -[NSBundle >>> loadNibNamed:ow

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Jonathan del Strother
On Mon, Jul 28, 2008 at 8:02 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > Once in a blue moon, I get a console message that a nil string was passed to > [NSConcreteAttributedString initWithString:] I'd like to find out where this > is coming from by setting a breakpoint there, but only for a nil str

Re: Question about respondsToSelector

2008-08-19 Thread Jonathan del Strother
On Tue, Aug 19, 2008 at 2:33 PM, Carmen Cerino Jr. <[EMAIL PROTECTED]> wrote: > Sorry about the sketchy details. Basically I have a wrapper class for the > Sequence Grabber, and I want to setup a delegate for the decompression > callback. > > This is where I use the respondsToSelector method: > sta

Re: Parse form values from HTTP POST

2008-08-21 Thread Jonathan del Strother
On Thu, Aug 21, 2008 at 9:17 AM, Thomas Engelmeier <[EMAIL PROTECTED]> wrote: > > Am 20.08.2008 um 22:54 schrieb Jesse Grosjean: > >> Does anyone know what the best way to parse form values from and HTTP Post >> is? >> >> I have a mini HTTP server in my app, and it needs to accept posts. I'm >> usi

Re: Object change to NSView update

2008-08-22 Thread Jonathan del Strother
On Fri, Aug 22, 2008 at 3:58 PM, Paul Bruneau <[EMAIL PROTECTED]> wrote: > I feel I can nearly grasp what I need to do, but not quite. I know what I > shouldn't be doing--which is what I am doing and I feel I'm a little in the > weeds. I seek a nudge in the right direction if someone can help. > >

Re: confused about allocating and releasing objects

2008-08-27 Thread Jonathan del Strother
On Wed, Aug 27, 2008 at 11:45 AM, Memo Akten <[EMAIL PROTECTED]> wrote: > HI All, i'm a bit confused about the 2 scenarios: > > NSDictionary *myData1 = [NSDictionary > dictionaryWithContentsOfFile:@"mydata.plist"]; // this one I don't > need to release when I'm done? > NSDictionary *myData

Re: confused about allocating and releasing objects

2008-08-27 Thread Jonathan del Strother
On Wed, Aug 27, 2008 at 12:13 PM, Memo Akten <[EMAIL PROTECTED]> wrote: > ok thanks, I"ve added that link to my ever growing Cocoa bookmarks!! > I'm just writing a Quartz Composer plugin using the QCPlugIn API and ran > into a problem regarding this, my question isn't related to the QCPlugIn API >

Re: Weird Error

2008-09-19 Thread Jonathan del Strother
On Fri, Sep 19, 2008 at 4:18 PM, development2 <[EMAIL PROTECTED]> wrote: > Ok I hope someone can help me. I need to get this working. > > Here is what I am doing. I have a class called Object, it is set up like > this: > > -- Object.h > > @interface Object : NSObject > { > >NSNu

Problems with loose ViewController coupling and KVO to-many relationships

2008-09-30 Thread Jonathan del Strother
as really a deletion and what was just a reordering), but they all seem pretty ugly and heavyweight. How is this usually handled? How do you managed your view controller lifetimes w.r.t. the model lifetime? Thanks for reading this far, any suggestion

Re: Newbie: Simple display with NSView - problem

2008-10-01 Thread Jonathan del Strother
On Thu, Oct 2, 2008 at 12:42 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > > On 2 Oct 2008, at 5:02 am, Genu Mathew wrote: > >> On debugging, I found that when I run the command [NewWindow >> showWindow:self] in the APPController class, the constructor of >> 'OUSubImageView is called twice > > > > So

<    1   2   3   4   5   >