Re: Localization strategies?

2009-12-21 Thread Symadept
Hi Ricky, Even in my one of the project I am doing the same. Localizable.strings (english) version shall have all the strings in Key-Value pair format, "Hello" = "Hello"; And you can keep the comment on top of the string /* Welcome text */. And you can have many IBOutlets to set the string at run

Re: IKImageBrowserView managing the number of columns manually

2009-12-21 Thread Thomas Goossens
Hi Nicolas, On Dec 20, 2009, at 12:21 PM, Nicolas Berloquin wrote: > Hi ! > > I'm using an IKImageBrowserView to show a series of image captures > and it works really well. I would like to be able to manage the number > of images shown in a row in a precise way, and I'd like to know if there > i

CSWeekView classes available

2009-12-21 Thread David Hirsch
A little while ago I posted a query here asking if anybody knew of a Cocoa class to create a weekly calendar, somewhat like the iCal week view. Although there were a couple of promising replies, I decided to roll my own, "CSWeekView". I've released it on GitHub under the LGPL. For my program'

Version number objects

2009-12-21 Thread Ken Tabb
Hi folks, I've got an app that needs to keep track of version numbers (eg. "10.6.2") of things, and needs to be able to sort by these too. Is there a class in Cocoa that handles this? I could have sworn I heard mention of it in a previous WWDC (probably about 10.5), but all attempts at se

Is this possible?

2009-12-21 Thread Development
I asked about adding a shadow to a uiimage nestled within a uiimageview and no one seemed to know so I am wondering if it is even possible to add a shadow to a uiimage that way?___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

freeing memory from an NSOperation

2009-12-21 Thread Michael Thon
Are NSOperations freed when they finish running or when the whole queue is finished? My NSOperations seem to hang around, taking up memory even after they have finished their job. At least, as far as I can tell using the Object Allocations instrument which shows them as living. I am using an

Re: Menu shortcuts without modifiers?

2009-12-21 Thread Uli Kusterer
On 18.09.2009, at 23:07, Peter Ammon wrote: > For key events without modifiers, like hitting the spacebar, the first > responder of the key window should get first crack via keyDown:. So I'm not > sure why you're seeing the behavior you describe. I wrote a quick test with > a focused text fiel

Re: Version number objects

2009-12-21 Thread Clark Cox
On Mon, Dec 21, 2009 at 10:18 AM, Ken Tabb wrote: > Hi folks, > > I've got an app that needs to keep track of version numbers (eg. "10.6.2") > of things, and needs to be able to sort by these too. Is there a class in > Cocoa that handles this? > > I could have sworn I heard mention of it in a prev

Persistent NSOperation?

2009-12-21 Thread McLaughlin, Michael P.
Could anyone point me to sample code that shows how to implement a persistent NSOperation that could be enqueued repeatedly? Currently, I initialize NSOps just prior to launching but this involves copying large datasets (to avoid R/W contention) and it would be more efficient if I could initialize

Re: NSAttributedString fill with gradient

2009-12-21 Thread David Duncan
On Dec 19, 2009, at 6:21 PM, BravoBug Software wrote: > [[NSColor selectedMenuItemColor] set]; > NSRectFill(someRect); This works because the selectedMenuItemColor is a pattern that happens to draw a gradient. You could just as easily draw nearly anything with a pattern, and Quartz treats patte

Re: Is this possible?

2009-12-21 Thread David Duncan
On Dec 21, 2009, at 7:38 AM, Development wrote: > I asked about adding a shadow to a uiimage nestled within a uiimageview and > no one seemed to know so I am wondering if it is even possible to add a > shadow to a uiimage that way? You seemed to have something that should work (creating a new

Re: passing a method name?

2009-12-21 Thread Matt Neuburg
On Sun, 20 Dec 2009 15:39:08 -0800, Dave Carrigan said: > >On Dec 20, 2009, at 3:29 PM, Graham Cox wrote: > >> I think what the OP was talking about was making a called method sensitive to its caller, which is a no-no. > > >That's what I thought the OP was saying, and I agree. It would mean that d

Re: Is this possible?

2009-12-21 Thread Development
I either got no shadow, or a distorted image or the image went empty. Once in a while I'd get a duplicate of the image blurred but it was not grey black like shadow instead it was the color of the original. On Dec 21, 2009, at 10:34 AM, David Duncan wrote: > On Dec 21, 2009, at 7:38 AM, Devel

Releasing an NSBundle

2009-12-21 Thread Dave DeLong
Hi everyone, I'm working on a simple plugin-based Foundation tool, and I have a question regarding NSBundles. I have a function in my tool that discovers all classes that conform to my plugin protocol. It does this by iterating through the list of loaded classes and testing each class to see

Re: Releasing an NSBundle

2009-12-21 Thread Douglas Davidson
On Dec 21, 2009, at 10:06 AM, Dave DeLong wrote: My question is this (and the documentation, from what I've seen, is mute on the subject): when an NSBundle object is deallocated, is its associated code automatically unloaded, or does it stay loaded in the runtime? For compatibility reas

Re: Detecting system protected folders.

2009-12-21 Thread Sandro Noël
Is there anything in Cocoa/Carbon to retrieve ACL From files? Or do i have to mess around with the ACL Library directly ? Regards. Sandor Noel. On 2009-12-19, at 12:27 PM, Sandro Noël wrote: > >> >> Testing this in Terminal: >> mv ~/Music ~/lose >> >> I get a Permission denied error message

[A] Resizing a window to show full rows from a table view

2009-12-21 Thread Chuck Remes
I searched around but could not find an answer to the problem of enforcing a particular window size so that only "whole" rows are shown in a table view. I have archives of this list going back to 2002 but nothing suitable popped up. Here's the code in objective-j (Cappuccino framework). /*

Remember Window and Inspector Positions

2009-12-21 Thread David Blanton
I have a main window and a few floating inspectors. I would like to come back to the position the user left these upon relaunch. Do I have to program this or is there some Cocoa or other construct that does this for me? db ___ Cocoa-dev mailing

Re: Persistent NSOperation?

2009-12-21 Thread Ken Thomases
On Dec 21, 2009, at 11:26 AM, McLaughlin, Michael P. wrote: > Could anyone point me to sample code that shows how to implement a > persistent NSOperation that could be enqueued repeatedly? You can't. It's a fundamental part of the design of NSOperation. It's not just that support for it was lef

Re: Remember Window and Inspector Positions

2009-12-21 Thread Alexander Spohr
Am 21.12.2009 um 20:22 schrieb David Blanton: > I have a main window and a few floating inspectors. I would like to come back > to the position the user left these upon relaunch. Do I have to program this > or is there some Cocoa or other construct that does this for me? You can put that into

Re: Remember Window and Inspector Positions

2009-12-21 Thread David Blanton
Ok. I thought I had some automagic behaviour before but in doing a sample I did not observe it. I had not named the window in IB. I'll give that a go now. Happy Healtcare! db On Dec 21, 2009, at 12:38 PM, Alexander Spohr wrote: Am 21.12.2009 um 20:22 schrieb David Blanton: I have a ma

Re: Remember Window and Inspector Positions

2009-12-21 Thread Sherm Pendley
On Mon, Dec 21, 2009 at 2:38 PM, Alexander Spohr wrote: > > Am 21.12.2009 um 20:22 schrieb David Blanton: > >> I have a main window and a few floating inspectors. I would like to come >> back to the position the user left these upon relaunch. Do I have to program >> this or is there some Cocoa o

App not stopping at _NSLockError breakpoint

2009-12-21 Thread PCWiz
I keep getting these errors in the Console: 2009-12-21 13:07:48.420 TwitMenu[2512:a0f] *** -[NSRecursiveLock unlock]: lock ( '(null)') unlocked when not locked 2009-12-21 13:07:48.420 TwitMenu[2512:a0f] *** Break on _NSLockError() to debug. 2009-12-21 13:07:48.437 TwitMenu[2512:4103] *** -[NSRecu

Outline View Enter Edit Mode.

2009-12-21 Thread Sandro Noël
Greetings This is probably a simple question. How do you tell an Outline View item to enter edit mode from a pop up menu. Just like when i double click on it? I Looked Around, but when i call the Edit Message, i get an error that it is an unknown selector. any clues? regards. Sandro Noel.

Re: Is this possible?

2009-12-21 Thread Development
Ok, I have managed to get a beautiful shadow drawn in my rotating view (A view I used to rotate images so they don't distort). The rotating view sits inside an an image view. so it is layered as follows: ImageView(parent)->rotatingView(child)->image Anyway. I get a lovely shadow, but t

Simple question on Menus and Document-based apps

2009-12-21 Thread Henri Häkkinen
Hello. This is probably a basic question but I haven't been able to find an answer from the ADC guides so far. So I have a simple document-based application which has MyDocument with some other classes. The application has the default MainMenu.xib and MyDocument.xib interface files. I would li

Re: Releasing an NSBundle

2009-12-21 Thread Dave DeLong
I hadn't considered that the system might retain the bundles (but that makes a lot of sense). Nevertheless, I've decided to reorganize my code a bit to maintain an active retain on the NSBundle objects. Thanks for the info! Dave On Dec 21, 2009, at 11:12 AM, Douglas Davidson wrote: > > On D

Re: Simple question on Menus and Document-based apps

2009-12-21 Thread Sherm Pendley
2009/12/21 Henri Häkkinen : > > So I have a simple document-based application which has MyDocument with some > other classes. The application has the default MainMenu.xib and > MyDocument.xib interface files. I would like to add a menu item to the > MainMenu, which would call an IBAction method

Re: Version number objects

2009-12-21 Thread Gregory Weston
Ken Tabb wrote: > I've got an app that needs to keep track of version numbers (eg. > "10.6.2") of things, and needs to be able to sort by these too. Is > there a class in Cocoa that handles this? To which Clark Cox replied: > NSString's -compare:options: already handles mixed > alphanumeric

Re: Core Data validateForUpdate

2009-12-21 Thread Sean McBride
On 12/20/09 3:19 PM, Gerriet M. Denkmann said: >What I try to accomplish: >SomeEntity has a property called "uniqueKey" and this is (no big >surprise) meant to be unique. > >When the "UniqueKey" column in my table view gets edited, >validateUniqueKey:error: gets called, I check the new value for >

Re: tracking EXC_BAD_ACCESS error in applescript command

2009-12-21 Thread François Guillet
That was a copy of the original call stack before I subclass NSScriptCommand. If I subclass NSScriptCommand and call executeCommand from this subclass, then the crash occurs as before, but of course the call stack changes accordingly. Anyway I put breakpoints in my subclass' methods to make sure

Re: App not stopping at _NSLockError breakpoint

2009-12-21 Thread Greg Parker
On Dec 21, 2009, at 12:14 PM, PCWiz wrote: > I keep getting these errors in the Console: > > 2009-12-21 13:07:48.420 TwitMenu[2512:a0f] *** -[NSRecursiveLock unlock]: > lock ( '(null)') unlocked when not locked > 2009-12-21 13:07:48.420 TwitMenu[2512:a0f] *** Break on _NSLockError() to > debug.

Re: Outline View Enter Edit Mode.

2009-12-21 Thread Sean McBride
On 12/21/09 3:19 PM, Sandro Noël said: >How do you tell an Outline View item to enter edit mode from a pop up menu. >Just like when i double click on it? > >I Looked Around, but when i call the Edit Message, i get an error that >it is an unknown selector.

Please if some one knows

2009-12-21 Thread Development
I really could use some help on this shadow issue I have been having. Does any one know anything about drawing shadows around images in UIImageViews? Below is code that gives me a shadow but the shadow is clipped to the edge of the view, how can I get an unclipped shadow? UIGraphicsBegi

Re: Please if some one knows

2009-12-21 Thread Graham Cox
On 22/12/2009, at 9:19 AM, Development wrote: > I really could use some help on this shadow issue I have been having. Does > any one know anything about drawing shadows around images in UIImageViews? If someone does, they'll answer eventually, I'm sure. It's not good etiquette t repost the sa

Re: passing a method name?

2009-12-21 Thread Graham Cox
On 22/12/2009, at 4:48 AM, Matt Neuburg wrote: >> That's what I thought the OP was saying, and I agree. It would mean that >> doing > a refactor and changing a method's name, or even adding a new parameter to a >> method, would break the code in some unrelated method. That's a huge >> maintenan

Re: Remember Window and Inspector Positions

2009-12-21 Thread Graham Cox
On 22/12/2009, at 6:44 AM, Sherm Pendley wrote: > Yes, you can do that in IB. It's the "Autosave" in the Attributes pane > of the inspector panel. I've noticed that doing this now throws a warning when the xib is compiled that the autosave name should be supplied by an override of the -window

Re: Localization strategies?

2009-12-21 Thread François Guillet
Just my 2c gained from translating UIs in french. Localized strings can show a great variation in length even among close languages such as english and french. Moreover, english allows for short sentence/syntax whereas french does not, at least not easily. From what I've seen, there are two str

Re: Localization strategies?

2009-12-21 Thread Jerry Krinock
On 2009 Dec 21, at 01:27, Symadept wrote: > Now pass these files to Localization > team and they shall simply copy paste the other version of the string in RHS > of the corresponding files. Well, of course there are tools for this. I use and recommend Max Seelemann's Localization Suite, and ju

iPhone and GC

2009-12-21 Thread Lorenzo Thurman
Why can't iPhone apps use GC? Is it resources? Performance? Some combination of the two or other reasons altogether? Just curious, thanks. --"My break-dancing days are over, but there's always the funky chicken" The Full Monty ___ Cocoa-dev mailing l

Re: iPhone and GC

2009-12-21 Thread Shawn Erickson
On Mon, Dec 21, 2009 at 4:54 PM, Lorenzo Thurman wrote: > Why can't iPhone apps use GC? Is it resources? Performance? Some combination > of the two or other reasons altogether? Yes. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Please if some one knows

2009-12-21 Thread Uli Kusterer
On 21.12.2009, at 23:46, Graham Cox wrote: > It's not good etiquette t repost the same question repeatedly, especially > under different titles - that just breaks up the thread and makes it less > likely you'll get an answer. At least, not within the same week. -- Uli Kusterer "The Witnesses o

Re: Localization strategies?

2009-12-21 Thread Uli Kusterer
On 20.12.2009, at 21:30, Ricky Sharp wrote: > Thus, I'm wondering if it would ultimately be worth it to externalize all > strings from my nibs and just put everything in my single .strings file. > This will clearly involve me adding tons of IBOutlet ivars just so that at > runtime I can set the

Re: Version number objects

2009-12-21 Thread Uli Kusterer
On 21.12.2009, at 22:25, Gregory Weston wrote: > How well does it handle something like 1.0.1b5, or something to that effect, > though? I knocked out a category on NSString several years ago that converts > back and forth between a string and Apple's NumVersion structure and provides > a compari

UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread Development
Ok ok, sorry for double posting. Honestly I'm thinking I'm trying to do something that simply isn't possible though. I'll try my question again. Ok, I have a UIImageView. I am trying to draw a shadow under the UIImage it holds. Now if I make the UIImageView's bounds some ungodly size, like the

Re: Menu shortcuts without modifiers?

2009-12-21 Thread Peter Ammon
On Dec 21, 2009, at 7:29 AM, Uli Kusterer wrote: > On 18.09.2009, at 23:07, Peter Ammon wrote: >> For key events without modifiers, like hitting the spacebar, the first >> responder of the key window should get first crack via keyDown:. So I'm not >> sure why you're seeing the behavior you de

Re: Core Data Migration

2009-12-21 Thread Jerry Krinock
On 2009 Dec 20, at 23:40, Chaitanya Pandit wrote: > I'm working on the migration for one of my Core Data document based > application > > One weird thing that is happening is that just after the > "configurePersistentStoreCoordinatorForURL..." call, the contents of my > document on the disk a

Re: UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread David Duncan
On Dec 21, 2009, at 5:29 PM, Development wrote: > I'll try my question again. Ok, I have a UIImageView. I am trying to draw a > shadow under the UIImage it holds. Now if I make the UIImageView's bounds > some ungodly size, like the size of the screen it draws shadows perfectly but > obviously t

Re: UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread Development
Ok I was wondering if that was what I was doing wrong. I've tried messing with the size of the context but it gives me trouble. Do I need to adjust the size of the UIImageView also? or since clipping is off is it ok in it's original size? Also will the drawing to the offscreen context take place

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: UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread Development
I have changed the code I added: CGSize newSize = rotatingView.bounds.size; newSize.width += (abs(myShadowOffset.width) + spread); newSize.height += (abs(myShadowOffset.height) + spread); CGRect newSelf = CGRectMake(self.frame.origin.x, self.frame.origin.y

Re: Localization strategies?

2009-12-21 Thread Andy Lee
On Dec 21, 2009, at 8:18 PM, Uli Kusterer wrote: > On 20.12.2009, at 21:30, Ricky Sharp wrote: >> Thus, I'm wondering if it would ultimately be worth it to externalize all >> strings from my nibs and just put everything in my single .strings file. >> This will clearly involve me adding tons of I

Re: iPhone and GC

2009-12-21 Thread Michael Ash
On Tue, Dec 22, 2009 at 8:54 AM, Lorenzo Thurman wrote: > Why can't iPhone apps use GC? Is it resources? Performance? Some combination > of the two or other reasons altogether? > Just curious, thanks. I know that this will be unsatisfying, but the real reason that iPhone apps can't use GC is beca

Re: Core Data validateForUpdate

2009-12-21 Thread Gerriet M. Denkmann
On 22 Dec 2009, at 04:50, Sean McBride wrote: > On 12/20/09 3:19 PM, Gerriet M. Denkmann said: > >> What I try to accomplish: >> SomeEntity has a property called "uniqueKey" and this is (no big >> surprise) meant to be unique. >> >> When the "UniqueKey" column in my table view gets edited, >> v

Re: UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread Graham Cox
On 22/12/2009, at 1:49 PM, Development wrote: > however what I am getting now is a larger image, offset in the view and still > cutting off the shadow. So I honestly do not know how I am suppose to draw > this shadow. I would really be grateful for some additional direction. Try thinking inst

Re: UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread Development
Then I don't understand how to do this. Do I create the context at this larger size? because that's what I did. Do I drawInRect the image at it's original size? Because that's what I did. As near as I can tell, no matter what I do, the image itself, not accounting for the shadow, is drawn in th

Re: Core Data validateForUpdate

2009-12-21 Thread Matthew Lindfield Seager
On Tuesday, December 22, 2009, Gerriet M. Denkmann wrote: > What I ended up was: subclassing NSArrayController and overriding "newObject" > to return a new object prefilled with some some nice values, including > setting my uniqueKey to "undefined", "undefined_1", "undefined_2", etc. > This will

Core Data _NSFaultingMutableSet Exception

2009-12-21 Thread Gerriet M. Denkmann
Core Data model with two entities: A and B. A has property aValue and a relation theBs to one or more Bs. B has a property bValue. Two NSTableViews (tabelView1 and tableView2 ) with each controlled by an NSArrayController (arrayController1 and arrayController2). Everything works fine when I se

Re: UIImage and shadows, WAS: Re: Please if some one knows

2009-12-21 Thread Henry McGilton (Boulevardier)
On Dec 21, 2009, at 8:02 PM, Development wrote: > Then I don't understand how to do this. > > Do I create the context at this larger size? because that's what I did. > Do I drawInRect the image at it's original size? Because that's what I did. > > As near as I can tell, no matter what I do, th

Re: Localization strategies?

2009-12-21 Thread John Joyce
On Dec 21, 2009, at 8:18 PM, Uli Kusterer wrote: On 20.12.2009, at 21:30, Ricky Sharp wrote: Thus, I'm wondering if it would ultimately be worth it to externalize all strings from my nibs and just put everything in my single .strings file. This will clearly involve me adding tons of IBOut

NSTabView Bindings

2009-12-21 Thread Gerriet M. Denkmann
I am trying to bind "editable" of an NSTableColumn to ObjectController tabView.selectedIndex (The tab view has two items: Read and Edit. When the first item is selected, my table column should not be editable). But I am told: [ valueForUndefinedKey:]: this class is not key value coding-complia

Re: Core Data _NSFaultingMutableSet Exception

2009-12-21 Thread Jerry Krinock
On 2009 Dec 21, at 21:05, Gerriet M. Denkmann wrote: > But when I use: > [ arrayController1 setFilterPredicate: "aValue BEGINSWITH[n] "a" AND ANY > theBs.bValue == "xx""]; > I get an exeption: > > HIToolbox: ignoring exception '[<_NSFaultingMutableSet 0x1001f5d00> > addObserver:forKeyPath:opti

Re: Core Data _NSFaultingMutableSet Exception

2009-12-21 Thread Graham Cox
On 22/12/2009, at 4:05 PM, Gerriet M. Denkmann wrote: > When later I reset the filterPredicates back to the simple (working) mode, I > get another exception: > HIToolbox: ignoring exception 'Cannot remove an observer > for the key path "theBs.bValue" from because it is not > registered as an

Interfacing cocoa/obj-c within a C plug-in API

2009-12-21 Thread Rich E
Hi, I am new to Cocoa and Objective-C both, but I need the two in order to get tablet functionality into one of my favorite applications (Puredata) on Mac OS X. First off, I know that you can get tablet event data through the Carbon API, but I have ran into enough problems (along with no 64-bit su

Re: Core Data _NSFaultingMutableSet Exception

2009-12-21 Thread Gerriet M. Denkmann
On 22 Dec 2009, at 13:38, Graham Cox wrote: > > On 22/12/2009, at 4:05 PM, Gerriet M. Denkmann wrote: > >> When later I reset the filterPredicates back to the simple (working) mode, I >> get another exception: >> HIToolbox: ignoring exception 'Cannot remove an observer >> for the key path "t