Re: ScrollView Programming

2011-04-05 Thread Quincey Morris
On Apr 5, 2011, at 23:28, Quincey Morris wrote: > Almost certainly your problem is that you failed to set the autoresizing > springs correctly for the "document" view. In the simplest case, it should be > anchored on all 4 sides, and be stretchy in both directions. Gah! Said that backwards. If

Re: ScrollView Programming

2011-04-05 Thread Quincey Morris
On Apr 5, 2011, at 22:54, Jeffrey Walton wrote: > After following Steps 1 - 4, what is the layout supposed to look like under > IB? > > + File Owner > + First Responder > + View > + Scroll View > + Control 1 > + Control 2 > + ... > > Or > > + File Owner > + First Responder > + Scroll Vie

Re: Dynamically Loading Code and Core Data Non-Standard Persistent Attributes

2011-04-05 Thread Eli Bach
On Apr 5, 2011, at 4:36 PM, Carter R. Harrison wrote: > ...when I relaunch the application and Core Data tries to unarchive them I > receive an exception like: > > *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class > (DiskSpaceAlert) > > I can't tell exactly why this

ScrollView Programming

2011-04-05 Thread Jeffrey Walton
Hi All, I'm working from "Scroll View Programming Guide for Cocoa" [1]. All items are IBOutlets (even the ScrollView), and all outlets are verified in ViewDidLoad via ASSERTs (no asserts fire). I believe I have followed the instructions under Creating a Scroll View in Interface Builder. Unfortunat

Re: special characters are destroyed when copying a string character by character

2011-04-05 Thread Kyle Sluder
On Tue, Apr 5, 2011 at 9:31 PM, Kyle Sluder wrote: > On Tue, Apr 5, 2011 at 8:55 AM, Horst Jäger > wrote: >> Any idea why? > > Because "unichar" is not the same thing as a grapheme. > > http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/stringsClusters.html%2

Re: special characters are destroyed when copying a string character by character

2011-04-05 Thread Kyle Sluder
On Tue, Apr 5, 2011 at 8:55 AM, Horst Jäger wrote: > Any idea why? Because "unichar" is not the same thing as a grapheme. http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/stringsClusters.html%23//apple_ref/doc/uid/TP40008025-SW1 --Kyle Sluder _

Re: special characters are destroyed when copying a string character by character

2011-04-05 Thread Sherm Pendley
On Tue, Apr 5, 2011 at 11:55 AM, Horst Jäger wrote: > >                [dst appendFormat:@"%c", chr]; %c is the format specifier for 8-bit chars - use %C for 16-bit unichars. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net ___

special characters are destroyed when copying a string character by character

2011-04-05 Thread Horst Jäger
Hi, I have noticed that special characters are destoryed when they are copied one by one from one string into another. Listed below is some demo code (demo.h, Demo.m) which yields the console log also listed below (Demo.log). It states that the String containig no special characters is copied

Re: Odd NSCache Eviction Behaviour

2011-04-05 Thread Dalmazio Brisinda
On 2011-04-05, at 7:16 PM, Graham Cox wrote: > > On 05/04/2011, at 7:01 PM, Dalmazio Brisinda wrote: > >> Pity. NSCache looked so promising > > > You could roll your own cache class that has the same interface but uses a > LRU algorithm internally. Then if NSCache is updated it would be a dr

Dynamically Loading Code and Core Data Non-Standard Persistent Attributes

2011-04-05 Thread Carter R. Harrison
My Core Data application has a plugin architecture. Plugins reside within their own bundles and of course are loaded dynamically at runtime. I intend to encode instances of each plugin bundle's principal class just as Apple describes it in the section of the Core Data Programming Guide called

Re: Drawing custom group row in TableView

2011-04-05 Thread Corbin Dunn
On Apr 5, 2011, at 7:36 AM, Georg Seifert wrote: > Hi, > > I have a custom NSTableView want to draw my own group row background. What Is > the best way to do that. > > I subclassed NSTableView and use a subclass of NSTextfieldCell to draw the > table. What I can’t figure out, what to overwrit

Re: NSString, stringByAppendingPathComponent, and Canonicalization

2011-04-05 Thread David Duncan
On Apr 4, 2011, at 8:08 PM, Jeffrey Walton wrote: > Hi All, > > I need to accept a filename from the user. Given the nature of the file system on iOS, do you really need to accept a file name from the user, or just a document title? Unless your supporting users syncing documents via some meth

Re: applicationWillTerminate not received

2011-04-05 Thread David Duncan
On Sat, Apr 2, 2011 at 9:53 PM, Quincey Morris wrote: > I think you'll need to force a low-memory termination to test the code path > through 'applicationWillTerminate:'. I couldn't see an easier way to make it > happen with an iOS 4.0 backgroundable multitasking-aware app. Not even then. O

AVFoundation and YouTube?

2011-04-05 Thread John Michael Zorko
Hello, all ... I've used AVFoundation / AVAsset / AVPlayer / etc. to play both M3U8 and M4V content on iOS 4.3.1. I'd also like to use it to play YouTube content (so I can do animation / scaling stuff on the AVPlayerLayer). I've a couple of questions: 1. Is this possible with the iOS-optimized

Drawing custom group row in TableView

2011-04-05 Thread Georg Seifert
Hi, I have a custom NSTableView want to draw my own group row background. What Is the best way to do that. I subclassed NSTableView and use a subclass of NSTextfieldCell to draw the table. What I can’t figure out, what to overwrite to add my own drawing code. Any ideas? Best Georg

Re: Trying to subclass UISwitch

2011-04-05 Thread Philip Ershler
On Apr 5, 2011, at 7:05 AM, Thomas Davie wrote: > > On 4 Apr 2011, at 17:31, Philip Ershler wrote: > >> Outstanding, thank you very much! >> >> Phil >> >> On Apr 4, 2011, at 10:28 AM, Roger Dalal wrote: >> >>> Phil: >>> >>> Try http://osiris.laya.com/projects/rcswitch/ by Sascha Hoehne and

Re: Trying to subclass UISwitch

2011-04-05 Thread Philip Ershler
This is the same link that Roger Dalal posted yesterday. Thanks On Apr 5, 2011, at 6:57 AM, Hank Heijink (Mailinglists) wrote: > Typing "customize uiswitch" into Google returned this as the second hit: > http://osiris.laya.com/projects/rcswitch/ > > Might be worth looking at. > > Hank > > On

diable localization

2011-04-05 Thread Georg Seifert
Hi, I what to give my users the possibility to disable the localization of my app. Is there a way to tell the system (NSBundle?) to always load the english nibs? Best Georg___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: applicationWillTerminate not received

2011-04-05 Thread Matt Neuburg
On Sat, 02 Apr 2011 21:01:46 -0400, Jeffrey Walton said: >Hi All, > >I'm using NSLog and breakpoints to trace application life cycle >messages on an iPhone. I'm receiving applicationDidBecomeActive, >applicationWillResignActive, applicationDidEnterBackground, >applicationWillEnterForeground, etc a

lockFocus mystery in screensaver

2011-04-05 Thread Gabriel Zachmann
One of the users of my screensaver has reported a problem and sent in the system.log. In it, I find this line: System Preferences[324]: *** Assertion failure in -[ArtSaverView lockFocus], /SourceCache/AppKit/AppKit-949.54/AppKit.subproj/NSView.m:4755 It appears after the following steps that I

Re: Trying to subclass UISwitch

2011-04-05 Thread Thomas Davie
On 4 Apr 2011, at 17:31, Philip Ershler wrote: > Outstanding, thank you very much! > > Phil > > On Apr 4, 2011, at 10:28 AM, Roger Dalal wrote: > >> Phil: >> >> Try http://osiris.laya.com/projects/rcswitch/ by Sascha Hoehne and Robert >> Chin. It is well done. >> >> Roger Dalal >> Assembled

Re: Trying to subclass UISwitch

2011-04-05 Thread Hank Heijink (Mailinglists)
Typing "customize uiswitch" into Google returned this as the second hit: http://osiris.laya.com/projects/rcswitch/ Might be worth looking at. Hank On Apr 4, 2011, at 10:22 PM, Philip Ershler wrote: > The first thing I tried to do was to subclass the UISwitch. But when one > looks at the docs

Re: Odd NSCache Eviction Behaviour

2011-04-05 Thread Graham Cox
On 05/04/2011, at 7:01 PM, Dalmazio Brisinda wrote: > Pity. NSCache looked so promising You could roll your own cache class that has the same interface but uses a LRU algorithm internally. Then if NSCache is updated it would be a drop-in replacement. The only drawback with it at present (whic

Re: Passing an object to a custom sheet

2011-04-05 Thread Graham Cox
On 05/04/2011, at 6:29 AM, Torsten Geise wrote: > - DialogController is of type NSObject and acts a the File's Owner of > Dialog.xib. This will work, but it's more conventional (and has certain advantages) to subclass NSWindowController instead of NSObject here. After all, you are controlling

Re: Odd NSCache Eviction Behaviour

2011-04-05 Thread Dalmazio Brisinda
On 2011-04-05, at 2:37 AM, Ken Thomases wrote: > On Apr 4, 2011, at 11:34 AM, Dalmazio Brisinda wrote: > >> 2) The larger issue. The documentation states: >> >> "By default, NSDiscardableContent objects in the cache are automatically >> removed from the cache if their content is discarded, alt

Re: Passing an object to a custom sheet

2011-04-05 Thread Joanna Carter
Hi Torsten > When I want to use an Object in the "onOkButtonPressed" function, how can I > set this object in instance #2? [NSBundle loadNibNamed:@"Dialog" owner:self] > does not return a pointer to the instance. In opposite, when "didEndSheet" is > called, I'm back in instance#1 without any kn

Re: Passing an object to a custom sheet

2011-04-05 Thread Quincey Morris
On Apr 4, 2011, at 13:29, Torsten Geise wrote: > So far, so good. My problem starts with passing objects to the dialog or > passing the content of the NSTextfield back to the caller. In the showDialog > function, I already have an instance to DialogController (instance 1). When > the NIB file g