Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread mmalc Crawford
On Sep 3, 2009, at 7:56 AM, Scott Andrew wrote: As Cocoa documentation states all items returned from a message are autoreleased unless otherwise stated in the documentation for the API call. The documentation emphatically does not state that. The basic rules are given here:

Re: NSArrayController design/usage question

2009-09-08 Thread mmalc Crawford
On Sep 6, 2009, at 10:00 AM, Steven Degutis wrote: For instance, if you have 2 genuine properties on your "Person" entity called firstName and lastName then you can create a fullName property on your Person class, and when firstName or lastName change, call -willChangeValueForKey: and -didCh

Re: CoreData Bug? (SQLite vs XML)

2009-09-13 Thread mmalc Crawford
On Sep 13, 2009, at 9:14 AM, Milen Dzhumerov wrote: -(void)awakeFromFetch { for(id base in [self relationship]) Log(@"%@", base); ... } awakeFromFetch [...] Important: Subclasses must invoke super’s implementation before performing their own initialization.

Re: Core data - how to set string min max programmatically?

2009-09-16 Thread mmalc Crawford
On Sep 16, 2009, at 3:56 PM, Leon Starr wrote: I have been creating my models programmatically and am wondering how to treat the min/max length fields for string attributes. I can't seem to find any corresponding programatic settings. (Also wondering if there is any effect to these setti

Re: Binding to values which aren't there

2009-10-09 Thread mmalc Crawford
On Oct 9, 2009, at 3:17 PM, A B wrote: > I have a situation in which I would like a column in a table that is bound to > an NSArrayController to display information that isn't actually in the > objects being represented, but is instead the result of an operation that > involves a bit of data i

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread mmalc Crawford
On Oct 14, 2009, at 5:21 PM, Rick Mann wrote: >NSMutableData* data = [NSMutableData data]; >[data appendBytes: &self length: sizeof (self)]; > Try using an NSValue: + (NSValue *)valueWithPointer:(const void *)aPointer archive then unarchive - (void *)pointerValue mmalc ___

Re: odd behavior with NSError?

2009-10-15 Thread mmalc Crawford
On Oct 15, 2009, at 10:41 pm, Nathan Vander Wilt wrote: > Ouch. So the following pattern is incorrect? > > NSError* internalError = nil; > (void)[foo somethingReturningBool:bar error:&internalError]; > if (internalError) { >// ... > } >

Re: Sending a Selector to another Class.

2009-10-22 Thread mmalc Crawford
On Oct 22, 2009, at 9:54 am, Jeff Johnson wrote: > "Ignore bbum. We hereby promise never to break == for SEL. (But SEL is not > char*. We will break that.)" > And now that it's on the mailing lists, it can be considered part of Apple's > official documentation. ;-) > It already is:

Re: Search on Core data Table issue?

2009-10-22 Thread mmalc Crawford
On Oct 22, 2009, at 4:09 am, Matthew Lindfield Seager wrote: > A "reducing search" is more commonly referred to as filtering. A > google search should help you very quickly as this is very easy with > core data & bindings. > The question is related to iPhone and NSFetchedRestultsController, ther

Re: 2 Questions about the project "With and Without bindings"

2009-10-23 Thread mmalc Crawford
On Oct 23, 2009, at 5:27 pm, Ken Thomases wrote: > Indeed, there are no dealloc methods in the entire sample, which makes it > buggy. There should be one for the MyDocument and Bookmark classes. > The bug is actually that, for some reason, the projects aren't marked as using garbage collectio

Re: Preparing for MOM versioning in version 1

2009-10-26 Thread mmalc Crawford
On Oct 26, 2009, at 9:00 am, Fritz Anderson wrote: > I'm about to unleash a Core Data-based application, and I'm sure the schema > will change in later versions. The Core Data Model Versioning and Data > Migration Programming Guide seems to say that migrating a store from one > version to anot

Re: Adding new Core Data objects through a form

2009-10-28 Thread mmalc Crawford
On Oct 28, 2009, at 6:26 am, Martin Cote wrote: > That said, the situation in this sample project is quite different. > When they add an object, they actually add an empty object in an array > controller. > This is precisely what the example does not do.

Re: Programmatic Binding KVC KVO

2009-11-04 Thread mmalc Crawford
On Nov 4, 2009, at 5:20 pm, Rob Keniger wrote: >>> See mmalc’s Graphics Bindings sample: >>> >>> http://homepage.mac.com/mmalc/CocoaExamples/controllers.html >> >> Sometimes Cocoa can be overwhelming. This will help. Thank you so much. :) > > You might also find this blog post very helpful

Re: Strings mangled on generalPasteboard

2009-11-23 Thread mmalc Crawford
On Nov 23, 2009, at 8:54 am, Jens Alfke wrote: > The Cocoa Pasteboard API has the annoying limitation that there is no > standard, public data type for multiple URLs. > This is no longer true with Mac OS X v10.6 and later -- you can write and read multiple URLs to and from to the pasteboard.

Re: Strings mangled on generalPasteboard

2009-11-23 Thread mmalc Crawford
On Nov 23, 2009, at 1:04 pm, Jens Alfke wrote: >> [url pasteboardPropertyListForType:(NSString *)kUTTypeURL] > > But that still only writes a single NSURL, right? How do you write multiple > using that API? > On Mac OS X v10.6 and later, you can write multiple items to a pasteboard, so you

Re: Checking integrity of a Core Data document with SQLite store

2010-03-14 Thread mmalc Crawford
On Mar 14, 2010, at 7:21 pm, Dave Fernandes wrote: > So my question is - how do you detect this before loading the file? I'm aware > of the sqlite3 PRAGMA integrity_check, but there does not seem to be a C API > for this. Any pointers? >

Re: Core data backed UITableView

2010-03-15 Thread mmalc Crawford
On Mar 15, 2010, at 5:33 pm, Damien Cooke wrote: > [self.myTableView deleteRowsAtIndexPaths:[NSArray > arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; > Why are you doing this rather than (in addition to? which if so would probably be the cause of the problem) s

Re: Solving memory leaks

2010-03-28 Thread mmalc Crawford
On Mar 28, 2010, at 10:27 am, Michael Davey wrote: > That would be gut for the fact that my fields are released and set to nil > whenever a new SELECT query is executed - however, I think I can do this by > emptying the array when a new query is done and just counting the size of the > array i

Re: Solving memory leaks

2010-03-28 Thread mmalc Crawford
On Mar 28, 2010, at 11:03 am, Philip Mobley wrote: > When calling setFields, you are then responsible for releasing the > "newFields" NSMutableArray you created in your sample code, because > [newFields mutableCopy] increments the ref counter. > This is not correct. [newFields mutableCopy] re

Re: Regarding MVC design pattern

2010-05-20 Thread mmalc Crawford
On May 19, 2010, at 4:38 am, Sherm Pendley wrote: > If you set the ivars directly, as above, the synthesized setters will > NOT be called. For that to happen, you need to use dot-syntax, like > this: > > - (void) dealloc { >self.beginButton = nil; >self.endButton = nil; >// etc... >

Re: Regarding MVC design pattern

2010-05-20 Thread mmalc Crawford
On May 19, 2010, at 1:48 am, Sai wrote: > 1. Look at the awakeFromNib method of Controller, my output of the retain > count to the console are > myModel retain count: 5 > controller retain count: 17 > both number are very surprised me, why is that? I suppose they should be 2 > or 1? > Can anyone

Re: Regarding MVC design pattern

2010-05-20 Thread mmalc Crawford
On May 20, 2010, at 7:40 am, Thomas Davie wrote: >> However, you should typically not invoke accessor methods in init or dealloc >> methods. > > Can I ask why you shouldn't use them in init? It makes a lot of sense to not > use them in alloc/dealloc, but I'm not using them in init... after al

Re: Using NSFetchRequest to fetch NSManagedObject subclasses

2010-07-11 Thread mmalc Crawford
On Jul 10, 2010, at 7:31 am, Matt James wrote: > That's absolutely right, though I'm glad Joanna chimed in since I didn't > know that was the common way to generate those classes to begin with (as I > said, I'm completely new to the workings of Core Data). > This technique is described in the in

Re: Managing Files with CoreData

2010-07-18 Thread mmalc Crawford
On Jul 18, 2010, at 1:20 pm, Gordon Apple wrote: > I have a series of questions about using CoreData (iPad). Although CoreData > is supposedly easy to use, I have found it anything but. > Per Keary's reply, the documentation makes it abundantly clear that it's not a beginner's tool. It comes w

Re: managing split view iPad

2010-07-19 Thread mmalc Crawford
On Jul 19, 2010, at 12:19 am, Andrea Mattiuz wrote: > I can't manage the change of a navigation controller on the right side of a > split view application (iPad) after a tap on the left side. > The behavior of this app would be similar to the 'settings' app in the iPad > simulator. > any sugges

Re: Array controllers in code?

2010-07-22 Thread mmalc Crawford
On Jul 22, 2010, at 2:05 am, Amy Gibbs wrote: > Some things I want to do though need to be actually coded, but how do I > reference the Arrays/Array controllers in the code? Do I need to declare > them? They aren't at the moment that I can see, but somehow it's using them. > All the tutorials

Re: Tracking Multiple Touches For Appropriate Label

2009-12-07 Thread mmalc Crawford
On Dec 7, 2009, at 4:12 pm, Chunk 1978 wrote: > if ([[[event allTouches] anyObject] view] == self) > { > for (UITouch *touch in touches) > { > CGPoint touchPoint = [[touches anyObject] > locationInView:self]; >

Re: Tracking Multiple Touches For Appropriate Label

2009-12-08 Thread mmalc Crawford
On Dec 7, 2009, at 7:08 pm, Chunk 1978 wrote: > is this suppose to work for multiple touches where one touch is > already present, then another touches the screen? > Yes, it does; tested in a working application. > it's not working for me. each time i touch the screen and add an object to >

Re: Tracking Multiple Touches For Appropriate Label

2009-12-08 Thread mmalc Crawford
On Dec 8, 2009, at 12:38 am, mmalc Crawford wrote: >> is this suppose to work for multiple touches where one touch is >> already present, then another touches the screen? >> > Yes, it does; tested in a working application. > >> it's not working for me. each

Re: Tracking Multiple Touches For Appropriate Label

2009-12-08 Thread mmalc Crawford
On Dec 8, 2009, at 3:49 am, Chunk 1978 wrote: > i meant that i find it complicated compared to basic single touches or > gestures. > It's not clear what's complicated. You typically want to know when touches began, moved, and ended, and there are methods to inform you when each of these things

Re: Tracking Multiple Touches For Appropriate Label

2009-12-08 Thread mmalc Crawford
On Dec 8, 2009, at 8:59 am, Chunk 1978 wrote: > this is what i have so far, but i have no idea how to write the > touchesEnded method so that the appropriate label will clear. so if 3 > fingers are touching the screen and displaying their different > coordinates, if the 2nd finger that was press

Re: Tracking Multiple Touches For Appropriate Label

2009-12-08 Thread mmalc Crawford
On Dec 8, 2009, at 12:33 pm, mmalc Crawford wrote: Get the logic right... > - (void)setUpTouchHandling { > >touchToLabelMapping = CFDictionaryCreateMutable (kCFAllocatorDefault, 5, > &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); >availableLa

Re: Binding and Observers

2009-12-08 Thread mmalc Crawford
On Dec 8, 2009, at 2:17 am, Gerriet M. Denkmann wrote: > - (void)windowWillClose:(NSNotification *)notification > { > id f = [ ikView observationInfo ]; > NSString *oi = [ f description ]; > > BOOL ok; > NSString *obs = @"Observer:"; > NSString *kpa = @"Key pa

Re: Additional action when a view's value changes (Cocoa Bindings)

2009-12-09 Thread mmalc Crawford
On Dec 9, 2009, at 5:47 am, Christian Ziegler wrote: > Sorry I got to correct myself, it's not Cocoa Bindings, but direct > target/action. So I connected the takeIntegerValue action of both views to > each other in contrast to connecting it to a controller. > Don't do that. Both should invoke

Re: UIDatePicker in landscape - displaying items moving into position weirdness

2009-12-11 Thread mmalc Crawford
On Dec 11, 2009, at 1:06 pm, Alex Kac wrote: > if (timeSpanPicker) > { > //remove it > [timeSpanPicker removeFromSuperview]; > [timeSpanPicker release]; > > //now add it again > [self createRelativeTr

Re: Core Data Migration

2009-12-21 Thread mmalc Crawford
On Dec 20, 2009, at 11:40 pm, Chaitanya Pandit wrote: > One weird thing that is happening is that just after the > "configurePersistentStoreCoordinatorForURL..." call, the contents of my > document on the disk are changed, even if i didn't save the document > It's not clear in what sense this

Re: Autorotation for a subview

2009-12-22 Thread mmalc Crawford
On Dec 22, 2009, at 3:37 pm, Matt Neuburg wrote: >>> This sounds like a good time for the view to post an NSNotification. The >>> subview can then respond to it. m. >> >> Sounds like overkill --- swatting mosquitoes with sledgehammers. > > An NSNotification is not a sledgehammer. And letting in

Re: Autorotation for a subview

2009-12-22 Thread mmalc Crawford
On Dec 22, 2009, at 5:09 pm, Eric E. Dolecki wrote: > I already stated (I believe) that I needed to redo the way this application > is being constructed. In this way I'll have more direct access to subviews. I > originally created another view controller with it's own nib and I was indeed > lo

Re: Releasing Objects

2009-12-23 Thread mmalc Crawford
On Dec 22, 2009, at 9:40 pm, Michael Craig wrote: > At the point where the tutorial discusses garbage collection (end of ch. 5), > I decided to implement the deallocation of the Converter objects created by > ConverterController's convert: method. I want the deallocation to happen > inside conver

Re: Creating CoreData classes

2009-12-27 Thread mmalc Crawford
On Dec 27, 2009, at 9:07 pm, Jim Correia wrote: > On Dec 27, 2009, at 11:52 PM, Brian Bruinewoud wrote: >> If I've generated core data classes from my model, how do I use them to >> create new values? >> Currently I'm doing this: >> CDClass *cdObject = (CDClass *)[ NSEntityDescription >> inser

Re: Merging changes across NSManagedObjectContexts

2009-12-30 Thread mmalc Crawford
On Dec 30, 2009, at 12:54 pm, Rick Mann wrote: > In my app I have a situation where I have two (Core Data) documents open, and > I need to merge all the changes made in one doc1 to the changes in doc2. I've > been reading the section on Change Management in the Core Data Programming > Guide, b

Re: Merging changes across NSManagedObjectContexts

2009-12-30 Thread mmalc Crawford
On Dec 30, 2009, at 1:58 pm, Rick Mann wrote: > Is that operation discussed in the docs somewhere? > Yes. mmalc __

Re: Merging changes across NSManagedObjectContexts

2009-12-30 Thread mmalc Crawford
On Dec 30, 2009, at 2:24 pm, Rick Mann wrote: >> It's pretty much the same as any other operation on with a MOC. You cannot >> copy or move a managed object from one MOC to another in a simple fashion. >> Instead, you have got to create new, corresponding objects in the second >> MOC, and then

Re: Merging changes across NSManagedObjectContexts

2009-12-30 Thread mmalc Crawford
On Dec 30, 2009, at 2:08 pm, Mike Abdullah wrote: > It's pretty much the same as any other operation on with a MOC. You cannot > copy or move a managed object from one MOC to another in a simple fashion. > Instead, you have got to create new, corresponding objects in the second MOC, > and then

Re: NSDate without time portion

2010-01-05 Thread mmalc Crawford
On Jan 5, 2010, at 12:40 pm, Robert Claeson wrote: > (Greenwich, the "G" in GMT, is in North London) > Well, if we're being pedantic, South East of London, actually...

Re: NSDate without time portion

2010-01-05 Thread mmalc Crawford
On Jan 5, 2010, at 1:02 pm, Quincey Morris wrote: > The OP wanted to use NSDate objects to avoid the clunkiness of multiple > values/variables with NSDateComponents. I'm arguing that avoiding > NSDateComponents is a *lot* more work, and that using NSDate for this purpose > is *very* easy to ge

Re: NSDate without time portion

2010-01-05 Thread mmalc Crawford
On Jan 5, 2010, at 1:35 pm, Kyle Sluder wrote: > On Tue, Jan 5, 2010 at 1:23 PM, mmalc Crawford wrote: >> An NSDate object represent a single point in time -- you can think of it >> basically as a wrapper for an NSTimeInterval from the reference date. If >> you want to c

Re: programatically updating UI for NSArrayContoller/NSTableView combo

2010-01-08 Thread mmalc Crawford
On Jan 8, 2010, at 1:10 pm, Russell Gray wrote: > I am having trouble trying to get a tableView to update its contents, when > bound to an NSArrayController - but only when new objects are added. removal, > and updating of current objects works fine. >

Re: programatically updating UI for NSArrayContoller/NSTableView combo

2010-01-09 Thread mmalc Crawford
On Jan 9, 2010, at 1:50 pm, Russell Gray wrote: > On 10/01/2010, at 8:18 AM, Quincey Morris wrote: >> How about if you register your own KVO observer of the "subscriptions" >> property? Does it get notified when the property changes? Did you check the >> log for exception error messages? > So, I

Re: programatically updating UI for NSArrayContoller/NSTableView combo

2010-01-09 Thread mmalc Crawford
On Jan 9, 2010, at 2:15 pm, Russell Gray wrote: > [subscriptionsArray addObject:output]; > You haven't shown where you're modifying 'subscriptions' (apart from in the init method). Do you have two arrays that mirror each other, subscriptions and subscriptionsArray? Otherwise, if this is

Re: if statement causing 32 Byte leak?

2010-01-09 Thread mmalc Crawford
On Jan 9, 2010, at 6:34 pm, Graham Cox wrote: > 'string' does not contain 'new', 'alloc' or 'copy' therefore you do not own > it. > That summary is just very subtly wrong(*), which is why people are generally discouraged from paraphrasing the rules. That said, there is indeed really very littl

Re: programatically updating UI for NSArrayContoller/NSTableView combo

2010-01-10 Thread mmalc Crawford
On Jan 10, 2010, at 4:57 am, Quincey Morris wrote: > I'm not sure where to go next with this ... > I would strongly recommend dispensing with bindings for the moment: it's not an entry-level technology; it depends on an understanding of the fundamentals of Cocoa development including object gr

Re: How to know whether property in Cocoa class is KVO-compliant?

2010-01-10 Thread mmalc Crawford
On Jan 10, 2010, at 8:18 pm, Dave Fernandes wrote: > Look for "Cocoa Bindings Guide" in the docs. It would be nice if it were > cross-referenced in every class description. SelectedIndex should work for a > segmented control. Haven't tried it myself though. > No; the Cocoa Bindings Reference d

Re: "Bindings"; Was: whether property in Cocoa class is KVO-compliant?

2010-01-11 Thread mmalc Crawford
On Jan 11, 2010, at 9:01 am, Jerry Krinock wrote: > I wonder why bindings was not as an extension of KVO, instead of as a > separate sideshow. The effect is the same as KVO, > It's not at all. Bindings uses KVO to ensure that "things" are kept synchronised; KVO is a general mechanism that all

Re: Bindings Problem

2010-01-14 Thread mmalc Crawford
On Jan 14, 2010, at 3:11 pm, Carter R. Harrison wrote: > In the addValueToSet: method I have the following code: > - (IBAction)addValueToSet:(id)sender > See

Re: Adding to-many objects programmatically

2010-01-15 Thread mmalc Crawford
On Jan 15, 2010, at 8:52 pm, Jenny M wrote: > but I don't know about the code... > Modifying to-many relationships is described here: What did you t

Re: Adding to-many objects programmatically

2010-01-15 Thread mmalc Crawford
On Jan 15, 2010, at 10:00 pm, Jenny M wrote: > I guess my question is also, was there any easier way to do it?? Is that how > it's normally done? > It's not clear exactly what you're referring to. Do you mean, is the typical pattern that which you described earlier, namely: > I've been setting

Re: Adding to-many objects programmatically

2010-01-15 Thread mmalc Crawford
On Jan 15, 2010, at 10:57 pm, Jenny M wrote: > The objects do load, I ran the program regardless of warnings and it > did set the categories and references. So, how would I get it to build > without those warnings? > All of this is covered in the documentation:

Re: Adding to-many objects programmatically

2010-01-16 Thread mmalc Crawford
On Jan 16, 2010, at 12:17 am, Roland King wrote: > Cast to the actual type before calling the method. > Instead of [ managedObject method1 ] > do > [ (Employee*)managedObject method1 ] > No; the OP stated, "I don't use custom classes", so this won't work. Follow the pattern described in the docu

Re: NSDictionary trouble

2010-01-19 Thread mmalc Crawford
On Jan 19, 2010, at 5:50 pm, Jeff Laing wrote: >> Yes, and it autoreleases it too. :-o That means it'll conveniently be >> released later on, which is exactly what you're running into. If you >> want to keep a reference to the dictionary, you should call alloc and >> init yourself. > > No, you s

Re: NSDictionary trouble

2010-01-19 Thread mmalc Crawford
On Jan 19, 2010, at 8:47 pm, Jeff Laing wrote: > I wrote: >>> No, you should just *retain* the result of dictionaryWithCapacity. > > mmalc wrote: >> No, you shouldn't. > With all due respect, why not? > Because it's difficult to imagine a common situation in which your advice will be valid, f

Re: UIButton's Sender Control Events

2010-01-24 Thread mmalc Crawford
On Jan 24, 2010, at 10:27 am, Chunk 1978 wrote: > refactoring code so one method for the same button can handle a small > if/else statement could easily be considered more ideal than having > two separate methods. > No, it couldn't. If you have different actions that should happen in response t

Re: NSSlider

2010-01-28 Thread mmalc Crawford
On Jan 28, 2010, at 9:42 am, vincent habchi wrote: >> Check the "continuous" checkbox in IB (or set the object property of the >> same name) and your target will get called while the user drags, as soon as >> the position changes. > > Do not forget there are some pitfalls. For example, I bound

Re: Hot to define a connection from source code?

2010-01-29 Thread mmalc Crawford
On Jan 28, 2010, at 9:17 pm, Jonathan Chacón wrote: > Could you tell me any example project where I examine the source code? > If you want to do iPhone development, I suspect the most useful for you will be UICatalog:

Re: Hot to define a connection from source code?

2010-01-29 Thread mmalc Crawford
On Jan 29, 2010, at 10:32 am, B.J. Buchalter wrote: > On Jan 29, 2010, at 1:05 PM, mmalc Crawford wrote: >> If you want to do iPhone development, I suspect the most useful for you will >> be UICatalog: >> >> <http://developer.apple.com/iphone/library/s

Re: What classes have -init?

2010-02-11 Thread mmalc Crawford
On Feb 11, 2010, at 12:08 pm, Gordon Apple wrote: > My point was that if you could count on "init" being called internally and > all you needed was to initialize some ivars, you could override "init" and > not have to override the (sometimes more involved) designated initializer > and possibly ot

Re: Core Data: Insert, Fetch, Re-Fetch. Same Object?

2010-02-11 Thread mmalc Crawford
On Feb 10, 2010, at 7:07 pm, Jerry Krinock wrote: >> Yes, basically. There is only going to be one in-memory object at a time >> that represents the same managed object. > > It certainly seems to be sensible, but I just wish someone could find such > documentation. I can't. > Uniquing:

Re: Core Data: Custom to-many relationship setter not being invoked

2010-02-23 Thread mmalc Crawford
On Feb 22, 2010, at 2:59 pm, Ken Tabb wrote: > Distilling my problem down into the Department & Employees example, both are > custom NSManagedObject subclasses, each with an inverse to-many / to-one > relationship as you'd expect. My problem is that Department's custom > -awakeFromInsert gets

Re: Getting relative day-of-week name?

2010-02-24 Thread mmalc Crawford
On Feb 24, 2010, at 12:04 pm, Rick Mann wrote: > I'd like to take an NSDate and get a relative day-of-week name. For example, > if today is 2/24, and the NSDate is some time on 2/23, it would be > "Yesterday." If the NSDate were 2/22, it would be "Monday." > > Is there an existing format speci

Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety

2009-05-29 Thread mmalc Crawford
On May 29, 2009, at 2:46 PM, Kyle Sluder wrote: Can we please have some further clarification on this in the docs please? r.6933634 The documentation states explicitly: You can use this method to, for example, update a managed object context on the main thread with work completed in anoth

Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety

2009-05-29 Thread mmalc Crawford
On May 29, 2009, at 3:40 PM, Kyle Sluder wrote: And if it's determined to already be clear enough, please close the bug No, there is something there to be addressed -- thanks for the clarification. mmalc ___ Cocoa-dev mailing list (Cocoa-d

Re: Detecting when fetch: finishes

2009-06-03 Thread mmalc Crawford
On Jun 3, 2009, at 4:12 PM, Ulai Beekam wrote: I have an NSArrayController that, at the request of the user, can be given a new fetch predicate. To do that I use the setFetchPredicate: method. How can I detect when this predicate has been applied and the appropriate fetching is done? I hav

Re: Detecting when fetch: finishes

2009-06-04 Thread mmalc Crawford
On Jun 4, 2009, at 2:45 AM, Ulai Beekam wrote: How would you get around this problem? I would do what the Programming Guide suggests in the link I gave. (Execute the fetch manually.) mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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

2009-06-05 Thread mmalc Crawford
On Jun 5, 2009, at 10:18 AM, Beth Freeman wrote: I haven't been able to find any examples online that show how to do this. ?? The documentation for UITabBarController links to two samples.

Re: Core Data "Uniqueing" not happening as expected

2009-06-21 Thread mmalc Crawford
On Jun 21, 2009, at 1:23 PM, Jerry Krinock wrote: "x-coredata://101E2F60-412A-41EE-9DEF-59797757C29C/Browfile_entity/p1[perm] ", "x-coredata://101E2F60-412A-41EE-9DEF-59797757C29C/Browfile_entity/p2[perm] " ) 2009-06-21 13:04:00.995 TestApp[77117:10b] 47115: pointers to fetched object

Re: Core Data capabilities questions

2009-06-21 Thread mmalc Crawford
On Jun 21, 2009, at 2:04 PM, Kyle Sluder wrote: Is it possible (or does Core Data automatically do this) for attributes that aren't accessed to not actually load? For example, my entities have a "description" attributes that is rarely accessed. Will Core Data defer loading the data for tha

Re: Core Data capabilities questions

2009-06-21 Thread mmalc Crawford
On Jun 21, 2009, at 5:56 PM, Rick Mann wrote: Is there also a way to tell Core Data to release objects it has currently allocated? "A managed object's lifetime is by default determined by the run loop— autoreleased managed objects will be deallocated when the run loop's autorelease pool

Re: Amount of Arguments per Method

2009-06-23 Thread mmalc Crawford
On Jun 22, 2009, at 10:59 PM, WT wrote: Devpubs listens, and our delivery team (the folks that take the XML and output it to the various formats) ROCK. I am now leaning more and more towards filing a documentation enhancement request. This is simply baffling. If you want something to be

Re: Amount of Arguments per Method

2009-06-23 Thread mmalc Crawford
On Jun 23, 2009, at 4:05 AM, WT wrote: Why is it so baffling? The question is not wanting something to be changed, but wanting *bad enough* to have something changed. Because, as has been stated so often, posting messages to a list will not cause any change. If you complain about something

Re: Amount of Arguments per Method

2009-06-25 Thread mmalc Crawford
On Jun 23, 2009, at 9:14 AM, WT wrote: On Jun 23, 2009, at 4:57 PM, mmalc Crawford wrote: On Jun 23, 2009, at 4:05 AM, WT wrote: Let's start with bug reporting, which is of general relevance to developers here: Whether or not it's an actual *error* is immaterial -- it'

Re: Debugging NSService

2009-06-25 Thread mmalc Crawford
On Jun 23, 2009, at 7:34 AM, Laurent Cerveau wrote: I want to add a service to my application. So I created the service entry in the plist, implemented the methods with proper signature, register the service at Application Did Finish launching time but unfortunately I never see my service

Re: NSArrayController "Auto Rearrange Content" causes "Cannot remove an observer for key path" error

2009-06-26 Thread mmalc Crawford
On Jun 26, 2009, at 3:43 AM, Tristan Celder wrote: I've also filed a bug report 7010086 with example code attached. I have no idea if it actually submitted however (I tried twice) as it isn't appearing in 'my originated problems' and I am unable to search for it... hopefully we'll get a fi

Re: Design for custom tableviewcell button action

2009-06-26 Thread mmalc Crawford
On Jun 24, 2009, at 11:30 PM, Bryan Hansen wrote: I'd like to add a custom button to my own custom tableview subclass that will perform an action on the tableviewcontroller class. This is pretty much identical to the way accessoryviews call a method on the tableviewdelegate when it is tappe

Re: Design for custom tableviewcell button action

2009-06-26 Thread mmalc Crawford
On Jun 26, 2009, at 7:20 PM, Brian Slick wrote: Please pardon my noobness, but could you expand a little on how this works? I'm assuming that the first line somehow assigns the <#cell outlet property#>, since I don't see how else this could work, but I sure don't see how that actually hap

Re: UITableViewCells

2009-06-28 Thread mmalc Crawford
On Jun 28, 2009, at 3:41 PM, WT wrote: -section and -row are defined in an extension to NSIndexPath. See here: This is not correct -- they're defined in a *category* of NSIndexPath -- see /$Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/ System/Library/Frameworks/UIK

Re: UITableViewCells

2009-06-28 Thread mmalc Crawford
On Jun 28, 2009, at 3:41 PM, WT wrote: -section and -row are defined in an extension to NSIndexPath. See here: This is not correct -- they're defined in a *category* of NSIndexPath -- see /$Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/ System/Library/Frameworks/UIK

Re: Problem with Service and PasteBoards

2009-06-28 Thread mmalc Crawford
On Jun 27, 2009, at 10:13 AM, Guillem Palou wrote: It's not clear what you're trying to achieve. Are you invoking the service from the same application that provides it? NSReturnTypes dictionaryPBoardType

Re: GC pros and cons

2009-06-28 Thread mmalc Crawford
On Jun 28, 2009, at 4:40 PM, Michael Ash wrote: Doesn't take any experience, just a bit of reading. I'd recommend that all participants in this thread read the Garbage Collection Programming Guide top to bottom before continuing any further This article:

Re: UITableViewCells

2009-06-28 Thread mmalc Crawford
On Jun 28, 2009, at 3:00 PM, William Squires wrote: A few suggestions: // Configure the cell. HighScoreSamplerAppDelegate *appDelegate = (HighScoreSamplerAppDelegate *)[[UIApplication sharedApplication] delegate]; This particular situation may be a debatable case, but to make a point

Re: Force NSTextField to update (and transform)

2009-06-28 Thread mmalc Crawford
On Jun 26, 2009, at 5:37 AM, Michał Glenc wrote: I'm a beginner in Cocoa world and I have some problems with bindings, NSValueTransformer etc. Cocoa bindings is not a beginner technology. You are encouraged to gain some experience with Cocoa before using bindings. My application perform

Re: nib-object retaining question

2009-06-29 Thread mmalc Crawford
On Jun 29, 2009, at 3:58 PM, WT wrote: I have three questions: The answers are all contained in the documentation. You should take some time to read "Nib Files" in "Resource Programming Guide" and "Memory Management Programming Guide for Cocoa". mmalc ___

Re: Load File Faster.

2009-06-29 Thread mmalc Crawford
On Jun 29, 2009, at 8:55 PM, Dave Keck wrote: Don't abuse property lists; if you need a database, use a database. Indeed. And if you can/aren't already, use a binary plist. And load the data in a background thread, to keep the UI snappy. Without any additional information, I would suggest i

Re: multitouch trackpad on macbook pro

2009-06-30 Thread mmalc Crawford
On Jun 30, 2009, at 3:33 AM, Memo Akten wrote: i was wondering if it is at all possible to receive the multi-touch data on the trackpads of the recent macbook pros? Now that the WWDC videos are available, it may be worth watching

Re: localisation of contents in main menu

2009-06-30 Thread mmalc Crawford
On Jun 30, 2009, at 6:12 AM, Rajendran P wrote: I have an application, which uses default menu Items like "Find , cut , copy etc" . when i create a Japanese nib by using "Add Localisation" from Xcode , only "undo and Redo " are geting localized.All other menu items are still in Eng

Re: NSDateFormatter Breaks on non-English OS

2009-06-30 Thread mmalc Crawford
On Jun 30, 2009, at 3:29 PM, Trygve Inda wrote: NSString* myDateFormat = @"%a %b %e %H:%M:%S %Z %Y"; NSDate*myDate = nil; // myDateString is "Tue Jun 30 15:53:24 UTC 2009" myFormatter = [[NSDateFormatter alloc] initWithDateFormat:imageDateFormat allowNaturalLanguage:NO]; myDate

Re: Design for custom tableviewcell button action

2009-06-30 Thread mmalc Crawford
On Jun 30, 2009, at 4:36 PM, Brian Slick wrote: Does the first line mean that I cannot reuse the XIB-based cells in different view controllers? No. As long as the view controllers all provide the same API (the actions and outlets) you use in the nib file, then the actual class doesn't r

Re: NSDateFormatter Breaks on non-English OS

2009-06-30 Thread mmalc Crawford
On Jun 30, 2009, at 5:08 PM, Trygve Inda wrote: [theFormat setDateFormat:@"EEE MMM dd HH:mm:ss zzz "]; I'm not sure if "UTC" is recognised; try: [myFormatter setDateFormat:@"EEE MMM dd HH:mm:ss 'UTC' "]; mmalc ___ Cocoa-dev ma

Re: NSDateFormatter Breaks on non-English OS

2009-07-01 Thread mmalc Crawford
On Jun 30, 2009, at 3:29 PM, Trygve Inda wrote: NSString* myDateFormat = @"%a %b %e %H:%M:%S %Z %Y"; NSDate*myDate = nil; // myDateString is "Tue Jun 30 15:53:24 UTC 2009" myFormatter = [[NSDateFormatter alloc] initWithDateFormat:imageDateFormat allowNaturalLanguage:NO]; myDate

Re: User interface validation doesn't work, right?

2009-07-01 Thread mmalc Crawford
On Jul 1, 2009, at 6:15 PM, Keary Suska wrote: No, I am saying that it works as advertised for objects that it works for. NSButton is not one of them, and never has been. You seem to assume that all user interface items should, but they don't, and never have, and the documentation has neve

Re: Design for custom tableviewcell button action

2009-07-03 Thread mmalc Crawford
On Jul 3, 2009, at 11:54 AM, Brian Slick wrote: So, if TaggedLocations was flying while mine was sucking, I'd probably concede that what I was doing was wrong (and would probably need more custom cells). But since neither one is performing very well, and I can't find any significant diffe

  1   2   3   4   >