I have a Class Math which extends NSManagedObject and has some dynamic propertiesa. name (String) b. date (Date) I using xcdatamodel for modeling my tables. I am using String and Date respectively from xcdatamodel. I am creating a new match object using insertNewObjectForEntityForName. The object match isn't null but I have issues saving it to the DB (SQLite). If I make the fields, name or date (non-optional) in xcdatamodel the program crashes trying to save. It gives a error 1570, NSValidationMissingMandatoryPropertyError. I am assign the date using match.date = [NSDate date]; I aslo tried [match setDate:[NSDate date]]; When I made fields optional the program is not crashing but it is not saving all the data. I am struggling with this issue for the last two weeks. Any help would be greatly appreciated. Thanks,Harry --- On Sun, 10/18/09, cocoa-dev-requ...@lists.apple.com <cocoa-dev-requ...@lists.apple.com> wrote:
From: cocoa-dev-requ...@lists.apple.com <cocoa-dev-requ...@lists.apple.com> Subject: Cocoa-dev Digest, Vol 6, Issue 1507 To: cocoa-dev@lists.apple.com Date: Sunday, October 18, 2009, 10:48 AM Send Cocoa-dev mailing list submissions to cocoa-dev@lists.apple.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.apple.com/mailman/listinfo/cocoa-dev or, via email, send a message with subject or body 'help' to cocoa-dev-requ...@lists.apple.com You can reach the person managing the list at cocoa-dev-ow...@lists.apple.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Cocoa-dev digest..." Today's Topics: 1. Re: Manipluate Cocoa Touch keyboard mode (Yandy Ramirez) 2. Re: Programming Style: Method Definition with or without a semicolon. (Yandy Ramirez) 3. Re: Why does my font come out looking fuzzy? (Clark S. Cox III) 4. Re: correctly Controlling Garbage Collection (Quincey Morris) 5. NSRulerMarker and dragging (Arved von Brasch) 6. Modal sheet / dialog + thread == main app thread hangs ? (Marc Wandschneider) 7. Re: How to retrieve the font information from TrueType font file? (Jens Alfke) 8. Re: Why does my font come out looking fuzzy? (Jens Alfke) 9. Re: GC and atomic getters/setters (Michael Ash) 10. Re: Modal sheet / dialog + thread == main app thread hangs ? (Marc Wandschneider) 11. Re: NSInvocationOperations and background Threads (John Love) 12. Re: Why does my font come out looking fuzzy? (Ben Haller) 13. Re: Why does my font come out looking fuzzy? (Graham Cox) 14. Re: Calculating a total from a collection of numeric attributes (I. Savant) ---------------------------------------------------------------------- Message: 1 Date: Sat, 17 Oct 2009 21:51:28 -0400 From: Yandy Ramirez <yan...@gmail.com> Subject: Re: Manipluate Cocoa Touch keyboard mode To: Tron Thomas <tron.tho...@verizon.net> Cc: cocoa-dev@lists.apple.com Message-ID: <f0500bb9-1ccc-4c1b-ac9a-f2387e986...@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes numbers and punctuation in IB textfield properties for keyboard type ------ yandy On Oct 17, 2009, at 8:53 PM, Tron Thomas wrote: > When an UITextField becomes active in a Cocoa Touch application, the > device automatically displays a keyboard for character input. The > keyboard always appears in alphabet mode so letters can be typed. > > I have an application containing a singular UITextField that is > intended for entering numeric data. I would like the keyboard to > come up in numeric mode and stay in that mode unless the user click > the button to toggle to letter mode, even if they press the return > key. > > How can someone accomplish this keyboard behavior? > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/yandy%40me.com > > This email sent to ya...@me.com ------------------------------ Message: 2 Date: Sat, 17 Oct 2009 22:21:01 -0400 From: Yandy Ramirez <yan...@gmail.com> Subject: Re: Programming Style: Method Definition with or without a semicolon. To: Rob Keniger <r...@menumachine.com> Cc: Cocoa Developers <cocoa-dev@lists.apple.com> Message-ID: <8a828c95-b2fa-4651-951c-d140af9d6...@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Thanks a million for this, awesome! ------ yandy On Oct 17, 2009, at 10:01 PM, Rob Keniger wrote: > > On 17/10/2009, at 10:25 PM, Graham Cox wrote: > >> If there is a way to disable these insertions independently and >> I've missed it, please someone, let me know how to do it. > > > I can't recommend the ODCompletionDictionary plug-in for Xcode > highly enough: > > http://www.obdev.at/products/completion-dictionary/index.html > > It allows you to create fully customizable macros and falls back to > Xcode's auto-completion if a match can't be found. > > -- > Rob Keniger > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/yandyr%40gmail.com > > This email sent to yan...@gmail.com ------------------------------ Message: 3 Date: Sat, 17 Oct 2009 20:43:52 -0700 From: "Clark S. Cox III" <clarkc...@gmail.com> Subject: Re: Why does my font come out looking fuzzy? To: Kyle Sluder <kyle.slu...@gmail.com> Cc: Cocoa List <cocoa-dev@lists.apple.com> Message-ID: <341b6e1e-aa3a-4950-bd3b-b0edf64cc...@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes There's also the possibility that the text isn't being drawn properly aligned to the pixel grid. Sent from my iPhone On Oct 17, 2009, at 19:52, Kyle Sluder <kyle.slu...@gmail.com> wrote: > You need to post a screenshot of what you're seeing. > > I can think of two possibilities off the top of my head: > 1) You're rendering text into a CALayer (especially a CATextLayer). > Without some tweaking, CALayer can't do subpixel antialiasing (aka LCD > antialiasing), because it doesn't have the existing backing store to > composite against. > 2) You're overdrawing the text and are therefore ruining the > antialiasing, producing a distorted image. > > Again, screenshot is pretty much mandatory here. > > --Kyle Sluder > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/clarkcox3%40gmail.com > > This email sent to clarkc...@gmail.com ------------------------------ Message: 4 Date: Sat, 17 Oct 2009 20:55:07 -0700 From: Quincey Morris <quinceymor...@earthlink.net> Subject: Re: correctly Controlling Garbage Collection To: cocoa-dev <cocoa-dev@lists.apple.com> Message-ID: <09698c47-00dc-48ec-bc57-b7a38755e...@earthlink.net> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes On Oct 17, 2009, at 18:48, Rob Keniger wrote: > What happens if you explicitly disable Garbage Collection when the > user starts drawing and enable it when the user finishes? That might be a practical answer, but I think maybe a key point got skipped over earlier in the thread. If the collector causes a *noticeable* pause in the mouse tracking, then presumably it has a fair amount of work to do. (Lots of unreferenced blocks to reclaim, for example, or lots of memory to scan). Unless someone wants to claim that the creation and freeing of NSEvent objects (and such like) by the framework produces such a volume of work for the collector (which I doubt, though have to evidence for), the possible implication is that the application code for handling the events is generating lots of objects with short lifetimes. In that case, the correct solution is to rearchitect the event handling to avoid creating so many objects. Of course, other possibilities include: (a) a bug in the frameworks, and (b) an unfortunate edge scenario where neither frameworks nor application is doing anything wrong, but the collector happens to perform poorly. Whatever the cause, surely the *only* reasonable way to proceed is to instrument the performance (both where the CPU time goes and what's doing allocations)? That was also suggested earlier in the thread, IIRC. ------------------------------ Message: 5 Date: Sun, 18 Oct 2009 15:45:07 +1100 From: Arved von Brasch <co...@atgo.org> Subject: NSRulerMarker and dragging To: cocoa-dev@lists.apple.com Message-ID: <f4b78d86-1fcf-49d0-b8bd-0d563d3f2...@atgo.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Hello Cocoa List, My Googling reveals this question has been asked before, but no answer was given. Hopefully someone knows how to do this now. I have a vertical NSRulerView attached to an NSTextView. I have movable NSRulerMarkers and that's all working good. My only problem is that the NSRulerMarkers insist on displaying a tooltip with the current measurement values when the marker is being dragged. This is not appropriate in my application. Ideally, I would like to suppress these tooltips. I have tried intercepting various things in my NSRulerView subclass. These typically didn't work because the ruler view doesn't seem to be responsible for the generation of the tooltips. NSRulerMarker doesn't seem to have functionality to do this, and doesn't inherit from NSView either. Another way to manage this might be to provide a dynamic measurement unit. My markers are essentially pointers into the text, and really are indicating specific line numbers, like break points. Dynamic measurements would be necessary because the font of the TextView can be set by the user, and where the marker is pointing will then depend on the font size. There doesn't seem to be a way to do this either. Is there something I'm missing? Surely this is something someone has attempted before? Thanks in advance, Arved ------------------------------ Message: 6 Date: Sun, 18 Oct 2009 12:51:45 +0800 From: Marc Wandschneider <marc...@chipmunkninja.com> Subject: Modal sheet / dialog + thread == main app thread hangs ? To: cocoa-dev@lists.apple.com Message-ID: <e24a14a10910172151x4b1eea1ewdb9ded434ce18...@mail.gmail.com> Content-Type: text/plain; charset=windows-1252 I'm in the midst of debugging an extremely unusual problem, and I was wondering if anybody might have any insight into what might be going wrong: In a controller class from a NIB, I take an NSPanel I from that same NIB, and then show it app modally on an NSWindow (that was created by hand in code): [[NSApplication sharedApplication] beginSheet: myPanel modalForWindow: window modalDelegate: self didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [[NSApplication sharedApplication] runModalForWindow: myPanel]; now, when the "finish button is clicked", i run some code to disable some buttons an fire off a thread to make sure the user input is valid (i have to validate with a remote service). This thread is fired from a separate validator object I create: * setEnabled NO on a few controls * setHidden NO on a control // validator object validateInfo: (NSDictionary *)parms notify: (SEL)notifySelector onObject: (id)notifyObject { // build up data with parms and notify info [[NSThread detachNewThreadSelector: @selector(remotevalidate:) toTarget: self withObject: data]; } next, when the validation is finished, the validator notifies my controller object: [notifyObject performSelectorOnMainThread: notifySelector withObject: results waitUntilDone: NO]; and then my controller object, in the method that the validator object calls, kills the dialog: - (void)validationComplete: (id)data { [[NSApplication sharedApplication] stopModal]; [createTwitterPanel orderOut: nil]; [[NSApplication sharedApplication] endSheet: createTwitterPanel returnCode: NSOKButton]; } My problem: the top runModalForWindow does not exit until some system event is sent to the window that was showing the dialog. trying to move, resize, or do anything to the window, or otherwise switching away from the application suddenly causes method to exit and execution to continue. no amount of waiting seems to help, otherwise, however. An even further, more interesting clue is that the dialog has two controls, a WebView and a TextField. Even if I restart things by clicking on the window, TABbing between the two controls remains screwed up — it simply never works again. I've tried changing validationComplete: to instead post a notification to the main thread, and I've also played with the waitUntilDone on the performSelectorOnMainThread method, all to no effect. Any ideas? Things I should try looking at? Thanks, marc. ------------------------------ Message: 7 Date: Sat, 17 Oct 2009 22:29:11 -0700 From: Jens Alfke <j...@mooseyard.com> Subject: Re: How to retrieve the font information from TrueType font file? To: Mike Wright <m...@raccoonbend.com> Cc: cocoa-dev@lists.apple.com Message-ID: <106def53-ee93-4e5f-8c19-0455dba6e...@mooseyard.com> Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes On Oct 17, 2009, at 8:09 AM, Mike Wright wrote: > FYI, I haven't found any of the "Font Suitcase" files that have a > data fork. The font is in the 'FOND' resource -- and all of those > fonts work fine under Snow Leopard. Some of this legacy stuff is > probably pretty hard to eliminate without nasty repercussions. .dfont files, I believe, are suitcases in the form of data-fork-based resource files. Fonts themselves were never stored in FOND resources. The FOND is/was just an index pointing to the individual FONT or sfnt resources for the font family. And in the case of Type 1 fonts, it pointed to the filename of the 'LWFN' file with the PostScript data. (BTW, I spent 1988-90 developing a PostScript and TrueType font editor for a small foundry that went out of business.) —Jens ------------------------------ Message: 8 Date: Sat, 17 Oct 2009 22:32:22 -0700 From: Jens Alfke <j...@mooseyard.com> Subject: Re: Why does my font come out looking fuzzy? To: Ben Haller <bhcocoa...@sticksoftware.com> Cc: Cocoa List <cocoa-dev@lists.apple.com> Message-ID: <08322062-6a04-4ac4-bc10-a21b330c0...@mooseyard.com> Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes On Oct 17, 2009, at 7:46 PM, Ben Haller wrote: > Copied the TrueType font from Instruments into my project, added the > necessary key to my Info.plist, set the font using [NSFont > fontWithName:...], and hey presto, there the font is in my app. > Only... it doesn't look as nice. It's less crisp. Kind of fuzzy. > The corners don't look sharp. Is the point size the same? If this is a special-purpose font, it might have some hinting for the specific point size used in Instruments. You might need to compare the character heights up-close with Pixie or something. —Jens ------------------------------ Message: 9 Date: Sun, 18 Oct 2009 02:05:27 -0400 From: Michael Ash <michael....@gmail.com> Subject: Re: GC and atomic getters/setters To: cocoa-dev <cocoa-dev@lists.apple.com> Message-ID: <da8fe1600910172305h7fbc9cdy650cfb9196c06...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 On Sat, Oct 17, 2009 at 9:32 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Sat, Oct 17, 2009 at 6:20 PM, Ken Ferry <kenfe...@gmail.com> wrote: >> The issue concerns the order of in which changes to memory are observable by >> other processors. > > Okay, and the read example is immune because you have to read the > address before you can read the thing at that address, and it's > therefore impossible to wind up in a bad situation due to read > reordering, simply because the reads have to be structured in a > particular way. > > I'm struggling to picture being able to write code that is sensitive > to write reordering under GC that is not either sensitive to write > reordering on non-GC with equivalent locking and is also not sensitive > to other concurrency problems. > > Of course, I attribute this more to my lack of imagination or > experience at the lower levels than to the lack of a good example. With correctly done locking, your code will never see read or write reordering, so it's no surprise that you can't picture such a scenario. "Correctly done locking" means that all shared data is protected by a lock, both when reading and writing. The reason this always saves you is simply because locks incorporate memory barriers, and thus force the correct ordering. Your code can still experience reordering while it's within a critical section, but no other CPU can be accessing that shared data at the same time, so it has no ill effect. Your code can still experience reordering outside of a critical section, but no other CPU can be accessing that data at all, because it's not shared. The CPU can't order reads/writes into or out of critical sections, because of the memory barriers in the locks. There's nothing GC-specific here, except for the fact that GC lets you write lockless accessor methods where in a non-GC land you *must* involve a lock on both ends. (Or write some extraordinarily complicated lockless code, which is really beyond the scope of this thread.) I was worried because Apple's guide says that GC doesn't require locks for this, because the locks are there to solve memory management. They're there for more than that, but it looks like the lockless GC approach takes care of the rest too. In short: you only have to start worrying about weird stuff like read/write reordering and memory barriers when you start trying to manipulate shared data without using locks. Mike ------------------------------ Message: 10 Date: Sun, 18 Oct 2009 14:06:10 +0800 From: Marc Wandschneider <marc...@chipmunkninja.com> Subject: Re: Modal sheet / dialog + thread == main app thread hangs ? To: cocoa-dev@lists.apple.com Message-ID: <e24a14a10910172306t14f47e52p8b931696fea3c...@mail.gmail.com> Content-Type: text/plain; charset=windows-1252 >From the NSApplicationDocumentation: "abortModal must be used instead of stopModal or stopModalWithCode: when you need to stop a modal event loop from anywhere other than a callout from that event loop. In other words, if you want to stop the loop in response to a user’s actions within the modal window, use stopModal; otherwise, use abortModal. For example, use abortModal when running in a different thread from the Application Kit’s main thread or when responding to an NSTimer that you have added to the NSModalPanelRunLoopMode mode of the default NSRunLoop." So, I learned something today. Nice. thanks, marc. 2009/10/18 Marc Wandschneider <marc...@chipmunkninja.com>: > I'm in the midst of debugging an extremely unusual problem, and I was > wondering if anybody might have any insight into what might be going > wrong: > In a controller class from a NIB, I take an NSPanel I from that same > NIB, and then show it app modally on an NSWindow (that was created by > hand in code): > > [[NSApplication sharedApplication] beginSheet: myPanel > modalForWindow: window > modalDelegate: self > didEndSelector: > @selector(sheetDidEnd:returnCode:contextInfo:) > contextInfo: nil]; > [[NSApplication sharedApplication] runModalForWindow: myPanel]; > > > now, when the "finish button is clicked", i run some code to disable > some buttons an fire off a thread to make sure the user input is valid > (i have to validate with a remote service). This thread is fired from > a separate validator object I create: > > * setEnabled NO on a few controls > * setHidden NO on a control > > // validator object > validateInfo: (NSDictionary *)parms notify: (SEL)notifySelector > onObject: (id)notifyObject > { > // build up data with parms and notify info > [[NSThread detachNewThreadSelector: @selector(remotevalidate:) > toTarget: self withObject: data]; > } > > > next, when the validation is finished, the validator notifies my > controller object: > > [notifyObject performSelectorOnMainThread: notifySelector > withObject: results waitUntilDone: NO]; > > > > and then my controller object, in the method that the validator object > calls, kills the dialog: > > - (void)validationComplete: (id)data > { > [[NSApplication sharedApplication] stopModal]; > [createTwitterPanel orderOut: nil]; > [[NSApplication sharedApplication] endSheet: createTwitterPanel > returnCode: NSOKButton]; > } > > > My problem: the top runModalForWindow does not exit until some system > event is sent to the window that was showing the dialog. trying to > move, resize, or do anything to the window, or otherwise switching > away from the application suddenly causes method to exit and execution > to continue. no amount of waiting seems to help, otherwise, however. > > An even further, more interesting clue is that the dialog has two > controls, a WebView and a TextField. Even if I restart things by > clicking on the window, TABbing between the two controls remains > screwed up — it simply never works again. > > I've tried changing validationComplete: to instead post a notification > to the main thread, and I've also played with the waitUntilDone on the > performSelectorOnMainThread method, all to no effect. > > Any ideas? Things I should try looking at? > > Thanks, > marc. > ------------------------------ Message: 11 Date: Sun, 18 Oct 2009 08:26:24 -0400 From: John Love <jote...@charter.net> Subject: Re: NSInvocationOperations and background Threads To: Ken Thomases <k...@codeweavers.com> Cc: Cocoa <cocoa-dev@lists.apple.com> Message-ID: <66e2a687-649d-49f0-8845-326a54104...@charter.net> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Ken .. Thanks for your prompt reply, I really appreciate it. I have revamped my code to have just one NSInvocationOperation whose selector contains the long for-loop. A snippet looks like: itsOps = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(doAllOperations) /* data passed to selector */ object:nil]; [itsQueue addOperation:itsOps]; // itsQueue previously set = [[NSOperationQueue alloc] init] and the long for-loop is within -doAllOperations. It's my understanding from the docs and other Cocoa mailing list readers that when -addOperation: is called, a new background Thread is started up. If that is true, then my long for-loop should be executing in the background Thread. If I'm still on-track, then I have a problem in that I temporarily placed a NSLog() call within my -doCalculation, but nothing gets printed in my log. So, for the moment I am lost. By the way, delving into NSOperations is for the moment just an attempt to learn more since I have successfully called - detachNewThreadSelector, as well as delved into NSMachPorts and NSPortMessages with success. So, I'm just trying to learn a little bit more here. Again, thanks. John ======= On Oct 17, 09, at 10:20 PM, Ken Thomases wrote: > On Oct 16, 2009, at 8:01 AM, John Love wrote: > >> In my app, I have a very long for-loop > >> It appears however, that in my app there is no background Thread >> that begins and the reason for that is because my app's window >> stays in the background until all NSOperations are complete. Any >> clues? > > I suspect your app's window isn't staying in the background until > all NSOperations are complete, but rather that it's staying in the > background until your long for-loop completes. > > You can't run a long for-loop on the main thread and expect event > handling to proceed. (Well, you can, but only if your for-loop is > handling events manually, itself.) > > It sounds like you're fundamentally misunderstanding how things like > the main run loop, event processing, operation queues, your for- > loop, etc. interact. > > Regards, > Ken > ------------------------------ Message: 12 Date: Sun, 18 Oct 2009 09:40:46 -0400 From: Ben Haller <bhcocoa...@sticksoftware.com> Subject: Re: Why does my font come out looking fuzzy? To: Cocoa List <cocoa-dev@lists.apple.com> Message-ID: <a2dd789e-bcf7-4280-a96c-9abe576f3...@sticksoftware.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Oct 17, 2009, at 7:46 PM, Ben Haller wrote: > >> Copied the TrueType font from Instruments into my project, added >> the necessary key to my Info.plist, set the font using [NSFont >> fontWithName:...], and hey presto, there the font is in my app. >> Only... it doesn't look as nice. It's less crisp. Kind of fuzzy. >> The corners don't look sharp. OK, this is all replying to various helpful folks who replied to that: On 17-Oct-09, at 10:52 PM, Kyle Sluder wrote: > You need to post a screenshot of what you're seeing. OK: http://www.sticksoftware.com/textrendering/ The point size in Instruments is probably 18, but I tried 19 just in case and it doesn't look right either. > I can think of two possibilities off the top of my head: > 1) You're rendering text into a CALayer (especially a CATextLayer). > Without some tweaking, CALayer can't do subpixel antialiasing (aka LCD > antialiasing), because it doesn't have the existing backing store to > composite against. > 2) You're overdrawing the text and are therefore ruining the > antialiasing, producing a distorted image. I'm using an NSTextField to do the text drawing. It certainly renders text antialiased. In any case, the renderings do look antialiased; the edges are not sharply on pixel boundaries (see the top of the 5, for example). It just isn't the same appearance as in Instruments. On 17-Oct-09, at 11:43 PM, Clark S. Cox III wrote: > There's also the possibility that the text isn't being drawn > properly aligned to the pixel grid. I tried making the NSTextField have a frame offset by 0.5 pixels, just in case, but that made no visible difference to the rendering. I suspect NSTextField corrects for such misalignment. So unless the font is actually *designed* to be drawn misaligned to the grid, I think I'm OK in this department. On 18-Oct-09, at 1:32 AM, Jens Alfke wrote: > Is the point size the same? If this is a special-purpose font, it > might have some hinting for the specific point size used in > Instruments. You might need to compare the character heights up- > close with Pixie or something. I counted pixels in Pixie, and it looks to me like Instruments is 18-point. It's a bit hard to tell with the antialiasing going on, but they are somewhere from the 18-point rendering to the 19-point rendering I posted (see link above). Now I'm wondering whether Instruments is actually even using this font. I think it might be a red herring. Note that the time view in instruments appears to be monospaced, whereas the snapshots of my rendering using the font show that it is not a monospaced font. And note that their colons are centered vertically, while mine using the font are oddly low in their position. The font may be a leftover from a previous implementation, perhaps. However, a troll through the images in Instruments does not reveal any digit images. Although it is an interesting exercise anyway; many of their button images and such are PDFs, which is intriguing. Anyhow, I think it's probably time to abandon this quest, unless someone has a good idea of how to proceed. Spiffy LCD-style display on my generation counter will just have to wait. Ben Haller Stick Software ------------------------------ Message: 13 Date: Mon, 19 Oct 2009 00:54:20 +1100 From: Graham Cox <graham....@bigpond.com> Subject: Re: Why does my font come out looking fuzzy? To: Ben Haller <bhcocoa...@sticksoftware.com> Cc: Cocoa List <cocoa-dev@lists.apple.com> Message-ID: <a149ea68-6c3d-41e4-91c8-f767d02b6...@bigpond.com> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes On 19/10/2009, at 12:40 AM, Ben Haller wrote: > The font may be a leftover from a previous implementation, perhaps. > However, a troll through the images in Instruments does not reveal > any digit images. Although it is an interesting exercise anyway; > many of their button images and such are PDFs, which is intriguing. It might be using the font as an initial source of the glyph paths, then rendering them directly. You could try the same thing, check out NSBezierPath's - (void)appendBezierPathWithGlyph:inFont: --Graham ------------------------------ Message: 14 Date: Sun, 18 Oct 2009 10:45:27 -0400 From: "I. Savant" <idiotsavant2...@gmail.com> Subject: Re: Calculating a total from a collection of numeric attributes To: Ian Piper <ianpi...@mac.com> Cc: Cocoa Developers <cocoa-dev@lists.apple.com> Message-ID: <2a1163ca-b2ce-46ec-9118-58b9fc48b...@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes On Oct 17, 2009, at 7:40 PM, Ian Piper wrote: > I have a Core Data entity that has an attribute called charge > (stored as a float). So I am storing a number of records each of > which has a charge. I simply want to be able to show a running total > of charges as I add or remove items. I was hoping that I might be > able to use a simple binding for this: I created a label and thought > I might be able to bind its value to array > controller.arrangedObjects.charge.sum or something like that. No > luck though. > > I cannot see anything in the documentation or from searches. Can > anyone point me towards either examples or documentation? You want set and array operators: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/ArrayOperators.html You really should read the KVC, KVO, Bindings, and Core Data guides front to back since there are terms you wouldn't otherwise know to search for. It's best to know you read about something but forget the specifics then to not read it at all and have no idea. :-) -- I.S. ------------------------------ _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins (at) lists.apple.com http://lists.apple.com/mailman/listinfo/cocoa-dev End of Cocoa-dev Digest, Vol 6, Issue 1507 ****************************************** _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com