Re: observeValueForKeyPath returns null in the change directory???

2009-08-15 Thread Sandro Noel
thanks guy's Sandro Noël sandro.n...@mac.com Mac OS X : Swear by your computer, not at it. P -Pensez vert! avant d’imprimer ce courriel. -Go Green! please consider the environment before printing this email. On 15-Aug-09, at 7:05 PM, Kyle Sluder wrote: Unfortunately, NSController's impleme

Re: NSProgressIndicator not animating when part of NSAnimation

2009-08-15 Thread Thomas Bauer
Hi! Thanks for your response. I am not quite sure if I understand you correctly but here is what I tried: - Calling the whole code (starting the NSAnimation and the ProgressIndicator animation) using a performSelectorOnMainThread does not fix it. - Calling the whole code using performSel

Re: NSProgressIndicator not animating when part of NSAnimation

2009-08-15 Thread Kyle Sluder
On Aug 15, 2009, at 6:04 PM, Thomas Bauer wrote: Further to my below question I found out that the problem is related to what is triggering the code that starts the animation: If the code that starts the NSAnimation and the NSProgressIndicator animation is called in an IBAction called by a

Re: NSProgressIndicator not animating when part of NSAnimation

2009-08-15 Thread Thomas Bauer
Dear List! Further to my below question I found out that the problem is related to what is triggering the code that starts the animation: If the code that starts the NSAnimation and the NSProgressIndicator animation is called in an IBAction called by a button on a different window, the NSP

Re: signals question

2009-08-15 Thread Kyle Sluder
--Kyle Sluder On Aug 15, 2009, at 8:08 AM, Rolando Abarca wrote: The thing is that somehow, I'm not locking the ruby VM to do not allow it to be interrupted during it's execution, because apparently it is being interrupted and that's causing some really nasty (random) crashes. Is it possible

signals question

2009-08-15 Thread Rolando Abarca
Hi All, I've been hunting a bug for almost a week now, and I think I got it narrowed enough now: I'm embedding a ruby interpreter in an app, and calling ruby code from within my app asynchronously. The app is only one thread, but it responds to events generated by the OS (click, timers, etc.) and

NSProgressIndicator not animating when part of NSAnimation

2009-08-15 Thread Thomas Bauer
Dear List! I am using an indetermined NSProgressIndicator as a subview of a NSView. The frame of the NSView is animated using a NSAnimation. Basically before (or after - i have tried both) [mynsanimation startAnimation] I do a [myprogressindicator startAnimation:self]; However, the progressin

Re: observeValueForKeyPath returns null in the change directory???

2009-08-15 Thread Kyle Sluder
Unfortunately, NSController's implementation of -bind:… ignores your options and does not fill in the change information. It's incredibly frustrating. File a Radar, they'll add it to the pile… --Kyle Sluder___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: observeValueForKeyPath returns null in the change directory???

2009-08-15 Thread Jean-Daniel Dupas
Le 15 août 2009 à 21:18, Sandro Noel a écrit : Greetings. I would like to watch to prefeences change in my application. so i add these observers as so: settings = [NSUserDefaultsController sharedUserDefaultsController]; [settings addObserver:self forKeyPath:@"values.filesPath" options:(NSKeyVa

Re: iPhone: detect if docked?

2009-08-15 Thread Jack Carbaugh
ah but wouldn't this be a FAIL if say, the user was using a battery extender for a quick recharge ? On Aug 15, 2009, at 3:40 AM, David Duncan wrote: On Aug 14, 2009, at 4:29 AM, Sean Kline wrote: Is another option to use the External Accessory framework? I don't think so. A simple charg

Is it possible to detour a drag and drop operation?

2009-08-15 Thread Iceberg-Dev
Problem: Let's say I have 2 windows: +---++---+ +---++---+ | || | | +-+ || | | | A | || | | +-+

Re: Timer in drawing loop performance problems

2009-08-15 Thread Shayne Wissler
Evidently I wasn't clear. It's using ~15% of the CPU while not drawing anything at all, but just from the timer going off and calling setNeedsDisplay. I don't actually redisplay unless something changed. Thanks for the tip on CVDisplayLink, I missed that. Shayne Wissler On Sat, Aug 15, 2009 at

observeValueForKeyPath returns null in the change directory???

2009-08-15 Thread Sandro Noel
Greetings. I would like to watch to prefeences change in my application. so i add these observers as so: settings = [NSUserDefaultsController sharedUserDefaultsController]; [settings addObserver:self forKeyPath:@"values.filesPath" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOption

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Agha Khan
Thank for reply. First of all I should had written self.helpButton = [UIButton buttonWithType:UIButtonTypeCustom]; Not UIButtonTypeRoundedRect CustomButton*myButton = [CustomButton buttonWithType: UIButtonTypeCustom]; That does not work either, even my base class is UIButton for CustomBut

Re: Aqua animations drawing from separate thread

2009-08-15 Thread Frederik Slijkerman
The problem is that of course, you don't know that in general, so it's a potentially difficult-to-find bug that could happen anywhere in your code. For example, I now have a button that's just above a view with complex drawing, so the border of the button overlaps with that view and causes it t

Re: Disabled controls don't update their visual appearance

2009-08-15 Thread Christopher Campbell Jensen
No, it's a just a regular application. It's functionality is very similar to MetaX (an mp4 tagging tool), in that it has a file viewer where you can have a bunch of files open, when you select one it updates all the fields in the rest of the UI to reflect the information contained and selec

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Chase Meadors
You're completely correct, that was an error on my part. I don't know exactly why I wrote it that way... morning? On Aug 15, 2009, at 9:55 AM, Luke the Hiesterman wrote: What? No, that is not the idea. When an object is unarchived from a nib it is instantiated as part of the unarchiving proc

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Luke the Hiesterman
For some reason I don't have this original email in my inbox, but to the author: As you've observed, initWithCoder: is called when your object is instantiated from a nib. Since you don't have a nib, and you're instantiating the object in code, you should not use initWithCoder:. Instead yo

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Luke the Hiesterman
What? No, that is not the idea. When an object is unarchived from a nib it is instantiated as part of the unarchiving process, and you're supposed to perform initialization in initWithCoder:, not allocation (that's why in Cocoa we separate the concepts of allocation and initialization). The

Re: initWithCoder but I do not have nib file

2009-08-15 Thread Chase Meadors
Looks like you don't quite understand -init/initWithCoder methods. Why are you passing UIButtonTypeRoundedRect as the (NSCoder *)coder argument? -initWithCoder only exists to be called when an object is created in a nib. From the documentation on the NSCoding protocol (which includes in

Re: CTLineCreateWithAttributedString ignoring font size

2009-08-15 Thread Alastair Houghton
On 15 Aug 2009, at 10:28, Charles Srstka wrote: Now I'm just trying to figure out why it's ignoring the NSBackgroundColorAttributeName attribute. Well I think the problem is that NSBackgroundColorAttributeName is a higher level thing. In the Cocoa text system, the NSLayoutManager is resp

Re: Aqua animations drawing from separate thread

2009-08-15 Thread BravoBug Software
If you don't need to do secondary-thread drawing in your view, you don't have to. You can check which thread is sending the -drawRect method. Allow the subviews such as the aqua button to draw themselves, and skip over any thread-unsafe custom -drawRect stuff in your superview. The only thing you

initWithCoder but I do not have nib file

2009-08-15 Thread Agha Khan
Hi: I was looking a blog about customButton http://supergravelynbros.com/?p=871 The author explained that initializing with - (id)initWithCoder:(NSCoder *)coder I implemented something like this self.helpButton = [CustomButton initWithCoder:UIButtonTypeRoundedRect]; which complies OK, but get

Re: CTLineCreateWithAttributedString ignoring font size

2009-08-15 Thread Charles Srstka
On Aug 15, 2009, at 3:40 AM, Alastair Houghton wrote: Have you tried setting the text matrix to e.g. the identity? From my own experience drawing text with Quartz, the text matrix is often not set to what you might want (which perhaps isn't surprising as it *isn't* part of the graphics sta

Re: Multi-User DB That Talks to Core Data?

2009-08-15 Thread qutic development
Brad, would do it with a web framework like RubyOnRails [1]. This framework has really a great open source community! For the database you can use mysql [2] or postgresql [3] or even sqlite [4]. The iPhone part could be realized with a project like ObjectiveResource [5] talking to the RES

Re: Problem with Float type variable

2009-08-15 Thread Alastair Houghton
On 15 Aug 2009, at 08:01, Adil Saleem wrote: But why would it round 863.6 ? I mean there is only 1 digit after the decimal. It should not have the range problem with a value this small. Decimal numbers are not necessarily exactly representable in binary. The C library makes it look like

Re: CTLineCreateWithAttributedString ignoring font size

2009-08-15 Thread Alastair Houghton
On 14 Aug 2009, at 23:44, Charles Srstka wrote: However, instead of 10 point Courier, the string ends up being drawn at 144 point. Also, the characters are all smashed together - the X- position of each letter appears to be in the place where it would be if it *were* a smaller font size, cau

Re: Timer in drawing loop performance problems

2009-08-15 Thread Jean-Daniel Dupas
And if you enabled vsync (which is by default), your code will never draw faster than the refresh rate (usually 60 Hz). That's probably why you never use more than 15 % of the CPU. Le 15 août 2009 à 06:05, Roland King a écrit : 1) again I think you'll get better answers on the OpenGL list th

Re: iPhone: detect if docked?

2009-08-15 Thread David Duncan
On Aug 14, 2009, at 4:29 AM, Sean Kline wrote: Is another option to use the External Accessory framework? I don't think so. A simple charger may not appear as any kind of accessory at all (consider the wall-outlet charger) so EA wouldn't track it. If you want to know if the device is on e

Re: Title bar highlighting behavior

2009-08-15 Thread bryscomat
Works perfectly. Thanks. On Aug 14, 2009, at 7:39 PM, Graham Cox wrote: On 15/08/2009, at 9:40 AM, bryscomat wrote: In a window of my app, I have an NSView acting as a toolbar. It is colored with a gradient so that it looks like a textured toolbar and blends in nicely with the title bar.

Re: Problem with Float type variable

2009-08-15 Thread Graham Cox
On 15/08/2009, at 5:01 PM, Adil Saleem wrote: But why would it round 863.6 ? I mean there is only 1 digit after the decimal. It should not have the range problem with a value this small. It's got nothing to do with how it is written in decimal - it only matters what its binary represent

Re: Problem with Float type variable

2009-08-15 Thread Adil Saleem
But why would it round 863.6 ? I mean there is only 1 digit after the decimal. It should not have the range problem with a value this small.       --- On Fri, 8/14/09, Graham Cox wrote: From: Graham Cox Subject: Re: Problem with Float type variable To: "Adil Saleem" Cc: cocoa-dev@lists.app