Send POST data to browser

2009-09-17 Thread Bartosz Białecki
Hi, I'm new in programming for iPhone and I have a problem. I have a website with login form and I want to write a program on iPhone which open this website without authentication. I thought to launch a brwoser from my application and send a POST data with username and password, but I have no

Catch exception in NSArrayController

2009-09-17 Thread Konrad Windszus
I have a classical binding usecase: A NSArrayController is used for displaying the columns of a NSTableView. The columns itself therefore use the arrangedObject method of the NSArrayController. In the get methods of the model itself (which normally return an NSString* which should be

Fwd: [SOLVED] NSTreeController setSelectionIndexPath depends on sort order

2009-09-17 Thread Konrad Windszus
Just for the record: I found the solution on the net: http://wilshipley.com/blog/2006/04/pimp-my-code-part-10-whining-about.html . But instead of going through the whole tree to find an object, I simply store the complete object hierarchy, so that I only have to descent to that children,

Re: getline 'free' problem

2009-09-17 Thread Aron Nopanen
On 17/09/2009, at 2:42 AM, Jason Foreman wrote: On Sep 16, 2009, at 5:41 AM, Aron Nopanen wrote: On Snow Leopard (using gcc 4.2), I'm getting a 'double free' error in the guts of the C++ std::getline. The 'free' in question is being performed by std::string::reserve. This happens any time I

+keyPathsForValuesAffectingKey not working for a category-implemented property on a CoreData class

2009-09-17 Thread Doug Knowles
I'm having trouble defining this briefly. I am using CoreData-generated classes, and extending them by defining methods and calculated properties in categories on the generated classes (so they don't get overridden if I regenerate the classes). All works fine for properties with CoreData-defined

-NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread steven Hooley
- shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? NSMutableIndexSet *someIndexes = [NSMutableIndexSet indexSet]; [someIndexes addIndex:0]; [someIndexes addIndex:2]; [someIndexes shiftIndexesStartingAtIndex:2 by:-1];

[iPhone opengl] drawing issues when switching views

2009-09-17 Thread Sven
Apologies if this is not on the right list. I have an app with several views, one of which is an OpenGLES view implemented by subclassing OpenGLES2DView. When I switch from a normal view to the OpenGL view it draws the textured sprite as expected, but when I switch from the OpenGL view back to

Re: #pragma to suppress a warning message

2009-09-17 Thread Sean McBride
On 9/16/09 11:06 PM, Scott Thompson said: Nonetheless, on the 10.4 machine where I tested this, the method works. Does anybody know what the story is with this method and 10.4? Is this method actually supported by 10.4 or is it something that happens to be supported if certain other

NSRunLoop issue

2009-09-17 Thread Andreas Grosam
How can I prevent a run loop from returning immediately if there is no input source and no timer attached ? Following problem: I use a separate thread where several periodic timers shall be attached and detached to the thread's run loop. The timers shall be attached and detached (read

Re: Catch exception in NSArrayController

2009-09-17 Thread Sean McBride
On 9/17/09 1:26 PM, Konrad Windszus said: I have a classical binding usecase: A NSArrayController is used for displaying the columns of a NSTableView. The columns itself therefore use the arrangedObject method of the NSArrayController. In the get methods of the model itself (which normally return

Re: NSRunLoop issue

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 16:41, Andreas Grosam a écrit : How can I prevent a run loop from returning immediately if there is no input source and no timer attached ? Following problem: I use a separate thread where several periodic timers shall be attached and detached to the thread's run

Re: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread Tommy Nordgren
On 17 sep 2009, at 15.23, steven Hooley wrote: - shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? NSMutableIndexSet *someIndexes = [NSMutableIndexSet indexSet]; [someIndexes addIndex:0]; [someIndexes addIndex:2];

Re: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread Richard Frith-Macdonald
On 17 Sep 2009, at 15:50, Tommy Nordgren wrote: On 17 sep 2009, at 15.23, steven Hooley wrote: - shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? NSMutableIndexSet *someIndexes = [NSMutableIndexSet indexSet];

Re: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread Roland King
On 17-Sep-2009, at 10:50 PM, Tommy Nordgren wrote: On 17 sep 2009, at 15.23, steven Hooley wrote: - shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? NSMutableIndexSet *someIndexes = [NSMutableIndexSet indexSet];

Re: Catch exception in NSArrayController

2009-09-17 Thread Kyle Sluder
Exceptions are used for programmer error in Cocoa. They are not a general error signaling mechanism. There are a few unfortunate exceptions, though: Distributed Objects and Objective-C++. If you are not using these technologies, you should not be throwing or catching exceptions as a

Re: Catch exception in NSArrayController

2009-09-17 Thread Konrad Windszus
I am throwing it myself (or more exactly a c++ library I call within a get method of the model class). But I don't want to handle the exception in the model class, but rather in the controller, which can then disable some UI buttons. Am 17.09.2009 um 16:41 schrieb Sean McBride: On

Re: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread Corbin Dunn
On Sep 17, 2009, at 6:23 AM, steven Hooley wrote: - shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? Please log a bug. bugreporter.apple.com thanks, corbin ___

Re: Send POST data to browser

2009-09-17 Thread Jerry Krinock
I'm not sure I understand what you want to do, but here's something that has worked for me and may be what you want: Instead of sending the POST using NSURLConnection, you can write a temporary html file. In this html file, you've inserted an onLoad() javascript which immediately sends

Re: Catch exception in NSArrayController

2009-09-17 Thread Kyle Sluder
On Sep 17, 2009, at 8:27 AM, Konrad Windszus konra...@gmx.de wrote: I am throwing it myself (or more exactly a c++ library I call within a get method of the model class). But I don't want to handle the exception in the model class, but rather in the controller, which can then disable some

Re: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness

2009-09-17 Thread steven Hooley
Done. Refrence 7231673. Thanks all. 2009/9/17 Corbin Dunn corb...@apple.com: On Sep 17, 2009, at 6:23 AM, steven Hooley wrote: - shiftIndexesStartingAtIndex:by: and -containsIndexesInRange:NSMakeRange: don't seem to play nicely together.. Is this expected? Please log a bug.

Re: How to create subentity object inheriting from superentity object in core data

2009-09-17 Thread Leon Starr
Thanks, Ben. I hear what you are saying about the draw tool, and, yes, I have played with it extensively. In fact, I fancy myself an ER/ UML/Schema draw tool expert, and I'm afraid, the current Apple draw tool is a nice start, but has a long ways to go before I would consider using it on

Re: NSRunLoop issue

2009-09-17 Thread Jerry Krinock
On 2009 Sep 17, at 07:48, Jean-Daniel Dupas wrote: Add a dummy source (mach port or timer with an insanely high fire date) before running your loop. So you re sure there is at least one source. Please show a few lines of code adding a dummy mach port. One time I tried to do that and

Re: How to create subentity object inheriting from superentity object in core data

2009-09-17 Thread Kyle Sluder
You seem to have mistaken the modeler for a design tool. It's really an implementation tool. There is nothing you can do with Core Data that you can't do with the modeler. There is also nothing you can do with the modeler that you can't do with Core Data (well, besides leave attribute or

Re: +keyPathsForValuesAffectingKey not working for a category-implemented property on a CoreData class

2009-09-17 Thread Quincey Morris
On Sep 17, 2009, at 05:44, Doug Knowles wrote: In a CoreData entity called Topic, I have a to-many relationship (to other Topics) called children to implement a hierarchy. In a category on Topic, I have implemented a property called orderedChildren which returns a sorted array of the

Re: How to create subentity object inheriting from superentity object in core data

2009-09-17 Thread Quincey Morris
On Sep 17, 2009, at 09:21, Leon Starr wrote: But if there is no @property/@dynamic for license in my Truck subclass, (only in the Auto subclasss) I cannot access thisTruck.license without getting a compiler error. Which makes total sense to me since one NSManagedObject subclass (Truck) is

Re: How to create subentity object inheriting from superentity object in core data

2009-09-17 Thread Leon Starr
Not yet, anyway ;) But, yes, I agree with you. As it is, Core Data is purely an implementation tool. And from what I can see so far, an excellent one. - Leon On Sep 17, 2009, at 9:38 , Kyle Sluder wrote: You seem to have mistaken the modeler for a design tool. It's really an

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread David Duncan
On Sep 16, 2009, at 7:13 PM, Matt Neuburg wrote: I guess I wasn't clear. Deployment target is 10.5. Base SDK is 10.5. Runs fine on 10.6 but crashes in Core Animation on 10.5. The question is what *else* I need to change to make it run on 10.5. There are no other required build settings.

Re: How to create subentity object inheriting from superentity object in core data

2009-09-17 Thread Leon Starr
NOW, I get it. Thanks! Problem solved. (I knew you guys were seeing something I wasn't, so I'm glad I persisted - no pun* intended). - Leon *okay, intended On Sep 17, 2009, at 9:49 , Quincey Morris wrote: On Sep 17, 2009, at 09:21, Leon Starr wrote: But if there is no @property/@dynamic

Re: NSRunLoop issue

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 18:28, Jerry Krinock a écrit : On 2009 Sep 17, at 07:48, Jean-Daniel Dupas wrote: Add a dummy source (mach port or timer with an insanely high fire date) before running your loop. So you re sure there is at least one source. Please show a few lines of code adding a

Core Data: strange keypath problem

2009-09-17 Thread Michael Swan
So I am working on a simple Core Data app that can track how much I have made from various apps I sell (right now I just have two iPhone ones I charge for). This is also the app that my Expenses tutorial is based on. I am working on the monthly totals portion again and trying to use

Re: Core Data: strange keypath problem

2009-09-17 Thread Quincey Morris
On Sep 17, 2009, at 10:00, Michael Swan wrote: So I am working on a simple Core Data app that can track how much I have made from various apps I sell (right now I just have two iPhone ones I charge for). This is also the app that my Expenses tutorial is based on. I am working on the

Re: Send POST data to browser

2009-09-17 Thread Jens Alfke
On Sep 17, 2009, at 3:26 AM, Bartosz Białecki wrote: I can launch browser with url using this code: NSURL *url = [NSURL URLWithString: @https://www.example.com/ index.php]; [[UIApplication sharedApplication] openURL: url]; but I don't know how to send post data. You can't do it — the

Re: Not receiving mouseDown/Up events in borderless window . . . (Solved!)

2009-09-17 Thread Michael A. Crawford
Apparently on Leopard (and presumably, early versions of Mac OS X) you have to handle the mouseDown event in order to receive a mouseUp event. Initially, I only overrode mouseUp, thinking that I didn't want to react to the event until the user releases the mouse button inside the NSRect

Re: Send POST data to browser

2009-09-17 Thread glenn andreas
On Sep 17, 2009, at 12:14 PM, Jens Alfke wrote: On Sep 17, 2009, at 3:26 AM, Bartosz Białecki wrote: I can launch browser with url using this code: NSURL *url = [NSURL URLWithString: @https://www.example.com/index.php ]; [[UIApplication sharedApplication] openURL: url]; but I don't know

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread Matt Neuburg
On or about 9/17/09 9:55 AM, thus spake David Duncan david.dun...@apple.com: On Sep 16, 2009, at 7:13 PM, Matt Neuburg wrote: I guess I wasn't clear. Deployment target is 10.5. Base SDK is 10.5. Runs fine on 10.6 but crashes in Core Animation on 10.5. The question is what *else* I need to

Obtaining the application icon

2009-09-17 Thread Andy Bettis
Fellow code monkeys, I'd like to use my application icon in a window and I'd prefer to write something generic and reusable. Is there a simple way of showing the icon in a window? I can see how to get the name of the file from NSBundle and presumably I could manipulate this into an

no mouseDown on dismissing context menu

2009-09-17 Thread Georg Seifert
Hi, If I show a context menu in my view and then click somewhere in the view, mouseDown for the view is not called. Subsequent mouseDragged are triggered. The view returns YES in acceptsFirstMouse and acceptsFirstResponder. What do I miss? Georg

Re: Obtaining the application icon

2009-09-17 Thread Kyle Sluder
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html#//apple_ref/doc/uid/2344-imageNamed_ --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 19:59, Matt Neuburg a écrit : On or about 9/17/09 9:55 AM, thus spake David Duncan david.dun...@apple.com: On Sep 16, 2009, at 7:13 PM, Matt Neuburg wrote: I guess I wasn't clear. Deployment target is 10.5. Base SDK is 10.5. Runs fine on 10.6 but crashes in Core

NSValueTransformer problem with NSTextField update

2009-09-17 Thread Paul Bruneau
Greetings- I have written a subclass of NSValueTransformer which converts an NSString from something like 1-1/2 to an NSNumber with a value of 48 for my model to store (converts inches and fractions to number of 32nds). It also does the reverse transformation. This is working perfectly

Re: Obtaining the application icon

2009-09-17 Thread Jean-Daniel Dupas
An other way is to use - [NSApplication applicationIconImage] Le 17 sept. 2009 à 20:06, Kyle Sluder a écrit : http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html#//apple_ref/doc/uid/2344-imageNamed_ --Kyle

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread David Duncan
On Sep 17, 2009, at 10:59 AM, Matt Neuburg wrote: I'm happy to try to reduce this to a simpler case, but before I do that - I thought that setting the deployment target and base sdk to 10.5 meant that there was *no* such difference? In other words, don't these settings mean, give me 10.5

Re: Obtaining the application icon

2009-09-17 Thread Sean McBride
On 9/17/09 8:17 PM, Jean-Daniel Dupas said: An other way is to use - [NSApplication applicationIconImage] If your app icon is badged then you probably don't want that icon in your alerts. -- Sean McBride, B. Eng

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread Sean McBride
On 9/17/09 11:22 AM, David Duncan said: If that is not so, then clearly in order to develop *for* 10.5 I should be developing *on* 10.5, not on 10.6 (which would be a pity because I'd lose all the tangy Xcode 3.2 goodness...). m. You don't need to develop on 10.5, but you do need to test

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread Jean-Daniel Dupas
Le 17 sept. 2009 à 20:22, David Duncan a écrit : On Sep 17, 2009, at 10:59 AM, Matt Neuburg wrote: I'm happy to try to reduce this to a simpler case, but before I do that - I thought that setting the deployment target and base sdk to 10.5 meant that there was *no* such difference? In

Re: #pragma to suppress a warning message

2009-09-17 Thread Chris Hanson
On Sep 16, 2009, at 6:09 PM, Jay Boyer wrote: Finally, I am doing this because the preferredLanguages method is specified to be an OS 10.5+ method and the project I am working on is being built on the 10.4 SDK. The proper way to set up this project, as you’ve described it, is to build

Re: CAAnimation finished ?

2009-09-17 Thread Matt Neuburg
On Wed, 16 Sep 2009 19:50:39 -0500, Kevin Cathey cat...@apple.com said: For more, see previous posts on the mailing list. Not so easy; searching Apple's archives doesn't retrieve anything after 2005, which sort of makes the search feature unusable. (And Cocoabuilder has issues of its own.) m. --

Re: CAAnimation finished ?

2009-09-17 Thread Jeff Johnson
On Sep 17, 2009, at 1:44 PM, Matt Neuburg wrote: On Wed, 16 Sep 2009 19:50:39 -0500, Kevin Cathey cat...@apple.com said: For more, see previous posts on the mailing list. Not so easy; searching Apple's archives doesn't retrieve anything after 2005, which sort of makes the search feature

Re: no mouseDown on dismissing context menu

2009-09-17 Thread Peter Ammon
On Sep 17, 2009, at 11:03 AM, Georg Seifert wrote: Hi, If I show a context menu in my view and then click somewhere in the view, mouseDown for the view is not called. Subsequent mouseDragged are triggered. The view returns YES in acceptsFirstMouse and acceptsFirstResponder. What do I

Re: settings to build for 10.5 on 10.6?

2009-09-17 Thread David Duncan
On Sep 17, 2009, at 11:33 AM, Jean-Daniel Dupas wrote: Correct me if I'm wrong, but the linked-on-or-after(10.6) test will returns false if you use the 10.5 SDK on Snow Leopard, isn't it ? Linked on or after checks should be tied to the specific SDK you use, so if you link against a 10.5

Menu shortcuts without modifiers?

2009-09-17 Thread Uli Kusterer
Hi, I have an app that contains a QTMovieView. I've set things up so people can use the arrow keys to skip, fast forward, rewind, use space to play/pause etc., as they're used to from other movie-playing apps. Now, I'd like to add menu items that correspond to these actions for people

Re: How to create subentity object inheriting from superentity object in core data

2009-09-17 Thread Ben Trumbull
On Sep 17, 2009, at 9:21 AM, Leon Starr wrote: So, going back to my example, (and the part everyone disagrees with!) I still don't get it. More importantly, my objc compiler doesn't get it! In the model, Auto.license is properly inherited by the Sedan and Truck subentities. No trouble

Reg: outlineView dataSource method outlineView:child:ofItem:

2009-09-17 Thread Sravanthi
Hi, I am using outline view to display a set of entities, here my problem is outlineView:child:ofItem: method is getting called more than once for an item of index X of a particular parent. As each call to outlineView:child:ofItem: is returns a new child with different address, in

Menu item correct size

2009-09-17 Thread Felipe Monteiro de Carvalho
Hello, I would like to make the text in a menu item bold, while maintaining everything else exactly like in other menu items. Reading and searching I managed to find the appropriate routines to do this, but I seam to have found a big problem. NSFont menuFontOfSize with 0 as the font size doesn't

iPhone Pref changes

2009-09-17 Thread Peter Hentges
With screen brightness being a big factor in battery life on my iPhone, I find myself frequently swiping over to the Settings app, accessing the Brightness setting, and adjusting it to suit my current setting and the application I'm planning to use. (Using the camera outside on a sunny day vs.

Optimizing Enormous lists in NSBrowser

2009-09-17 Thread Dave DeLong
Hi everyone, I'm recreating a Finder-like column view fro browsing the disk, and I've come up against some optimization impasses. First off, I'm using passive-loading, so that I only load information regarding an item once I get the browser:willDisplayCell: message. This works

Re: Reg: outlineView dataSource method outlineView:child:ofItem:

2009-09-17 Thread Corbin Dunn
It should ask for a particular child just once, but that is an implementation detail. You should always return the same item, and not a new item. It sounds like you expect the outlineview to retain the objects; however, it does not. You have to manage them in an array (or dictionary).

Re: Menu item correct size

2009-09-17 Thread Peter Ammon
On Sep 17, 2009, at 7:17 AM, Felipe Monteiro de Carvalho wrote: Hello, I would like to make the text in a menu item bold, while maintaining everything else exactly like in other menu items. Reading and searching I managed to find the appropriate routines to do this, but I seam to have found a

click on sub-menu's super-item dismisses menu?

2009-09-17 Thread David M. Cotter
say the user say clicks the file menu, the file menu opens then say they hover over recent items and then clicks it (i don't know, out of habit or something) in carbon, this click is ignored, rightfully it seems in cocoa, it dismisses the menu. is there a way i can tell the menu or menu

basic threading question: if parent thread completes

2009-09-17 Thread Nick Rogers
Hi, I need to know this before going in for changes that are too complex. I spawned a thread from AppController (thread1). From thread1, I spawn another thread2. thread1 completes. Will thread2 terminate, give rise to anything else, or just keep on working usually? Wishes, Nick

Re: click on sub-menu's super-item dismisses menu?

2009-09-17 Thread Peter Ammon
On Sep 17, 2009, at 3:09 PM, David M. Cotter wrote: say the user say clicks the file menu, the file menu opens then say they hover over recent items and then clicks it (i don't know, out of habit or something) in carbon, this click is ignored, rightfully it seems in cocoa, it dismisses

Re: basic threading question: if parent thread completes

2009-09-17 Thread Stephen J. Butler
On Thu, Sep 17, 2009 at 5:23 PM, Nick Rogers roger...@mac.com wrote: Hi, I need to know this before going in for changes that are too complex. I spawned a thread from AppController (thread1). From thread1, I spawn another thread2. thread1 completes. Will thread2 terminate, give rise to

Re: click on sub-menu's super-item dismisses menu?

2009-09-17 Thread David M. Cotter
that was a theoretical example, here's a concrete one: in Finder, which we all know is a Cocoa64 app, select a file and go file-open with -- the menu disappears now in XCode (also Cocoa64) go file-open recent -- menu does NOT disappear but thanks, that did the trick On Sep 17, 2009, at

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread David M. Cotter
i really am stuck on this, i've googled and searched the apple site but can find nothing on this. if anyone has any clue i would be most siked. bouns: free karaoke app for someone who solves this! -dave On Sep 16, 2009, at 10:54 AM, David M. Cotter wrote: when i try to set a breakpoint

Re: click on sub-menu's super-item dismisses menu?

2009-09-17 Thread Kyle Sluder
On Thu, Sep 17, 2009 at 3:38 PM, David M. Cotter m...@davecotter.com wrote: in Finder, which we all know is a Cocoa64 app, select a file and go file-open with -- the menu disappears I've noticed this too. File a bug against Finder: http://bugreport.apple.com --Kyle Sluder

Re: basic threading question: if parent thread completes

2009-09-17 Thread Jean-Daniel Dupas
Le 18 sept. 2009 à 00:32, Stephen J. Butler a écrit : On Thu, Sep 17, 2009 at 5:23 PM, Nick Rogers roger...@mac.com wrote: Hi, I need to know this before going in for changes that are too complex. I spawned a thread from AppController (thread1). From thread1, I spawn another thread2. thread1

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread Randall Meadows
On Sep 17, 2009, at 4:39 PM, David M. Cotter wrote: i really am stuck on this, i've googled and searched the apple site but can find nothing on this. if anyone has any clue i would be most siked. bouns: free karaoke app for someone who solves this! -dave On Sep 16, 2009, at 10:54 AM,

Re: Shutdown/Restart computer

2009-09-17 Thread Heizer, Charles
I use a variation of this... http://developer.apple.com/mac/library/qa/qa2001/qa1134.html On Sep 14, 2009, at 5:59 PM, PCWiz wrote: How would I shut down and restart the computer using Objective-C code? Thanks ___ Cocoa-dev mailing list

[SOLVED] Re: Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];

2009-09-17 Thread Iceberg-Dev
Using - (void) textViewDidChangeSelection:(NSNotification *) inNotification instead. Works fine. On Sep 14, 2009, at 11:53 PM, Iceberg-Dev wrote: I'm currently trying to match braces in a text editor and intend to use selectionRangeForProposedRange:granularity: for that. While I don't see

Re: Menu item correct size

2009-09-17 Thread Felipe Monteiro de Carvalho
Hello, The most reliable way is to ask the menu for its font, via the -[NSMenu font] method. Thanks, but this method was introduced in Mac OS X 10.6 Is there any solution which works in 10.4? -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing

Bindings and C arrays

2009-09-17 Thread Chase Meadors
Hi All, My question is quite simple, actually. Is there any way to use bindings with C arrays? I have someone else's code I'm working with here, and it uses a BOOL[] array to manage a long array of states. I don't imagine that there's any way to make bindings work with this kind of

Re: Bindings and C arrays

2009-09-17 Thread Kyle Sluder
On Thu, Sep 17, 2009 at 5:20 PM, Chase Meadors c.ed.m...@gmail.com wrote: My question is quite simple, actually. Is there any way to use bindings with C arrays? Since you don't bind to an array, but rather to a property of an object, there's no reason why not. Implement a property with the KVC

Threading and NSPort retain count question

2009-09-17 Thread James Walker
In the Threading Programming Guide, I'm trying to understand the discussion of communicating between threads using run loops and NSMachPort objects. (Before someone asks why I'm not looking at an easier way to pass messages between threads: I need to run on Tiger.) I'm confused about a retain

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread David M. Cotter
okay i can set a breakpoint now it always breaks when i am setting it to YES but never breaks any other time. ie: the document is definitely being set to edited, and NEVER being set to not edited but the red dot never draws in the window are there any kind of window classes / types / styles

Re: Menu item correct size

2009-09-17 Thread Felipe Monteiro de Carvalho
Thanks a lot. That's what I imagined, but I wanted some confirmation =) -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
I need to find the iTunes Music Library.xml file, which I know to be in the iTunes music folder under the iTunes directory. Is there an API call to get the user's Music folder? I realize iTunes allows you to specify another location for the music folder, so perhaps I need to ask iTunes for

Re: SOLVED Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
Sigh, sorry. I looked at NSSearchPathForDirectoriesInDomains() and dismissed it without looking more closely. That's what I needed. Sorry for the noise. On Sep 17, 2009, at 18:52:28, Rick Mann wrote: I need to find the iTunes Music Library.xml file, which I know to be in the iTunes music

Re: NSInvocation or NSTimer with an arg

2009-09-17 Thread Hank Heijink (Mailinglists)
Sounds to me like you might want to rethink your design. You haven't told me what you're trying to achieve with all your timers, but if you're updating some value in the cell based on its timer, why not have just one timer that updates all the values? If the timer is specific to its very

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread David M. Cotter
On 18/09/2009, at 11:37 AM, David M. Cotter wrote: is there such a thing as a normal window that has a very small title bar? Hi David, No, I think you'll need to roll your own. You can get the images for the close button etc by doing something like: [NSWindow

re: Core Data: strange keypath problem

2009-09-17 Thread Ben Trumbull
Here is the console output: 2009-09-17 12:44:17.659 myAppSales[11094:a0f] Application DMXRef: janTotal starting... 2009-09-17 12:44:17.660 myAppSales[11094:a0f] Application DMXRef: janTotal predicates set. 2009-09-17 12:44:17.662 myAppSales[11094:a0f] anotherArray count = 117 2009-09-17

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread Kyle Sluder
On Thu, Sep 17, 2009 at 7:08 PM, David M. Cotter m...@davecotter.com wrote: in the Carbon version of the very same app, i see this: Why do you want to do this? This is incredibly confusing. Documents don't have small titlebars. --Kyle Sluder ___

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread David M. Cotter
in the Carbon version of the very same app, i see this: Why do you want to do this? This is incredibly confusing. Documents don't have small titlebars. I'm just the engineer tasked with implementing this. Just about all of the Adobe CS5 applications are going to do it this way. they

Making a new ICNS file with NSImage

2009-09-17 Thread Squ Aire
Introduction: I have an actual ICNS file with some nice icon in it. No matter where I draw it within my app, be it a 16x16 square or a 512x512 square, it draws nicely, scales properly, looks crisp at all times. It does this probably (among other things) by using the correct representation

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask, false); error: 'NSMusicDirectory' was not declared in this scope What do I need to do to get

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread Kyle Sluder
On Sep 17, 2009, at 7:46 PM, David M. Cotter m...@davecotter.com wrote: I'm just the engineer tasked with implementing this. Just about all of the Adobe CS5 applications are going to do it this way. they all use a single mini-window to encompass the entire app, which serves as the

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Michael Babin
On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask, false); error: 'NSMusicDirectory' was not declared in

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
On Sep 17, 2009, at 20:15:43, Michael Babin wrote: On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask,

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Steve Christensen
On Sep 17, 2009, at 8:18 PM, Rick Mann wrote: On Sep 17, 2009, at 20:15:43, Michael Babin wrote: On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths =

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread Jesper Storm Bache
On Sep 17, 2009, at 8:03 PM, Kyle Sluder wrote: On Sep 17, 2009, at 7:46 PM, David M. Cotter m...@davecotter.com wrote: you're not going to get Adobe to turn their ship around. We did it in CS4 for a few apps without issue and nobody was confused, let alone incredibly. Count me among

Re: Making a new ICNS file with NSImage

2009-09-17 Thread Ken Ferry
Hi Squ, I would recommend subclassing NSImageRep to do this. The new rep subclass should retain the original image and draw it slightly inset. It's very similar to subclassing NSView. It looks something like this: @interface MarginalImageRep : NSImageRep { NSImage *_baseImage;

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Graham Cox
On 18/09/2009, at 11:52 AM, Rick Mann wrote: I realize iTunes allows you to specify another location for the music folder, so perhaps I need to ask iTunes for it directly, but for the time being finding the Music folder is a good start. It's also pretty common to relocate it - don't

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread Kyle Sluder
On Sep 17, 2009, at 9:15 PM, Jesper Storm Bache jsba...@adobe.com wrote: With regards to floating UI, I have had issues where the button highlight on my main window dims when I put focus on a UI panel. This is not how Carbon works, and in my opinion it makes it harder to quickly see which

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
For sure, and we will be. I suspect one can ask iTunes via an AppleEvent, but looking at the prefs is not a bad suggestion. I just needed a reasonable solution that was easy to get to in the meantime. Thanks. On Sep 17, 2009, at 21:32:00, Graham Cox wrote: On 18/09/2009, at 11:52 AM,

Re: NSString vs. encoding

2009-09-17 Thread Andrew Farmer
On 16 Sep 2009, at 22:55, Johan Kool wrote: Thanks so much!! That is indeed the case! I now use strunvis and it's all done in just 4 lines of code. (Well, except that I should still handle a returned error code.) int len = [stringA lengthOfBytesUsingEncoding:NSUTF8StringEncoding];

Re: Making a new ICNS file with NSImage

2009-09-17 Thread Andrew Farmer
On 17 Sep 2009, at 19:39, Squ Aire wrote: My problem is this: I want to derive a new icon file (simulated by an NSImage somehow) which has some margins applied to it. The margins on each side should be the size of the area being drawn on divided by 100. So for instance, if we are drawing