NSPopUpButton items disabled

2010-04-06 Thread Frédéric Testuz
Hi, I have a pulldown button (NSPopUpButton) in an accessory view of a save panel. Before displaying the panel, I populate the popup with the name of the recent documents. My question is about the enable state of the pulldown menu items. In IB, I connect the action of the popup to a controller.

Re: Why I can't see my localized nib?

2010-05-18 Thread Frédéric Testuz
Le 18 mai 2010 à 18:28, Joanna Carter a écrit : > Hi Gustavo > >> In this case.. is tehre anyway to let teh user choose what lang to use?.. I >> mean if I localize my app, but the user has no localization either, how to >> make the app run in a given language (i.e sk)? > > The only way I can t

Re: Why I can't see my localized nib?

2010-05-19 Thread Frédéric Testuz
the array again back to the application defaults.. right? > > And if the user selects for example English I must do the above, and restart > the application to load the proper language... correct me if Im wrong > please... > > thx > > Gustavo > > On 18.5.2010,

Re: Question about predicates and list properties.

2010-05-26 Thread Frédéric Testuz
Le 26 mai 2010 à 16:42, Graham Cox a écrit : > > On 27/05/2010, at 12:35 AM, Keary Suska wrote: > >> Not enough info: are you using Core Data, or a simple modeled relationship? >> I assume the issue is about traversing a relationship--otherwise the >> solution is trivial... > > > No, it's a

New allowsExternalBinaryDataStorage in Core Data

2011-08-03 Thread Frédéric Testuz
Hello, I looked at the Core Data release notes of Lion, I also looked the "What's new in Core Data on Mac OS X" video of the WWDC 2011. And I have a question about the new allowsExternalBinaryDataStorage option for binary attribute. I did some test with an attribute for images. I can see that w

Re: New allowsExternalBinaryDataStorage in Core Data

2011-08-25 Thread Frédéric Testuz
coredata-external.html > > Steven > > > On Aug 3, 2011, at 10:29 PM, Frédéric Testuz wrote: > >> Hello, >> >> I looked at the Core Data release notes of Lion, I also looked the "What's >> new in Core Data on Mac OS X" video of the WWDC 201

Re: Is a file open in another application?

2011-03-19 Thread Frédéric Testuz
Le 19 mars 2011 à 20:03, Kyle Sluder a écrit : > On Sat, Mar 19, 2011 at 11:40 AM, Conrad Shultz > wrote: >> Are you certain that is a general behavior? > > 1. Open TextEdit. > 2. Type some stuff. > 3. Save As > /tmp/somefile.rtf > 4. `lsof |grep somefile` prints nothing. > >> For example, I ha

Bug with NSPredicateEditor in Xcode 4

2011-05-24 Thread Frédéric Testuz
In my project, I have a problem with editing NSPredicateEditor in a xib with Xcode 4. If I add a row template for strings, when I run my application and try to add a row to the predicate editor, I have an exception saying that it's impossible to init a predicate with a nil expression. If I edit

Re: Automatic warnings for NSLocalizedString?

2011-07-20 Thread Frédéric Testuz
It's not at compile time, but you can have messages log at runtime. See the documentation for [NSBundle localizedStringForKey:value:table:]. This is the method called by NSLocalizedString. F. Testuz Le 20 juil. 2011 à 13:10, Oleg Krupnov a écrit : > Hi, > > Is there a way, at compile time, t

Sheets, blocks and garbage collector

2010-02-06 Thread Frédéric Testuz
Hi all, I'm beginning a new application targeting Snow Leopard only. So I want to use the new tools (blocks) and garbage collection (GC). It will be my first application using GC. I read some sites on GC and blocks. In the blog of Mike Ash I found some very interesting propositions. My questio

Re: Sheets, blocks and garbage collector

2010-02-06 Thread Frédéric Testuz
Le 6 févr. 2010 à 17:55, Michael Ash a écrit : > 2010/2/6 Frédéric Testuz : >> Hi all, >> >> I'm beginning a new application targeting Snow Leopard only. So I want to >> use the new tools (blocks) and garbage collection (GC). It will be my first >> ap

Testing if a NSPipe has available data

2009-08-10 Thread Frédéric Testuz
Hi, I'm using gnuplot to obtain graph of data. You can set gnuplot to send results in various formats and to stdout I found the way to call it and get the data with NSTask and NSPipe. Actually, I get the image as an eps. The whole pack of data come in several packs obtain by the pair of me

Re: Testing if a NSPipe has available data

2009-08-10 Thread Frédéric Testuz
Le 10 août 09 à 12:40, Alastair Houghton a écrit : On 10 Aug 2009, at 09:29, Frédéric Testuz wrote: I'm using gnuplot to obtain graph of data. You can set gnuplot to send results in various formats and to stdout I found the way to call it and get the data with NSTask and NSPipe. Act

Re: Testing if a NSPipe has available data

2009-08-10 Thread Frédéric Testuz
Le 10 août 09 à 14:14, Alastair Houghton a écrit : On 10 Aug 2009, at 12:28, Frédéric Testuz wrote: Le 10 août 09 à 12:40, Alastair Houghton a écrit : So what's wrong with waiting for -[NSFileHandle availableData] to return with zero bytes? First : if you call availableData and the

Re: Making NSNumberFormatter empty-tolerant

2009-08-27 Thread Frédéric Testuz
Le 27 août 09 à 20:45, Markus Spoettl a écrit : Hello, before I get to the question this is my setup: 1) NSTextField ("field") 2) bound to an NSNumber property ("number") of an object. 3) "field" has an NSNumberFormatter attached with all default values (as set up by IB), except maximum fra

Re: Making NSNumberFormatter empty-tolerant

2009-08-27 Thread Frédéric Testuz
Le 27 août 09 à 21:46, bryscomat a écrit : Interesting. Is that documented anywhere? That's why I was confused as to exactly how I got mine to work. Seems like a fluke... On Aug 27, 2009, at 2:39 PM, Frédéric Testuz wrote: I had the same problem. For the 10.4 behavio

Re: sending a message from an initializer method

2011-01-12 Thread Frédéric Testuz
Yes, you can, but... don't forget that in -computeVar3... self is not fully initialized. If you have all control on self it can be without problems, but Objective-C is an OO language. Consider this : - Your class is ClassA with it's init method. - Then you have ClassB, subclass of ClassA. Class

Re: sending html file to safari for printing

2012-06-06 Thread Frédéric Testuz
, but you can also directly print it from your application. In short, create the html code, instantiate a WebView, make it render your html code and pass the web view to a NSPrintOperation. Frédéric Testuz ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: Printing a Webview

2008-07-10 Thread Frédéric Testuz
Hello, If your have : WebView *myView; Don't print myView, but print [[[myView mainFrame] frameView] documentView]. Consider WebView and frameView like NSScrolView. You don't want to print the scroll view but its content. Frédéric Testuz Le 10 juil. 08 à 17:44, Western Bo

Re: CALayer transform, setting the Y value of rotation causes side-effects

2008-07-14 Thread Frédéric Testuz
Le 14 juil. 08 à 18:57, John Clayton a écrit : Hi All, I'm setting the rotation values of a CALayer, and notice that when setting the Y component of rotation of a CATransform3D structure via the : [layer setValue:someValue forKeyPath:@"transform.rotation.y"] call, that in certain

NSPredicateEditorRowTemplate and ANY predicate

2008-07-22 Thread Frédéric Testuz
Hello, Is it possible to prepare a row template for a NSPredicateEditor in IB for a predicate like "ANY keyPath == 'aValue'" ? Otherwise I found this : If I can't do it in IB, I think it will be the simplest solution : - (N

Problem with Info.plist in 10.5

2008-08-27 Thread Frédéric Testuz
Hi, I'm writing a Leopard-target application. Therefore I'm willing to use UTI and the new-style for the Info.plist. I red the AppKit release notes and I thought I didn't forget something. But when I'm calling the save panel I get this error message on the console: 2008-08-27 14:12:52.522

Re: Problem with Info.plist in 10.5 [RESOLVED]

2008-09-01 Thread Frédéric Testuz
Le 27 août 08 à 21:14, Frédéric Testuz a écrit : Hi, I'm writing a Leopard-target application. Therefore I'm willing to use UTI and the new-style for the Info.plist. I red the AppKit release notes and I thought I didn't forget something. But when I'm calling the s

Re: NSString format parameter order

2008-04-08 Thread Frédéric Testuz
I think using the capacity of Cocoa would be simplier. Look at the doc on the localization : This line : NSLog(@"%3$u : %2$@ : %1$@", @"le 1", @"le 2", 3);

Re: NSNumberFormatter behavior

2008-05-07 Thread Frédéric Testuz
Le 6 mai 08 à 03:29, Chataka a écrit : Hello, My app has a NSTextField on a UI window to accept user input and to display a NSNumber in a model object. The NSTextField and the NSNumber are bound using Cocoa Bindings, and the NSTextField is set a NSNumberFormatter. It is a very simple UI b

Re: Sublclassing NSThread

2008-12-17 Thread Frédéric Testuz
Le 17 déc. 08 à 17:14, Keith Duncan a écrit : On 17 Dec 2008, at 15:41, Jean-Daniel Dupas wrote: because there's absolutely no way to guarantee that only a single NSOperationQueue exists in your process Couldn't you swizzle +[NSOperationQueue alloc] to return a singleton? Sure it's a h

Re: CoreData relationship/KVC question

2009-01-30 Thread Frédéric Testuz
Le 30 janv. 09 à 20:14, Jean-Nicolas Jolivet a écrit : I've been working on my first CoreData project and I have a question regarding dynamically generated accessors for to-many relationships and KVC... I'll keep it as simple as possible, let's assume I have a Department entity which cont

Re: Simple memory problem

2009-02-06 Thread Frédéric Testuz
Le 6 févr. 09 à 07:32, Martin Wierschin a écrit : On Feb 5, 2009, at 4:42 PM, Steve Sisak wrote: NSString * newString = [inputString stringByReplacingCharactersInRange:range withString:@""]; [inputString release]; // release old inputString inputString = [newString retain];

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Frédéric Testuz
Le 22 févr. 09 à 00:06, Iceberg-Dev a écrit : I just discovered something recently. If you register an observer with the same name/object/selector twice, you get the notification twice when you post it. Isn't the NSNotificationCenter supposed to prevent this? Notifications post via a NSNo

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Frédéric Testuz
Le 22 févr. 09 à 10:52, Frédéric Testuz a écrit : Le 22 févr. 09 à 00:06, Iceberg-Dev a écrit : I just discovered something recently. If you register an observer with the same name/object/selector twice, you get the notification twice when you post it. Isn't the NSNotificationC

Re: Populating a new SQLite Core Data store with default data

2009-02-23 Thread Frédéric Testuz
Le 23 févr. 09 à 21:50, Jon C. Munson II a écrit : I meant: [(MyClassyClass *)obj doSomethingSpecificToMyClassyClass] The cast needs to be applied to the pointer - obj - and not to the returned value (outside the [ ] square brackets). -- I.S. [Jon C. Munson II] That made a difference.

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-25 Thread Frédéric Testuz
Le 25 févr. 09 à 00:44, Jonathan Hess a écrit : On Feb 20, 2009, at 1:05 AM, Alexander Spohr wrote: Am 20.02.2009 um 04:18 schrieb mmalc Crawford: On Feb 19, 2009, at 12:34 PM, mmalc Crawford wrote: See also updated:

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-25 Thread Frédéric Testuz
Le 25 févr. 09 à 18:37, mmalc Crawford a écrit : mmalc OK, thank you Frédéric ___ Cocoa-dev mailin

Re: Localization...

2008-11-03 Thread Frédéric Testuz
Le 3 nov. 08 à 05:04, Chris Idou a écrit : I don't seem to be having much luck getting localization to work. I've got a utf16 strings file in my project called MetaData.strings that contains: "kMDItemFSLabel" = "color label"; Then in my code... [[NSBundle bundleForClass:[self class]]

Re: Call getElementById in Cocoa

2008-11-24 Thread Frédéric Testuz
Le 24 nov. 08 à 18:34, Mike Abdullah a écrit : On 24 Nov 2008, at 17:28, Jean-Daniel Dupas wrote: Le 24 nov. 08 à 18:03, Mike Abdullah a écrit : On 24 Nov 2008, at 16:45, John Terranova wrote: On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your We

Re: Programatically Triggering an NSSearchField Search

2008-11-26 Thread Frédéric Testuz
Le 26 nov. 08 à 04:57, Steve Steinitz a écrit : Hello, I use NSSearchFields bound to NSArrayControllers to allow my client to search their Core Data database. Pretty standard. My search predicate bindings are lengthy, giving my client lots of options to find what they want. Occasional

Re: Should copy + paste change characters?

2013-12-27 Thread Frédéric Testuz
Le 27 déc. 2013 à 21:01, Frédéric Testuz a écrit : > > Le 27 déc. 2013 à 18:09, Gerriet M. Denkmann a écrit : > >> >> Le 27 déc. 2013 à 21:42, Frédéric Testuz a écrit : >> >>> I have 10.9.1 (local:swiss-french) and did what you propose. >>>

Re: Two kinds of NSManagedObject fault?

2014-03-08 Thread Frédéric Testuz
Le 8 mars 2014 à 03:54, Jerry Krinock a écrit : > Sixten is correct about -isDeleted. It is rarely useful. > > Regarding these two kinds of managed object faults, your “second” kind is > similar to what I described in a message I posted earlier today [1]. In my > case, > > -isFault retur

@unionOfObjects and direct KVC in NSArray

2014-04-09 Thread Frédéric Testuz
Say I have an array of Person object with a name property. Is there a difference between : namesArray = [personsArray valueForKeyPath:@"@unionOfObjects.name"]; and namesArray = [personsArray valueForKeyPath:@"name"]; On a small test I can just see that the concrete NSArray class returned are

NSComboBox and sorted list

2014-04-18 Thread Frédéric Testuz
Hello, I have a typical CoreData application which display my entities in an NSTableView with an NSArrayController and a panel to edit the selected item. I have an entity Book with a NSString attribute type displayed in an NSComboBox. I want the drop down list of the combo box to display the p

Re: NSComboBox and sorted list

2014-04-26 Thread Frédéric Testuz
Le 18 avr. 2014 à 13:32, Frédéric Testuz a écrit : > > I have a typical CoreData application which display my entities in an > NSTableView with an NSArrayController and a panel to edit the selected item. > > I have an entity Book with a NSString attribute type displayed in an