Re: Releasing ivars in -didTurnIntoFault. Should set to nil?

2009-08-14 Thread Georg C. Brückmann
2. [somewhat important] It instills a false sense of security, but implying that extending the object lifetime to the next pool drain is always a sufficient lifetime extension. It isn't, not necessarily. Yes, I think that’s the point the we’ve been paying most attention to. 3. [somewhat more

Re: iPhone: detect if docked?

2009-08-14 Thread Sean Kline
Is another option to use the External Accessory framework? On Thu, Aug 13, 2009 at 5:26 PM, David Duncan wrote: > On Aug 13, 2009, at 2:12 PM, Eric E. Dolecki wrote: > > Is there a way to tell if the device is currently docked? >> > > Probably the closest thing would be to use the Battery API to

Parsing a .pls file

2009-08-14 Thread Eric E. Dolecki
Does anyone have a class handy that basically parses a .pls file? I have one that returns this: *[playlist]* *numberofentries=1* *File1=*http://64.71.145.106:8000 *Title1=(#1 - 140/500) WGBH 89.7 Live Boston's NPR Arts and Culture Station* *Length1=-1* *Version=2* * * Most of the time I am

iPhone: MPVolumeView not displaying

2009-08-14 Thread Eric E. Dolecki
I am using this code in my viewDidLoad (I am targeting 3.1) MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:volumeSlider.bounds] autorelease]; [volumeSlider addSubview:volumeView]; [volumeView sizeToFit];; volumeSlider is a UIView set up in IB. All I see is "No Volume Availab

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread Luke the Hiesterman
Do you have headphones plugged in? There is no speaker on the original iPod Touch, so there is no applicable volume unless headphones are plugged in. Luke On Aug 14, 2009, at 8:27 AM, Eric E. Dolecki wrote: I am using this code in my viewDidLoad (I am targeting 3.1) MPVolumeView *volumeVi

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread Eric E. Dolecki
I do have the headphones plugged in. Makes no difference. Also doesn't display when the thing is docked (ie. a SoundDock). On Fri, Aug 14, 2009 at 11:30 AM, Luke the Hiesterman wrote: > Do you have headphones plugged in? There is no speaker on the original iPod > Touch, so there is no applicable

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread Eric E. Dolecki
For what it's worth, I don't see a volume slider in the Apple Music app on the device either... not sure where that's gone to. On Fri, Aug 14, 2009 at 11:32 AM, Eric E. Dolecki wrote: > I do have the headphones plugged in. Makes no difference. Also doesn't > display when the thing is docked (ie.

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread Luke the Hiesterman
Have you tried just headphones without the dock? I'm just speculating here, but it seems possible that when it's using line out via the dock, volume goes away, along the same lines that there is no volume control on Apple TV - the assumption is that will be handled entirely by the connected

Re: Cocoa window in Carbon app and [NSApp postEvent]

2009-08-14 Thread Frederik Slijkerman
Brilliant! Thank you very much! Best regards, Frederik Slijkerman Ken Ferry wrote: Hi, It sounds to me like you are interested in -[NSObject performSelectorOnMainThread:withObject:waitUntilDone:modes:]. -Ken On Thu, Aug 13, 2009 at 12:38 PM, Frederik Slijkerman mailto:frede...@ultrafract

Aqua animations drawing from separate thread

2009-08-14 Thread Frederik Slijkerman
Hi, Another question... I've noticed that Aqua animations, for example the pulsing default button, are implemented via a separate thread, which redraws the button repeatedly. This also causes the view (for example a custom view that I wrote myself) that contains the button to receive a drawRe

Multi-User DB That Talks to Core Data?

2009-08-14 Thread Brad Gibbs
I'm trying to meet the following requirements: 1. Back-end multi-user database to manage products, contacts, projects, inventory, etc. 2. Ability to access and edit that DB over the Internet and the iPhone 3. Ability to import/export some data in the main database to/from a single-user Co

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread Eric E. Dolecki
I just tried with just headphones... I can't get a volume slider at all. Thanks, E. On Aug 14, 2009, at 11:37 AM, Luke the Hiesterman wrote: Have you tried just headphones without the dock? I'm just speculating here, but it seems possible that when it's using line out via the dock, volu

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

2009-08-14 Thread Kyle Sluder
Core Data is not a database. You will want to look elsewhere (though you might be able to use Core Data to keep track of an in-memory object model). --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread edole...@gmail.com
i rebooted the device and its now back, thanks for your help. -- Sent from the Verizon network using Mobile Email --Original Message-- From: Luke the Hiesterman To: "Eric E. Dolecki" Cc: "cocoa-dev" Date: Fri, Aug 14, 8:37 AM -0700 Subject: Re: iPhone: MPVolumeView not displayi

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

2009-08-14 Thread Brad Gibbs
I understand that Core Data is an object graph management tool, rather than a database. I'm trying to create a single-user app that uses Core Data, but gets the data for its object graph from a multi-user database app. For instance, product information stored in the main database app could

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

2009-08-14 Thread Kyle Sluder
On Aug 14, 2009, at 10:02 AM, Brad Gibbs wrote: I'm trying to create a single-user app that uses Core Data, but gets the data for its object graph from a multi-user database app. For instance, product information stored in the main database app could be exported to a catalog in the Core D

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

2009-08-14 Thread Philippe Prévot
Hi, You can use a full RDBMS ( oracle sybase / mysql ... ) to store the data and use core data on the iPhone to keep a local copy of a small amount of data.Performance may be challenge as will be the small amount of memory. Philippe Prévot Le 14 août 2009 à 19:02, Brad Gibbs a écrit :

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

2009-08-14 Thread Brad Gibbs
Actually, I wouldn't mind sending the relevant portion of the persistent store over the network. The database is an in-house app that many people will need to be able to work in simultaneously. We'll use that database to create products and packages and to update pricing and information.

Re: Re: Can I tell [NSAppleScript executeAppleEvent] to wait for script to complete?

2009-08-14 Thread DeNigris Sean
H, my NSAppleScript Class Reference documentation does not list any such method. It does list -executeAppleEvent:error: and - executeAndReturnError:, both of which return "The result of executing the event", which implies that they must wait for the script to complete. Ha ha, yes, exe

Stripping out between chars in NSString

2009-08-14 Thread Eric E. Dolecki
Is there a pretty easy way to strip out a section of a string based on 2 characters? ie. "(#1 - 140/500) Title I would like to strip out everything including the "(" and the ")" characters, and then I'll strip out the leading space. Thanks ___ Cocoa-de

Re: Stripping out between chars in NSString

2009-08-14 Thread Jack Carbaugh
In cases such as this, i've used a combination of NSScanner as well as -stringReplacingOccurancesOfString. On Aug 14, 2009, at 2:00 PM, Eric E. Dolecki wrote: Is there a pretty easy way to strip out a section of a string based on 2 characters? ie. "(#1 - 140/500) Title I would like to str

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

2009-08-14 Thread Kyle Sluder
On Fri, Aug 14, 2009 at 10:50 AM, Brad Gibbs wrote: > Actually, I wouldn't mind sending the relevant portion of the persistent > store over the network.  The database is an in-house app that many people > will need to be able to work in simultaneously.  We'll use that database to > create products

Re: iPhone: MPVolumeView not displaying

2009-08-14 Thread Eric E. Dolecki
Quick question: Can I detect when this is available? (ie. how some supporting UI when the MPVolumeView is NOT available)? On Fri, Aug 14, 2009 at 1:02 PM, edole...@gmail.com wrote: > i rebooted the device and its now back, thanks for your help. > > -- > Sent from the Verizon network usin

Title Bar of Key Window

2009-08-14 Thread Eric Gorr
In the Window Programming Guide, it states: To mark the key window for users, AppKit highlights its title bar. I was just wondering if it was possible to control this behavior and not have the title bar highlighted for a particular window, but still allow it to be the key window. The partic

Re: Title Bar of Key Window

2009-08-14 Thread Quincey Morris
On Aug 14, 2009, at 11:56, Eric Gorr wrote: In the Window Programming Guide, it states: To mark the key window for users, AppKit highlights its title bar. I was just wondering if it was possible to control this behavior and not have the title bar highlighted for a particular window, but st

Re: Title Bar of Key Window

2009-08-14 Thread Eric Gorr
On Aug 14, 2009, at 3:17 PM, Quincey Morris wrote: On Aug 14, 2009, at 11:56, Eric Gorr wrote: In the Window Programming Guide, it states: To mark the key window for users, AppKit highlights its title bar. I was just wondering if it was possible to control this behavior and not have the t

Re: Title Bar of Key Window

2009-08-14 Thread Benjamin Stiglitz
I was just wondering if it was possible to control this behavior and not have the title bar highlighted for a particular window, but still allow it to be the key window. The particular kind of window I am interested in is a NSPanel. Is it an inspector-type window? You may want to make it no

Re: Title Bar of Key Window

2009-08-14 Thread Eric Gorr
On Aug 14, 2009, at 3:37 PM, Benjamin Stiglitz wrote: I was just wondering if it was possible to control this behavior and not have the title bar highlighted for a particular window, but still allow it to be the key window. The particular kind of window I am interested in is a NSPanel. I

Re: Title Bar of Key Window

2009-08-14 Thread Quincey Morris
On Aug 14, 2009, at 12:25, Eric Gorr wrote: Well, the basic reason is that the application is undergoing a conversion to Cocoa and the first step is to convert the various NSPanels. The remaining Carbon panels behave this way and it was desired for everything to look the same until the rest

Re: Title Bar of Key Window

2009-08-14 Thread Eric Gorr
On Aug 14, 2009, at 3:44 PM, Quincey Morris wrote: On Aug 14, 2009, at 12:25, Eric Gorr wrote: Well, the basic reason is that the application is undergoing a conversion to Cocoa and the first step is to convert the various NSPanels. The remaining Carbon panels behave this way and it was

Using Delegation in communicating data between two controllers....

2009-08-14 Thread Frederick C. Lee
Environment: iPhone (but Cocoa as well)... I was using the App Delegate as the link amongst view controllers in sharing data. The 'App Delegate', being persistent, was my 'global data' clearing house. But now I learned that this is frown upon. The preferred way is using delegation to

Apple Event parameter types in Cocoa scripting

2009-08-14 Thread Martin Wierschin
Hello all, I'm trying to add an Apple Event to my Cocoa application that accepts a pure data parameter (AE constant typeData = 'tdta'). In my ".scriptSuite" file I've tried setting the "Type" to "NSData", "NSAppleEventDescriptor", "tdta", "any", and "". All of them trigger something l

Re: Apple Event parameter types in Cocoa scripting

2009-08-14 Thread Martin Wierschin
I'm trying to add an Apple Event to my Cocoa application that accepts a pure data parameter (AE constant typeData = 'tdta'). In my ".scriptSuite" file I've tried setting the "Type" to "NSData", "NSAppleEventDescriptor", "tdta", "any", and "". All of them trigger something like the follo

CTLineCreateWithAttributedString ignoring font size

2009-08-14 Thread Charles Srstka
Okay, I'm sure the answer to this is something simple that's going to make me feel very silly once I figure it out, but for now I'm stumped. To me, the code below looks like it should work: - (void)drawRect:(NSRect)rect { NSDictionary *attrs = [NSDictionary dictionaryWithObjectsAndKeys:

boundingRectWithSize and the size height parameter

2009-08-14 Thread brodhage
Hello, it seems that the size height parameter of the function boundingRectWithSize does not work? Apple states that the size parameter can be zero or the size of the rectangle to draw in. If the defaultLineHeightForFont is 30 and I set the size height to a value (e.g. 100) I would e.g.

[ANN] BuildCleaner

2009-08-14 Thread Dave DeLong
Hi everyone, I just wanted to let you know of a little utility app I've just posted, called BuildCleaner. As I explore example projects, open source frameworks, and test applications, I find that I usually have a lot of build folders cluttering my hard drive. When you combine that with

Re: [ANN] BuildCleaner

2009-08-14 Thread Rob Keniger
On 15/08/2009, at 8:58 AM, Dave DeLong wrote: To help with this, I've created BuildCleaner. It's a little menubar application that scans your hard drive every few minutes for build folders and deletes them if they haven't been modified recently (you can change the cutoff interval in the s

Title bar highlighting behavior

2009-08-14 Thread bryscomat
Hello all. 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. However, it does not fade out when window loses key. I have implemented the delegate method windowDidResig

Re: Title Bar of Key Window

2009-08-14 Thread Graham Cox
On 15/08/2009, at 5:42 AM, Eric Gorr wrote: They contain controls that need keyboard input. Non-activating panels allow keyboard input. You might want to look at the method -setBecomesKeyOnlyIfNeeded: --Graham ___ Cocoa-dev mailing list (Cocoa-d

Re: Title bar highlighting behavior

2009-08-14 Thread Graham Cox
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. However, it does not fade out when window loses key. I have implemented t

Re: Aqua animations drawing from separate thread

2009-08-14 Thread Dave Keck
Before your post, I knew that some AppKit drawing was done in secondary threads, but it never occurred to me that this could cause one's own NSView subclasses to be drawn in a separate thread, too. Presumably, if one's custom drawRect: method can be called in a separate thread due to a pulsing NSB

Re: [ANN] BuildCleaner

2009-08-14 Thread Dave DeLong
Fair enough: http://github.com/davedelong/BuildCleaner/tree/master The file you'd be most interested in is Cleaner.m: http://github.com/davedelong/BuildCleaner/blob/c97ac67172d24b896bad02ff5e8d3d67671cc07f/Cleaner.m Cheers, Dave On Aug 14, 2009, at 5:31 PM, Rob Keniger wrote: Hi Dave, Tha

Re: [ANN] BuildCleaner

2009-08-14 Thread Michael Watson
On Aug 14, 2009, at 17:58, Dave DeLong wrote: Hi everyone, I just wanted to let you know of a little utility app I've just posted, called BuildCleaner. As I explore example projects, open source frameworks, and test applications, I find that I usually have a lot of build folders clutter

enterFullScreenMode and tearing

2009-08-14 Thread Shayne Wissler
Hello, I have a program that is using NSOpenGLView to display video using OpenGL textures. It works fine with a normal window, but when I use NSView's enterFullScreenMode, I get diagonal tearing and jittery/jerky video. I have tried combinations of: GLint swapInterval = 1; [glx setValues: &swa

Re: [ANN] BuildCleaner

2009-08-14 Thread Rob Keniger
Many thanks for doing this, Dave. Great stuff. -- Rob Keniger On 15/08/2009, at 11:17 AM, Dave DeLong wrote: Fair enough: http://github.com/davedelong/BuildCleaner/tree/master The file you'd be most interested in is Cleaner.m: http://github.com/davedelong/BuildCleaner/blob/c97ac67172d24b8

Re: enterFullScreenMode and tearing

2009-08-14 Thread Roland King
I'd really suggest the OpenGL list for this .. especially as it was discussed there just a week ago (although I lost track of that thread and whether there was actually a resolution to it). On Aug 15, 2009, at 11:10 AM, Shayne Wissler wrote: Hello, I have a program that is using NSOpenGLVi

Timer in drawing loop performance problems

2009-08-14 Thread Shayne Wissler
Hello, Following the advice at http://developer.apple.com/qa/qa2004/qa1385.html, I attempted using a timer running at 1000Hz. However, on my iMac, this causes about a ~15% CPU hit. When I run Shark, it says it's spending a good deal of time in objc_msgSend, presumably in the call "[self setNeedsDi

Re: Timer in drawing loop performance problems

2009-08-14 Thread Roland King
1) again I think you'll get better answers on the OpenGL list than the cocoa dev list - the guys on that list eat and breathe openGL and I've had some fantastic help there. 2) Are you targetting OSX 10.3 for your code? That tech tip says use an NSTimer only for 10.3 compatibility and CVDisp

Re: Disabled controls don't update their visual appearance

2009-08-14 Thread Uli Kusterer
On Aug 11, 2009, at 5:45 PM, Christopher Campbell Jensen wrote: To check when/if any of them were nil, I set a breakpoint and stepped through the code pausing it each time "refreshButtonsEnabledState" was called and it made me realise that the buttons fail to update their state the first tim

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

2009-08-14 Thread Caleb Strockbine
On Aug 14, 2009, at 3:02 PM, Brad Gibbs wrote: Actually, I wouldn't mind sending the relevant portion of the persistent store over the network. The database is an in-house app that many people will need to be able to work in simultaneously. We'll use that database to create products and package

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

2009-08-14 Thread Kyle Sluder
On Aug 14, 2009, at 9:55 PM, Caleb Strockbine wrote: The client gets a bunch of data from the database, turns it into objects, and stores the objects. Then, at some point later, your application locates relevant objects from wherever it keeps them, translates them back into rows of data,

Problem with Float type variable

2009-08-14 Thread Adil Saleem
Hi,   I am getting a strange error that i am unable to understand.   I have a float type variable for which i have defined the getter and setter methods. However, when i set its value from within my application, it changes the value and the setter method gets wrong value.   Example: -(float)my

Re: Problem with Float type variable

2009-08-14 Thread Graham Cox
On 15/08/2009, at 4:46 PM, Adil Saleem wrote: On calling this, the variable aFloat in setMyvar method gets value 863.599976. I also tried giving it 6.60 but still didn't work correctly. I don't understand why is it changing the value. Why doesn't it get 863.6 ? This is a classic mis