Re: Chapter 6 Challenge Help!

2008-07-16 Thread publictom
Hi Eric, everything correct so far (datasource, IBAction). You have to write some methods for the NSTableDataSource protocol. Here is what worked for me: // // AppController.h // ToDoList // // Created by Tom on 04.07.08. // Copyright 2008 __MyCompanyName__. All rights reserved. // #impor

Re: Memory Allocation

2008-07-16 Thread Alexandre Badez
On Wed, Jul 16, 2008 at 21:56, Gary L. Wade <[EMAIL PROTECTED]> wrote: > You mentioned you launched your application with ObjectAlloc; launch it > instead with MallocDebug and do your testings with the Leaks option to check > for memory leaks. It will show you an execution path so you can determ

[Moderator] iPhone SDK is still under NDA - Do not discuss here

2008-07-16 Thread Cocoa-Dev Admins
iPhone SDK -- Until an announcement is made otherwise, developers should be aware that the iPhone SDK is still under non-disclosure (section 5.3 of the iPhone Development Agreement). It can't be discussed here, or anywhere publicly. This includes other mailing lists, forums, and def

[Moderator] Re: alternative to flash

2008-07-16 Thread Scott Anguish
On 16-Jul-08, at 10:35 PM, Chris Cooley wrote: On Jul 16, 2008, at 6:54 PM, Kyle Sluder wrote: On Wed, Jul 16, 2008 at 7:13 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote: But I didn't see an iphone-dev mailing list. Apple said creating an NDA-covered discussion area was moot because the iPh

examining images

2008-07-16 Thread Duncan Campbell
ok, this is going to be one of the weirder questions: I'm writing an application that is designed to scan images of people's eyes. Among other things, app needs to look at things like the color , shape, amount of redness, size of pupil etc. I'm looking for some pointers towards any sample c

Re: notification when app is moved

2008-07-16 Thread Michael Ash
On Wed, Jul 16, 2008 at 9:08 PM, Mitchell Livingston <[EMAIL PROTECTED]> wrote: > Hello, > > I have code that must know where a folder inside the Resources folder of the > application is. This location must be updated whenever the app is moved to > another location. Is there some sort of callback I

Re: mdbackup binary plist files

2008-07-16 Thread Michael Ash
On Wed, Jul 16, 2008 at 11:15 PM, Ryan Chapman <[EMAIL PROTECTED]> wrote: > Hopefully there is someone here who knows something about binary plist > files. When an iPhone's firmware is upgraded in iTunes, a framework called > MobileSync creates a backup of the iPhone's data files. The backup is >

Re: notification when app is moved

2008-07-16 Thread Omar Qazi
On Jul 16, 2008, at 8:28 PM, Mitchell Livingston wrote: But if the app is moved, the string that was previously returned from the call is no longer valid. So... call it again. You can do this whenever the user starts your application, or when the call returns an error saying that it can't

Re: Getting the keyEquivalent as a string

2008-07-16 Thread Markus Spoettl
On Jul 16, 2008, at 8:21 PM, Ken Ferry wrote: I don't think there is anything that makes it easy to draw a visual representation of a key equivalent. There's a bug for it, (not that you can see that). You can probably crib code from . Thanks Ken. Markus

Chapter 6 Challenge Help!

2008-07-16 Thread Eric Lee
First of all, I'm' new to cocoa, so I'm a beginner that just started. I'm trying to make the To-Do list on Chapter 6 from Aaron's new book, Cocoa Programming for Mac OS X Third Edition. I've made an NSMutableArray, set the data source of the NSTableView to AppController, made an IBACTION an

Re: notification when app is moved

2008-07-16 Thread Mitchell Livingston
I need the full path, yes. I know I can get it using NSBundle. But if the app is moved, the string that was previously returned from the call is no longer valid. I need to pass the location to a c library and reset the location in this library when the application is movedhttp://www.me.com/my/m

Re: Getting the keyEquivalent as a string

2008-07-16 Thread Ken Ferry
Hi Markus, I don't think there is anything that makes it easy to draw a visual representation of a key equivalent. There's a bug for it, (not that you can see that). You can probably crib code from . -Ken On Wed, Jul 16, 2008 at 7:46 PM, Markus Spoettl <[E

mdbackup binary plist files

2008-07-16 Thread Ryan Chapman
Hopefully there is someone here who knows something about binary plist files. When an iPhone's firmware is upgraded in iTunes, a framework called MobileSync creates a backup of the iPhone's data files. The backup is stored in .mdbackup files, in ~/Library/Application Support/MobileSync// I've fou

Challenge Chapter 6 help!

2008-07-16 Thread Eric Lee
First of all, I'm' new to cocoa, so I'm a beginner that just started. I'm trying to make the To-Do list on Chapter 6 from Aaron's new book, Cocoa Programming for Mac OS X Third Edition. I've made an NSMutableArray, set the data source of the NSTableView to AppController, made an IBACTION an

Re: alternative to flash

2008-07-16 Thread Alex Curylo
On 16-Jul-08, at 7:33 PM, [EMAIL PROTECTED] wrote: If there's no Flash on the iphone, And we all can daily sing hosannas of praise for that! I'm just looking to go to a URL and an animation fills the screen and is playing, no quicktime control bar or anything and preferably vector graphi

Re: alternative to flash

2008-07-16 Thread Bill Bumgarner
On Jul 16, 2008, at 7:35 PM, Chris Cooley wrote: On Jul 16, 2008, at 6:54 PM, Kyle Sluder wrote: On Wed, Jul 16, 2008 at 7:13 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote: But I didn't see an iphone-dev mailing list. Apple said creating an NDA-covered discussion area was moot because the iPh

Getting the keyEquivalent as a string

2008-07-16 Thread Markus Spoettl
Hi List, I'll probably going to regret asking this but despite extensive Googling and documentation reading I couldn't find out if there's a framework function to get a NSMenuItem's keyEquivalent + keyEquivalentModifierMask as printable text (the way it's drawn in a menu item). Obviousl

Re: alternative to flash

2008-07-16 Thread Omar Qazi
On Jul 16, 2008, at 7:35 PM, Chris Cooley wrote: Apple said creating an NDA-covered discussion area was moot because the iPhone NDA would be ending July 11, 2008. No they didn't. As far as I know it's still in effect, even though the software has been released to the public the SDK hasn't.

Re: notification when app is moved

2008-07-16 Thread Omar Qazi
On Jul 16, 2008, at 6:08 PM, Mitchell Livingston wrote: I have code that must know where a folder inside the Resources folder of the application is. This location must be updated whenever the app is moved to another location. Is there some sort of callback I can register to receive for thi

Re: alternative to flash

2008-07-16 Thread Chris Cooley
On Jul 16, 2008, at 6:54 PM, Kyle Sluder wrote: On Wed, Jul 16, 2008 at 7:13 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote: But I didn't see an iphone-dev mailing list. Apple said creating an NDA-covered discussion area was moot because the iPhone NDA would be ending July 11, 2008. Anyway,

Re: notification when app is moved

2008-07-16 Thread Omar Qazi
On Jul 16, 2008, at 6:08 PM, Mitchell Livingston wrote: I have code that must know where a folder inside the Resources folder of the application is. This location must be updated whenever the app is moved to another location. Is there some sort of callback I can register to receive for thi

Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?

2008-07-16 Thread Chris Hanson
On Jul 16, 2008, at 2:15 PM, Rick Mann wrote: I have a class D that derives from class S. S derives from NSObject. Do I need to declare D as: @interface D : S or can I leave off the for the derived classes, and still get appropriate warnings? You can leave off the for derived c

Re: notification when app is moved

2008-07-16 Thread Brett Powley
I have code that must know where a folder inside the Resources folder of the application is. This location must be updated whenever the app is moved to another location. Is there some sort of callback I can register to receive for this? [[NSBundle mainBundle] resourcePath] will

Re: NSOutlineView force expansion/refresh?

2008-07-16 Thread Markus Spoettl
On Jul 16, 2008, at 3:22 PM, Michael Hanna wrote: I'm using observeValueForKeyPath:ofObject:change:context: to detect when a change occurs in my data model. When a non-leaf node gets added, the outline view draws the new item, but in an unexpanded state. I try this code: [m_rulesOutlineView n

notification when app is moved

2008-07-16 Thread Mitchell Livingston
Hello, I have code that must know where a folder inside the Resources folder of the application is. This location must be updated whenever the app is moved to another location. Is there some sort of callback I can register to receive for this? Thanks, Mitchell Livingston _

Re: Sorting a to-many relationship property

2008-07-16 Thread Rick Mann
On Jul 16, 2008, at 17:51:30, I. Savant wrote: You'll need to sort them yourself after you get them if you're directly getting them via -valueForKeyPath: since there's no way to specify a sort descriptor at that time. NSArray conveniently has a method for exactly that purpose. I realiz

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-16 Thread Rick Mann
On Jul 16, 2008, at 16:23:23, David Duncan wrote: Can't really say what you are or are not seeing here, I'd probably have to see code. If this is critical, I'd recommend filing a DTS incident. I'm happy to send you my code. It's not critical, in that I can find other ways to do what I w

Re: Sorting a to-many relationship property

2008-07-16 Thread I. Savant
But they come back in whatever order Core Data has for them. I'd really like for all requests for Foo.bars to come back sorted by a property of Bar. Is this possible? Or must I either create a new property that sorts them, or just sort them after I get them? You'll need to sort them yours

[Moderator] Re: alternative to flash

2008-07-16 Thread Scott Anguish
iPhone Development can't be discussed here. The NDA is still in effect. On 16-Jul-08, at 7:13 PM, Bob Sabiston wrote: Hi, If there's no Flash on the iphone, is there a good replacement in terms of vector graphic animation? Ideally the same file would play in a PC/Mac browser as well. I

Sorting a to-many relationship property

2008-07-16 Thread Rick Mann
I have a couple entities related by a to-many relationship. Entity Foo can have 0..N of Entity Bar. I have a relationship defined on Foo named "bars". In my code, I build a comma-delimited string of Bars by iterating over the NSArray* returned by Foo.bars. But they come back in whatever ord

Re: MobileMe upload file to iDisk

2008-07-16 Thread Nick Zitzmann
On Jul 16, 2008, at 6:15 PM, Alexander Cohen wrote: Is it possible to use a DAV library to to get folder listings, upload and download files to my home (private) section of my MobileMe iDisk. Of course it's possible, but you'll have to use a framework to do everything except downloading

Re: MobileMe upload file to iDisk

2008-07-16 Thread Alexander Cohen
On Jul 16, 2008, at 6:08 PM, Nick Zitzmann wrote: On Jul 16, 2008, at 3:16 PM, Alexander Cohen wrote: Is there an API that can be used to transfer files to a MobileMe iDisk? Yes, but as others have mentioned, the DotMacKit framework hasn't been updated in years, is obsolete, and I will

Re: alternative to flash

2008-07-16 Thread Kyle Sluder
On Wed, Jul 16, 2008 at 7:13 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote: > But I didn't see an iphone-dev mailing list. iPhone. NDA. Anyway, look into SVG for Flash-less animation. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Type Select Causes Crash ...

2008-07-16 Thread I. Savant
List: I have a table view that uses the NSTableDataSource protocol (you *do* remember that, don't you? :-) ). I have the standard data source methods provided (count/obj value/set obj value) and all works well. All except one thing. I was trying out the whole type select thing, marvel

Re: Duplicate rows appearing in outlineview after creating new Entity in moc, why?

2008-07-16 Thread Sean McBride
Jon, Thanks for your reply. My fetch predicate was already "parent == nil". I have narrowed this down to the fact that my treecontroller has its 'contentSet' binding set. If I remove that binding, duplicates no longer appear. I have created a very simple test app to illustrate:

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-16 Thread David Duncan
On Jul 15, 2008, at 10:42 PM, Rick Mann wrote: However, at the time that my drawing code is called, the CGContextRef that's handed to me is NOT scaled. So my drawing is done small, and then only scaled afterward by some blit operation. The result is very pixilated lines. If you are dealin

Re: Attributed string to an Image without window

2008-07-16 Thread Brett Powley
You don't have to have a window or a view to draw: you can draw directly to an image using [NSImage lockFocus]. On 17/07/2008, at 2:59 AM, Nethan Aryan wrote: Hello All, Need your help... I have to write a command line utility which will create an image from another source image by addin

alternative to flash

2008-07-16 Thread Bob Sabiston
Hi, If there's no Flash on the iphone, is there a good replacement in terms of vector graphic animation? Ideally the same file would play in a PC/Mac browser as well. I'm just looking to go to a URL and an animation fills the screen and is playing, no quicktime control bar or anything

Re: Memory Allocation

2008-07-16 Thread Michael Ash
On Wed, Jul 16, 2008 at 6:21 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2008 at 2:19 PM, Michael Ash <[EMAIL PROTECTED]> wrote: >> On Wed, Jul 16, 2008 at 2:38 PM, Kyle Sluder >> <[EMAIL PROTECTED]> wrote: >>> On Wed, Jul 16, 2008 at 2:02 PM, Alexandre Badez >>> <[EMAIL PROTECT

NSOutlineView force expansion/refresh?

2008-07-16 Thread Michael Hanna
I'm using observeValueForKeyPath:ofObject:change:context: to detect when a change occurs in my data model. When a non-leaf node gets added, the outline view draws the new item, but in an unexpanded state. I try this code: [m_rulesOutlineView noteNumberOfRowsChanged]; // expand all it

Re: Mini Popup Window (Like iCal) SOLVED

2008-07-16 Thread Seth Willits
On Jul 10, 2008, at 3:39 PM, Markus Spoettl wrote: Don't know but it appears a thin border is added to the content view automatically - at least that is what I see in my own version. I was hoping that works for overlay windows as well, but I wasn't sure. I see now that it is. On 10.5 th

Re: Memory Allocation

2008-07-16 Thread Shawn Erickson
On Wed, Jul 16, 2008 at 2:19 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2008 at 2:38 PM, Kyle Sluder > <[EMAIL PROTECTED]> wrote: >> On Wed, Jul 16, 2008 at 2:02 PM, Alexandre Badez >> <[EMAIL PROTECTED]> wrote: >>> -(id)init >>> { >>>if (![super init]) >>>return nil;

Re: MobileMe upload file to iDisk

2008-07-16 Thread Eric Crichlow
Yes, a .Mac SDK exists that allows apps to integrate with .Mac, and I think the SDK is still compatible with the move to MobileMe. Look here: http://developer.apple.com/sdk/ Scroll down a bit. It hasn't been updated in a while. ...Eric... This messa

Re: MobileMe upload file to iDisk

2008-07-16 Thread Nick Zitzmann
On Jul 16, 2008, at 3:16 PM, Alexander Cohen wrote: Is there an API that can be used to transfer files to a MobileMe iDisk? Yes, but as others have mentioned, the DotMacKit framework hasn't been updated in years, is obsolete, and I will be surprised if it ever gets updated. You can stil

Re: MobileMe upload file to iDisk

2008-07-16 Thread Alexander Cohen
Does it support WebDAV? AC On Jul 16, 2008, at 5:21 PM, glenn andreas wrote: On Jul 16, 2008, at 4:16 PM, Alexander Cohen wrote: Is there an API that can be used to transfer files to a MobileMe iDisk? thx There use to be - the "dot Mac" SDK provided that sort of thing. There is eve

Re: Memory Allocation

2008-07-16 Thread Quincey Morris
On Jul 16, 2008, at 14:19, Michael Ash wrote: Can you explain this, in particular how the "standard" initializer sets you up for fewer seriously subtle errors than this one? It seems to me that the possible return values from the [super init] call can be broken into three categories: A) self B

Re: NSButton setKeyEquivalent doesn't seem to work

2008-07-16 Thread Matt Neuburg
On Wed, 16 Jul 2008 17:12:31 -0400, Brian Hughes <[EMAIL PROTECTED]> said: > >I want the default button to reflect where the user has decided to enter information. I have a sign up / log in page. If the user is new and is signing up I want the signUp button to be the default but if the user is al

Re: Handling key equivalents in a controller class?

2008-07-16 Thread Matt Neuburg
On Wed, 16 Jul 2008 10:05:52 -0700, Jens Alfke <[EMAIL PROTECTED]> said: >I've run into this problem a few times now: I have an >NSWindowController subclass that manages a window. I want to handle >certain hot-keys in this window, for example Esc to exit full-screen >mode, or maybe use letter keys

Re: IBPlugin cannot load

2008-07-16 Thread Anders Lassen
Hi Ricky, Thanks for the link to the sample code. My classdescription file is named correct. My custom class is MyControlsView. After having downloaded and compiled the sample project, I experience the same problems when using my own plugin - "sigh". The problem is that I cannot figure

Re: NSButton alternate image problem - not redrawing

2008-07-16 Thread P Teeson
On 16-Jul-08, at 1:03 PM, Gary L. Wade wrote: Mac OS X Tiger 10.4.11, Xcode 2.5, G4 867mhz I am making a Cocoa Application kids game using NSButtons. They are of behaviour Toggle and of type Square Button and the icon position is centred (i.e. no title) and each button has a unique tag and is e

Re: NSButton setKeyEquivalent doesn't seem to work

2008-07-16 Thread Randall Meadows
On Jul 16, 2008, at 3:12 PM, Brian Hughes wrote: I want the default button to reflect where the user has decided to enter information. I have a sign up / log in page. If the user is new and is signing up I want the signUp button to be the default but if the user is already signed up and e

Re: MobileMe upload file to iDisk

2008-07-16 Thread glenn andreas
On Jul 16, 2008, at 4:16 PM, Alexander Cohen wrote: Is there an API that can be used to transfer files to a MobileMe iDisk? thx There use to be - the "dot Mac" SDK provided that sort of thing. There is even a mailing list about it (though it's all but dead now-a- days) There is yet

Re: Memory Allocation

2008-07-16 Thread Michael Ash
On Wed, Jul 16, 2008 at 2:38 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2008 at 2:02 PM, Alexandre Badez > <[EMAIL PROTECTED]> wrote: >> -(id)init >> { >>if (![super init]) >>return nil; > > You must always assign self to the result of [super init]. If anyone > (*coug

Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?

2008-07-16 Thread Rick Mann
On Jul 16, 2008, at 14:15:45, Rick Mann wrote: I have a class D that derives from class S. S derives from NSObject. Do I need to declare D as: @interface D : S or can I leave off the for the derived classes, and still get appropriate warnings? I think I answered my own question

MobileMe upload file to iDisk

2008-07-16 Thread Alexander Cohen
Is there an API that can be used to transfer files to a MobileMe iDisk? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)l

[Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?

2008-07-16 Thread Rick Mann
I have a class D that derives from class S. S derives from NSObject. Do I need to declare D as: @interface D : S or can I leave off the for the derived classes, and still get appropriate warnings? TIA, -- Rick ___ Cocoa-dev mailing lis

NSButton setKeyEquivalent doesn't seem to work

2008-07-16 Thread Brian Hughes
I want the default button to reflect where the user has decided to enter information. I have a sign up / log in page. If the user is new and is signing up I want the signUp button to be the default but if the user is already signed up and elects to use the log in field I want the logIn button

Re: Attributed string to an Image without window

2008-07-16 Thread j o a r
On Jul 16, 2008, at 9:59 AM, Nethan Aryan wrote: I have to write a command line utility which will create an image from another source image by adding some attributed text onto the source image. Before thinking about how you would implement this, you should read about the concept of "da

Attributed string to an Image without window

2008-07-16 Thread Nethan Aryan
Hello All, Need your help... I have to write a command line utility which will create an image from another source image by adding some attributed text onto the source image. Can you suggest how to do it? If I had to write same application with UI, then I think I would have used a view on a wi

[MEET] : LA CocoaHeads : 7/17/08 7:30pm

2008-07-16 Thread Rob Ross
Howdy LA CocoaHeads! We will be meeting this Thursday, 7/17/08 at 7:30pm. Kolja Wawrowsky will be giving a presentation on the research and software development he is doing. The title of his presentation is: "Where art meets science. Visualization software for the life sciences." We'll also

Re: IBPlugin cannot load

2008-07-16 Thread Anders Lassen
Hi, The answers to the questions are: 1) In the ibplugin folder under Contents/MacOS folder there is one file "MyControls" (no extension) 2) i386 3) i386 ppc ppc64 ppc7400 ppc970 x86_64 (Valid Architectures) On Jul 16, 2008, at 9:14 PM, Kevin Cathey wrote: Hey Anders, A few more thin

Re: IBPlugin cannot load

2008-07-16 Thread Ricky Sharp
On Jul 16, 2008, at 2:44 PM, Anders Lassen wrote: The answers to your questions are: 1) Principals Class name is: "MyControls". That is also the name of the IBPlugin class. 2) I only have one class description file, that is "MyControlsView.classdescription". Note that I have only one cus

Re: Memory Allocation

2008-07-16 Thread Gary L. Wade
You mentioned you launched your application with ObjectAlloc; launch it instead with MallocDebug and do your testings with the Leaks option to check for memory leaks. It will show you an execution path so you can determine where the allocation originated that is leaking. >On Wed, Jul 16, 2008

Re: IBPlugin cannot load

2008-07-16 Thread Anders Lassen
Hi Kevin, The answers to your questions are: 1) Principals Class name is: "MyControls". That is also the name of the IBPlugin class. 2) I only have one class description file, that is "MyControlsView.classdescription". Note that I have only one custom object, so I guess this is ok. 3)

Re: Relaunch Finder (without AppleScript)

2008-07-16 Thread Nick Zitzmann
On Jul 16, 2008, at 1:25 PM, Piero Avola wrote: Maybe I shoul explain why I don't want to use NSAppleScript. Everytime I use an initializer of the class, my app crashs! What's the stack trace? Are you using GC? I believe NSAppleScript at one point caused crashes under GC; I don't know if

Re: Memory Allocation

2008-07-16 Thread Alexandre Badez
On Wed, Jul 16, 2008 at 20:38, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2008 at 2:02 PM, Alexandre Badez > <[EMAIL PROTECTED]> wrote: >> -(id)init >> { >>if (![super init]) >>return nil; > > You must always assign self to the result of [super init]. If anyone > (*cough*

Re: Mystery Thread - how to debug

2008-07-16 Thread Ken Thomases
On Jul 15, 2008, at 3:28 PM, James Bucanek wrote: I've got another thread -- which I'll refer to as the "mystery thread" -- that is stuck in a spinlock. The sample looks like this: 7464 Thread_2a03 7464 thread_start 7464 _pthread_start 7464 __NSThread__main__

Re: Relaunch Finder (without AppleScript)

2008-07-16 Thread Piero Avola
Maybe I shoul explain why I don't want to use NSAppleScript. Everytime I use an initializer of the class, my app crashs! Debugger: =shlibs-removed,shlib-info=[num="100",name="EyeTV MPEG Support",kind="-",dyld-addr="0xcf7b000",reason="dyld",requested- state="E",state="E",path="/Library/QuickT

CGWindowListCreateImage - Offscreen?

2008-07-16 Thread Seth Willits
Does CGWindowListCreateImage not work on offscreen windows? I can't seem to get an image of my window without putting it onscreen. -- Seth Willits ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: how to measure an attributedString or string with attributes

2008-07-16 Thread Nick Zitzmann
On Jul 16, 2008, at 6:18 AM, norio wrote: I think QuickTime API had an api for measuring the width and the height of an attributed string. If width was passed as an argument, the height was returned. And if height, returned its width. Is there any ways to get such information? For some

Re: Handling key equivalents in a controller class?

2008-07-16 Thread Jeff Johnson
On Jul 16, 2008, at 1:43 PM, Kyle Sluder wrote: On Wed, Jul 16, 2008 at 2:00 PM, Jeff Johnson <[EMAIL PROTECTED]> wrote: NSWindow is an NSResponder, so you could create an NSWindow subclass and override performKeyEquivalent: or keyDown: there. Except what happens if a field editor is key?

Re: Setting Core Data attribute values to related entity attribute values

2008-07-16 Thread Hamish Allan
On Wed, Jul 16, 2008 at 5:12 PM, Jamie Phelps <[EMAIL PROTECTED]> wrote: > I have a Core Data entity in a Master-Detail view. In the detail view, I > have a button that is bound to the createFoo: method of the selected object > where Foo is the class name of the related entity. What I want to do i

Re: KVO notifications and threads

2008-07-16 Thread Hamish Allan
On Tue, Jul 15, 2008 at 7:45 PM, Jerry Isdale <[EMAIL PROTECTED]> wrote: > Means we have at least three copies of the data shuffling around memory, but > hey thats why we buy machines with 2-4 Gb of ram. If you've got such a large amount of data, it seems unlikely you'd want to be updating it all

Re: Handling key equivalents in a controller class?

2008-07-16 Thread Kyle Sluder
On Wed, Jul 16, 2008 at 2:00 PM, Jeff Johnson <[EMAIL PROTECTED]> wrote: > NSWindow is an NSResponder, so you could create an NSWindow subclass and > override performKeyEquivalent: or keyDown: there. Except what happens if a field editor is key? Then the editor swallows all keys, including Esc.

Re: Memory Allocation

2008-07-16 Thread Kyle Sluder
On Wed, Jul 16, 2008 at 2:02 PM, Alexandre Badez <[EMAIL PROTECTED]> wrote: > -(id)init > { >if (![super init]) >return nil; You must always assign self to the result of [super init]. If anyone (*cough* Wil Shipley *cough*) tells you otherwise, they may inadvertently set you up for so

CALayer glitch: move one sublayer, add/remove another

2008-07-16 Thread Dave Hayden
Just wanted to see if this is expected behavior, and if there's a workaround. When I add or remove one sublayer and change another's position in the same transaction, the moved layer leaves a "ghost" image that fades away at the start position. If I wrap the two actions in CATransaction beg

Re: UITextView for the iphone that will auto-detect URLs

2008-07-16 Thread Mike Abdullah
Well I know nothing of this phone of which you speak, but with a WebView object, I would use one of its many delegate methods to intercept the NSURLRequest from the user clicking a link and instead redirect it to open in the user's browser. Mike. On 16 Jul 2008, at 18:43, Andrew Arrow wrot

Memory Allocation

2008-07-16 Thread Alexandre Badez
Hy, I'm an early beginner in Objectiv-C and Cocoa, and for learning I'm actualy reading "Cocoa Programming for Mac OS X" (Third Edition). In chapter 5, I've made the challenge (a dialog box that count the lenght of the text field and display the result). For curiosity purpose, I launched my app

Re: Handling key equivalents in a controller class?

2008-07-16 Thread Jeff Johnson
On Jul 16, 2008, at 12:05 PM, Jens Alfke wrote: I've run into this problem a few times now: I have an NSWindowController subclass that manages a window. I want to handle certain hot-keys in this window, for example Esc to exit full- screen mode, or maybe use letter keys to switch tools as in

RE: Move window to second display

2008-07-16 Thread Gary L. Wade
Try breaking out the call path to examine each succeeding value when assigning a value to display. One thing that jumps out at me: are you running this in 64-bit mode? The size of an int in 64-bit mode is 32 bits but a CGDirectDisplayID may have 64 significant bits as it's technically a point

Re: UITextView for the iphone that will auto-detect URLs

2008-07-16 Thread Sherm Pendley
On Wed, Jul 16, 2008 at 1:43 PM, Andrew Arrow <[EMAIL PROTECTED]> wrote: > I need a UITextView for the iphone Xcode 3.1 is public now, but only for Mac OS X development - the NDA on the iPhone SDK still applies. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net ___

UITextView for the iphone that will auto-detect URLs

2008-07-16 Thread Andrew Arrow
I need a UITextView for the iphone that will auto-detect URLs and make them blue and clickable (clicks that will open the page in safari). The UIWebView seems to only open the links within the same view. I need the same functionality the iphone mail program has. Any email message it displays has

Handling key equivalents in a controller class?

2008-07-16 Thread Jens Alfke
I've run into this problem a few times now: I have an NSWindowController subclass that manages a window. I want to handle certain hot-keys in this window, for example Esc to exit full-screen mode, or maybe use letter keys to switch tools as in Photoshop. Where do I put the handler for this?

RE: NSButton alternate image problem - not redrawing

2008-07-16 Thread Gary L. Wade
If I'm reading you right (the action of a button click causes that same button to get a new alternate image), I would say that you should set the alternate image before the user clicks on the button. Once a button is toggled, the current alternate image (or image, depending on state) is drawn.

Re: [[NSDate alloc] initWithString] crashes with valid string

2008-07-16 Thread Matt Neuburg
On Tue, 15 Jul 2008 11:36:46 -0700, Markus Spoettl <[EMAIL PROTECTED]> said: >Hi List, > > I've a problem I am failing to track down (let alone understand) >for a couple of weeks now. My application imports XML files that >contain - amongst other things - dates. Once in a while, the string to >da

Re: NSUserDefaultsController, when does value change?

2008-07-16 Thread chaitanya pandit
Try registering for the NSUserDefaultsDidChangeNotification On 16-Jul-08, at 12:48 PM, Matt Neuburg wrote: On Mon, 14 Jul 2008 19:36:29 -0700, "James W. Walker" <[EMAIL PROTECTED] > said: On Jul 14, 2008, at 9:34 AM, Matt Neuburg wrote: On Sun, 13 Jul 2008 21:29:56 -0700, "James W. Walker

Re: Move window to second display

2008-07-16 Thread Scott Ribe
> So what's wrong with the code then? I got nothing ;-( It actually looks correct to me. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Need to enable automatic login

2008-07-16 Thread Eric Christiansen
I need to set automatic login to a particular user. If I know his password it needs it to happen without user interaction. I saw a perl script on the web, but would prefer a more standard approach. Thanks, Eric There are two ways of constructing a software design: one

Re: NSUserDefaultsController, when does value change?

2008-07-16 Thread Matt Neuburg
On Mon, 14 Jul 2008 19:36:29 -0700, "James W. Walker" <[EMAIL PROTECTED]> said: > >On Jul 14, 2008, at 9:34 AM, Matt Neuburg wrote: > >> On Sun, 13 Jul 2008 21:29:56 -0700, "James W. Walker" <[EMAIL PROTECTED] >> > >> said: >>> I have a preferences dialog that I'm using with an >>> NSUserDefaultsCo

Re: Move window to second display

2008-07-16 Thread Fabian
Hum, OK. Thanks to both of you. So what's wrong with the code then? On Wed, Jul 16, 2008 at 6:36 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > > Le 16 juil. 08 à 18:15, Scott Ribe a écrit : > >>> The window frame origin is a position relative to the screen origin. >>> >>> Try this: >>> >>> sc

Re: Move window to second display

2008-07-16 Thread Jean-Daniel Dupas
Le 16 juil. 08 à 18:15, Scott Ribe a écrit : The window frame origin is a position relative to the screen origin. Try this: screenRect.origin = NSZeroPoint; [win setFrame:screenRect display:YES]; No, that will just position the window on the main screen. If the window frame origin were re

NSButton alternate image problem - not redrawing

2008-07-16 Thread P Teeson
Mac OS X Tiger 10.4.11, Xcode 2.5, G4 867mhz I am making a Cocoa Application kids game using NSButtons. They are of behaviour Toggle and of type Square Button and the icon position is centred (i.e. no title) and each button has a unique tag and is enabled. The icon images are in the nib file and

Re: Move window to second display

2008-07-16 Thread Scott Ribe
> The window frame origin is a position relative to the screen origin. > > Try this: > > screenRect.origin = NSZeroPoint; > [win setFrame:screenRect display:YES]; No, that will just position the window on the main screen. If the window frame origin were relative to the screen origin rather than

Setting Core Data attribute values to related entity attribute values

2008-07-16 Thread Jamie Phelps
I have a Core Data entity in a Master-Detail view. In the detail view, I have a button that is bound to the createFoo: method of the selected object where Foo is the class name of the related entity. What I want to do is use this button to create a Foo and set its relationship programmatica

Re: Inter-thread communications (live/deadlock?)

2008-07-16 Thread Keary Suska
7/15/08 3:45 PM, also sprach [EMAIL PROTECTED]: > I have a problem with inter-thread communications with NSMachPort/ > NSPortMessage - it works one way after initially working both ways.. First off, post your code. We can't say what you are doing wrong if we can't see what you have done wrong. >

RE: Base64 data string decode to save to file

2008-07-16 Thread Pablo Herrera
Thanks! As I have been looking into this this morning, i found similar uses of libCrypto--and tried using them. However, as I recently found out, I am unable to use these libs as Apple has decided that those libraries would not be available in my case. ;) But I think I have come across some co

Re: how do I make chat bubbles using a custom cell

2008-07-16 Thread chaitanya pandit
One idea would be to create an NSBezierPath with the shape of the chat bubble, once u have it you can use the CTGradient calss's [gradient fillBezierPath] method to fill it with an aqua look. The CTGradient project is here: http://blog.oofn.net/2006/01/15/gradients-in-cocoa/ On 15-Jul-08, at

Re: Base64 data string decode to save to file

2008-07-16 Thread Jens Alfke
On 16 Jul '08, at 7:21 AM, Pablo Herrera wrote: What are recommended methods to decode the data so I may save it to file? OpenSSL has base64 conversion APIs in its libCrypto. In my code I use a nice Obj-C wrapper by Dave Dribin: http://www.dribin.org/dave/files/base64.zip —Jens

Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS

2008-07-16 Thread Jens Alfke
On 16 Jul '08, at 12:55 AM, Alex Wied wrote: I've found the setting which causes the error below and thought I post the result in case somebody else runs into the same error. In menu "Run" disable setting "Enable Guard Malloc" and the scripts runs fine without any exceptions. You should fi

Re: Relaunch Finder (without AppleScript)

2008-07-16 Thread Uli Kusterer
On 16.07.2008, at 16:01, Dave DeLong wrote: You could use an NSTask to run "killall Finder" Yeah, and in the process you'll unceremoniously abort that 4GB copy process the user had going that was this close to finishing, and corrupt Finder's preferences... If you're on 10.5, use the sc

  1   2   >