Adding members to group in Address book

2008-07-18 Thread Vijay Kanse
Hello, I want to add group and members to group in address book. I have done the following things. ABAddressBook*book = [ABAddressBook SharedAddressBook]; ABPerson *person; ABGroup *group = [[[ABGroup alloc] init] autorelease]; [group setValue:@friend forProperty:kABGroupNameProperty]; person =

Re: Using NSInvocation for a class method?

2008-07-18 Thread Kyle Sluder
On Fri, Jul 18, 2008 at 1:46 AM, Graham Cox [EMAIL PROTECTED] wrote: Can I use NSInvocation for a class method? I can't really see what to use for setTarget: as there isn't an actual object. Erm? Just send messages to the Class object. Class objects return self in response to +class. --Kyle

Re: Using NSInvocation for a class method?

2008-07-18 Thread Graham Cox
Duh, Silly me. For some reason I thought +class returned some opaque struct thanks, Graham On 18 Jul 2008, at 4:27 pm, Kyle Sluder wrote: On Fri, Jul 18, 2008 at 1:46 AM, Graham Cox [EMAIL PROTECTED] wrote: Can I use NSInvocation for a class method? I can't really see what to use for

Re: NOT or NONE in NSPredicate

2008-07-18 Thread Phil
On Fri, Jul 18, 2008 at 2:52 PM, Chad Harrison [EMAIL PROTECTED] wrote: I have a fairly complex NSPredicate which works correctly, but I am trying to compound it with with a subpredicate that contains a logical NOT. I have tried using many combinations of the predicate syntax, but I can't seem

Image name for drag and drop from Safari

2008-07-18 Thread chaitanya pandit
Hi, In my application, i allow users to drag and drop images from Safari, however while receiving the drop i cannot retrieve the image name from the pasteboard. If i get the data for URL pasteboard type, it gives the URL up to the image, and not containing the image, what i mean is, if

Flip animation like dashboard widgets

2008-07-18 Thread chaitanya pandit
Is there any way to do flip animation like the one with dashboard widgets when u click the i to change the settings for the widget. Can it be done for NSView? I'd appreciate any help Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Authentication only for non admin login.

2008-07-18 Thread ninad walvekar
hi, I think I have precisely mentioned what I want to do in the first 2 lines of my previous post. To add to it my current implementation is asking for a user name and password for admin as well as standard user login i want it to ask for a user name and password only for and only for standard

Re: notification when app is moved

2008-07-18 Thread Uli Kusterer
On 18.07.2008, at 04:31, Mitchell Livingston wrote: In some small tests I have seen that other apps break when moved while opened (testing with TextEdit), so perhaps I should just assume it won't move. I guess this is a moot issue then. File a bug with Apple. I think it should be possible

Re: IBOutlet to same control in different nibs

2008-07-18 Thread Trygve Inda
On Thu, Jul 17, 2008 at 7:52 PM, Ken Thomases [EMAIL PROTECTED] wrote: How can I build one class to handle both??? You sound very vexed by this question, but the answer seems self-evident to me. You just do. It's totally up to you what your classes do and how you use them. Nobody's

Re: Flip animation like dashboard widgets

2008-07-18 Thread Jonathan Dann
There was an example of this on Cocoa Is My Girlfriend http://www.cimgf.com/ HTH Jon On 18 Jul 2008, at 08:42, chaitanya pandit wrote: Is there any way to do flip animation like the one with dashboard widgets when u click the i to change the settings for the widget. Can it be done for

Re: Adding members to group in Address book

2008-07-18 Thread Conrad Taylor
Hi, you might want to try the following document: http://developer.apple.com/documentation/UserExperience/Conceptual/AddressBook/AddressBook.pdf Good luck, -Conrad On Thu, Jul 17, 2008 at 10:56 PM, Vijay Kanse [EMAIL PROTECTED] wrote: Hello, I want to add group and members to group in

Re: Adding members to group in Address book

2008-07-18 Thread Conrad Taylor
Hi Vijay, I would recommend setting a breakpoint in the relevant method(s) to determine the locationof the problem. Good luck, -Conrad On Fri, Jul 18, 2008 at 1:50 AM, Conrad Taylor [EMAIL PROTECTED] wrote: Hi, you might want to try the following document:

Re: Flip animation like dashboard widgets

2008-07-18 Thread Dmitri Goutnik
On Jul 18, 2008, at 11:42 AM, chaitanya pandit wrote: Is there any way to do flip animation like the one with dashboard widgets when u click the i to change the settings for the widget. Can it be done for NSView? Take a look at Lemur Flip by Mike Lee. - Dmitri

NSConnection/proxy Issue (simplifed version)

2008-07-18 Thread Patrick Walker
Simple question that may or may not be programming related. I'm a mechanical engineering student so I'm trying to be as clear as I can here. This list entry may be a duplicate as the first attempt exceeded 25k in size. It seems NSConnection will return a proxy object but only when both

NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Matthias Arndt
Hi! I'm a rookie with Cocoa development, please excuse if this question is stupid, but I'm struck with memory management (an even Aaron's book doesn't help me): In a method I use a (temporary) dictionary vAttributes to read an object from an instance variable vColors (a dictionary, too):

+defaultAnimationForKey vs. -animationForKey

2008-07-18 Thread Abernathy, Joshua
In providing a different animation for a key in a view, is it better practice to override +defaultAnimationForKey or -animationForKey? J ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Controlling Preferences on iPhone

2008-07-18 Thread Aaron L'Heureux
I have done some preliminary searching, but as I am still relatively new to the platform, I've not come up with an answer to this question. If anyone could help me out or point me in the right direction, I'd really appreciate it. Is it possible to programmatically change system preferences

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Keary Suska
7/18/08 7:48 AM, also sprach [EMAIL PROTECTED]: In a method I use a (temporary) dictionary vAttributes to read an object from an instance variable vColors (a dictionary, too): - (NSString *)descriptionByColorCode:(int)colorCode { NSMutableDictionary *vAttributes = [[NSMutableDictionary

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Robert Martin
In the code you provide, the first line allocates a brand new dictionary and assigns it to vAttributes. In the next line, you reassign vAttributes to the contents of your iVar dictionary. Nothing points to that alloc'd dictionary in the first line anymore. Since vAttributes now points to

Re: Controlling Preferences on iPhone

2008-07-18 Thread Andrew Merenbach
On Jul 18, 2008, at 7:07 AM, Aaron L'Heureux wrote: I have done some preliminary searching, but as I am still relatively new to the platform, I've not come up with an answer to this question. If anyone could help me out or point me in the right direction, I'd really appreciate it. Is it

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Matthias Arndt
Robert, Am 18.07.2008 um 16:25 schrieb Robert Martin: In the next line, you reassign vAttributes to the contents of your iVar dictionary. Nothing points to that alloc'd dictionary in the first line anymore. Since vAttributes now points to an autoreleased dictionary, attempting to

Problem compiling first Cocoa app

2008-07-18 Thread Paul Denlinger
I'm working on my first Cocoa lesson at http://www.cocoadevcentral.com/d/learn_cocoa/ Everything works fine until I try to compile the app. I get error code 71. Can you tell me what's wrong? Here is the error message: *error: can't exec

Re: Controlling Preferences on iPhone

2008-07-18 Thread Mike Abdullah
As a very simple search of the archives would have told you, the SDK is still under NDA. Please don't discuss it here. On 18 Jul 2008, at 15:07, Aaron L'Heureux wrote: I have done some preliminary searching, but as I am still relatively new to the platform, I've not come up with an answer

Re: NSViewController Binding Problem continued

2008-07-18 Thread Ivy Feraco
Hm. Sean, I don't seem to be getting anything in my debugger or in Console when I try to establish bindings in IB as I did before. Just silence.and not working. I'm wondering if at the very least the representedObject can be bound to in IB when it is a model object (not

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 7:34 AM, Matthias Arndt [EMAIL PROTECTED] wrote: Robert, Am 18.07.2008 um 16:25 schrieb Robert Martin: In the next line, you reassign vAttributes to the contents of your iVar dictionary. Nothing points to that alloc'd dictionary in the first line anymore. Since

Re: Controlling Preferences on iPhone

2008-07-18 Thread Aaron L'Heureux
My mistake, I assumed that it expired with the release of 2.0 as was rumored, should have checked more carefully. On Jul 18, 2008, at 10:33 AM, Mike Abdullah wrote: As a very simple search of the archives would have told you, the SDK is still under NDA. Please don't discuss it here. On 18

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Trygve Inda
Hi! I'm a rookie with Cocoa development, please excuse if this question is stupid, but I'm struck with memory management (an even Aaron's book doesn't help me): In a method I use a (temporary) dictionary vAttributes to read an object from an instance variable vColors (a dictionary, too):

RE: Image name for drag and drop from Safari

2008-07-18 Thread Gary L. Wade
Launch the Clipboard Viewer, which is in: /Developer/Applications/Utilities/Built\ Examples/ and drop your images onto it, and then select the Drag Clipboard, possibly clicking Reload to inspect the values you can get. Hi, In my application, i allow users to drag and drop images from

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Matthias Arndt
Am 18.07.2008 um 16:42 schrieb Shawn Erickson: This is the wrong thing to take away from this email thread. Please review the following and ask questions if you don't understand any aspect of it.

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 7:42 AM, Shawn Erickson [EMAIL PROTECTED] wrote: On Fri, Jul 18, 2008 at 7:34 AM, Matthias Arndt [EMAIL PROTECTED] wrote: Robert, Am 18.07.2008 um 16:25 schrieb Robert Martin: In the next line, you reassign vAttributes to the contents of your iVar dictionary.

Re: KVO notifications and threads

2008-07-18 Thread Dave Dribin
On Jul 14, 2008, at 10:59 PM, Ron Lue-Sang wrote: The argument I'm trying to make is that you, as the app implementor, have everything you need to do what you mean and do it correctly. Imagine this (this is kinda long winded, so buckle up): - You have a view bound to property foo of

Re: Problem compiling first Cocoa app

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 7:34 AM, Paul Denlinger [EMAIL PROTECTED] wrote: I'm working on my first Cocoa lesson at http://www.cocoadevcentral.com/d/learn_cocoa/ Everything works fine until I try to compile the app. I get error code 71. Can you tell me what's wrong? Here is the error message:

Re: Authentication only for non admin login.

2008-07-18 Thread Gary L. Wade
If you have already gotten an AuthorizationRef that's been authenticated, you can copy info from it that holds the Username (see the related documentation for those keywords). If you want the Unix username, start with getuid and work from there. hi, I think I have precisely mentioned what I

Re: Authentication only for non admin login.

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 4:02 AM, ninad walvekar [EMAIL PROTECTED] wrote: hi, I think I have precisely mentioned what I want to do in the first 2 lines of my previous post. To add to it my current implementation is asking for a user name and password for admin as well as standard user login i

Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Rick Hoge
I would like to include a view divider similar to the one used in Xcode at the top of the editor window (contains forward and back buttons, popups for selection of source file and function, as well as pulldowns for a number of functions). I expect this is a custom class created by Apple

Re: Authentication only for non admin login.

2008-07-18 Thread Gary L. Wade
Sorry, I didn't read your original post too carefully; it looks like you haven't even gotten to that point of authenticating. Check for examples using SFAuthorizationView; it creates the OS-standard lock/unlock icon and label and can prompt the user in the way you want. If you still need the

Dispatch NSEvent to everyone

2008-07-18 Thread Matthew Williamson
Hello list, Ok, I'm completely new to Cocoa programming, but I've been programming for 10 years, so I think I can figure this out. I'm trying to do something remotely similar to a VNC server (pun intended :-) ), but I need to be able to send Cocoa events into the system--meaning

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 08 à 17:39, Rick Hoge a écrit : I would like to include a view divider similar to the one used in Xcode at the top of the editor window (contains forward and back buttons, popups for selection of source file and function, as well as pulldowns for a number of functions). I

Re: Problem compiling first Cocoa app

2008-07-18 Thread Matt Neuburg
On Fri, 18 Jul 2008 07:34:56 -0700, Paul Denlinger [EMAIL PROTECTED] said: I'm working on my first Cocoa lesson at http://www.cocoadevcentral.com/d/learn_cocoa/ Everything works fine until I try to compile the app. I get error code 71. Can you tell me what's wrong? Here is the error message:

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 08 à 17:55, Matthew Williamson a écrit : Hello list, Ok, I'm completely new to Cocoa programming, but I've been programming for 10 years, so I think I can figure this out. I'm trying to do something remotely similar to a VNC server (pun intended :-) ), but I need to be able

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 8:55 AM, Matthew Williamson [EMAIL PROTECTED] wrote: but I need to be able to send Cocoa events into the system--meaning CGPostMouseEvent won't cut it. All the code examples I can find seem to use CGPostMouseEvent to accomplish this kind of thing. But I need to be

Re: [SOLVED] NSButton alternate image problem - not redrawing

2008-07-18 Thread P Teeson
I solved it - thanks for not replying so I had to find out for myself. Seriously I appreciate it because I read more in Cocoa Drawing Guide and learned quite bit. respect Peter On 17-Jul-08, at 1:19 PM, P Teeson wrote: I posted about this issue but so far only one response. For the

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
On Jul 18, 2008, at 8:39 AM, Rick Hoge wrote: I expect this is a custom class created by Apple - does anyone know of an efficient way to replicate this type of view? One thought I had was to create a table with a single row and add the desired controls as cells. Just create a view and

[SOLVED] Image name for drag and drop from Safari

2008-07-18 Thread chaitanya pandit
Hi, Thanks for your reply, Clipboard viewer did the trick, Its the NSRTFDPboard type that contains the required data. // Get the rtfd data, get the attachment and then get the attachment name from it NSData *nameData = [[sender draggingPasteboard] dataForType:NSRTFDPboardType];

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Rick Hoge
Thanks for the replies - seems like a custom view and possibly NSMatrix will do the job. Rick On 18-Jul-08, at 12:38 PM, Chris Hanson wrote: On Jul 18, 2008, at 8:39 AM, Rick Hoge wrote: I expect this is a custom class created by Apple - does anyone know of an efficient way to

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
On Jul 18, 2008, at 9:55 AM, Rick Hoge wrote: Thanks for the replies - seems like a custom view and possibly NSMatrix will do the job. I strongly recommend going with a view hierarchy instead of an NSMatrix. You don't need to create a custom view, either. Views nest; an instance of

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: I should more clearly note that objectForKey: is not returning an autoreleased object. Also even if it did it would be an implementation detail (unless documented in the API docs). It is returning a reference to an object that the vColors

Did I reinvent the wheel?

2008-07-18 Thread Jeff LaMarche
Hey, folks. I needed an easy way to turn dictionaries into objects and objects into dictionaries based on their properties. I didn't want to have to custom code this for each of the classes i was using, and I couldn't find that functionality in any of the existing objects, but I have this

Re: Xcode3 vs Xcode2 - two problems

2008-07-18 Thread Bill Bumgarner
On Jul 18, 2008, at 10:16 AM, Joeles Baker wrote: i just tried the following with Xcode3: 1) read a plist in awakeFromNib store its content in an array NSArray* myArray = [NSPropertyListSerialization 2) tried to setup my tableview like so: - (NSInteger)tableView:(UITableView

Re: Xcode3 vs Xcode2 - two problems

2008-07-18 Thread Bill Bumgarner
On Jul 18, 2008, at 10:27 AM, Joeles Baker wrote: Oh my god - after all those years. Thank you. Sorry for this stupid question. But one thing remains. Why am I not able to drag the header of my class to the interface builder window? With Xcode2/IB2 you just had to drag the header file to the

Re: Did I reinvent the wheel?

2008-07-18 Thread Jean-Daniel Dupas
I don't think there is built-in support for this specific feature. If archiving, serialization and CoreData do not fit your needs, I bet you have to use your own method. That said, you should avoid to use an uninitialized variable in your code ;-) (outCount is used in array initializer

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 1:20 PM, Andy Lee wrote: On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: I should more clearly note that objectForKey: is not returning an autoreleased object. Also even if it did it would be an implementation detail (unless documented in the API docs). It is returning

substitute class at runtime?

2008-07-18 Thread Nathaniel Gottlieb-Graham
I need to be able to initialize a class, but I don't necessarily know what kind of class it'll be at compile time. Consider the following example in which the name of a class is checked against an array of class names, and if the name of the class is present in the array, a new instance

Re: substitute class at runtime?

2008-07-18 Thread Andy Lee
NSClassFromString() --Andy On Jul 18, 2008, at 2:00 PM, Nathaniel Gottlieb-Graham wrote: I need to be able to initialize a class, but I don't necessarily know what kind of class it'll be at compile time. Consider the following example in which the name of a class is checked against an

Re: substitute class at runtime?

2008-07-18 Thread Nick Zitzmann
On Jul 18, 2008, at 12:00 PM, Nathaniel Gottlieb-Graham wrote: if ([classNameArray containsObject:nameOfClass]) { [[[??? alloc]initWithNibName:nameOfClass] autorelease] } How can I get the class name into the ??? part? Substitute the ?? with a Class data structure,

Re: Image name for drag and drop from Safari

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 12:23 AM, chaitanya pandit wrote: In my application, i allow users to drag and drop images from Safari, however while receiving the drop i cannot retrieve the image name from the pasteboard. If i get the data for URL pasteboard type, it gives the URL up to the image, and

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Matthew Williamson
Ok, looking more at the Quartz event tap stuff, there's more there than I thought--tablet stuff is there, for instance. But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be 64-bit, I can't use any Carbon anyway, right?). I just

assertion failure in AppKit

2008-07-18 Thread Torsten Curdt
Hey guys, Some of my users are reporting an exception NSInternalInconsistencyException lockFocus sent to a view whose window is deferred and does not yet have a corresponding platform window This is in the logs: *** Assertion failure in -[NSThemeFrame lockFocus], AppKit.subproj/

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 1:20 PM, Andy Lee wrote: Unless Apple defines another adjective for this purpose, it seems to me that autoreleased is a reasonable shorthand for you must retain it if you want it to stick around, or you *may* have a dangling pointer. Similarly, retained is a reasonable

Re: Dispatch NSEvent to everyone

2008-07-18 Thread glenn andreas
On Jul 18, 2008, at 1:15 PM, Matthew Williamson wrote: Ok, looking more at the Quartz event tap stuff, there's more there than I thought--tablet stuff is there, for instance. But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 10:20 AM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: I should more clearly note that objectForKey: is not returning an autoreleased object. Also even if it did it would be an implementation detail (unless documented in the API

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 11:15 AM, Matthew Williamson [EMAIL PROTECTED] wrote: Ok, looking more at the Quartz event tap stuff, there's more there than I thought--tablet stuff is there, for instance. But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 2:17 PM, mmalc crawford wrote: On Jul 18, 2008, at 1:20 PM, Andy Lee wrote: Unless Apple defines another adjective for this purpose, it seems to me that autoreleased is a reasonable shorthand for you must retain it if you want it to stick around, or you *may* have a

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread j o a r
On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: I don't see the difference from the caller's point of view. There isn't any, and that was not MMalcs point. His point was that you were using the term autoreleased incorrectly. j o a r ___

Re: QCCompositionLayer for Manipulating other CALayers

2008-07-18 Thread David Duncan
On Jul 17, 2008, at 7:50 PM, Mike Rossetti wrote: Before I spend a lot of time attempting the following I would appreciate any advice based on your experience: I've got a drawing-like application where I'd like the user to be able to rotate individual elements of the drawing. When the

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Nick Zitzmann
On Jul 18, 2008, at 12:15 PM, Matthew Williamson wrote: But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be 64-bit, I can't use any Carbon anyway, right?). You can; it was mainly HIView and a lot of legacy technologies

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 2:27 PM, Shawn Erickson wrote: On Fri, Jul 18, 2008 at 10:20 AM, Andy Lee [EMAIL PROTECTED] wrote: Unless Apple defines another adjective for this purpose, it seems to me that autoreleased is a reasonable shorthand for you must retain it if you want it to stick around, or

NSTableHeaderView shifting after scrolling

2008-07-18 Thread sarven
I am reading a csv file into a dictionary and I display the data in a NSTableview. I created my window in Interface builder and added a NSTableview with one column. Depending on the needs of the csv file, I add columns to the table. Here is the code: -(void) awakeFromNib {

Re: Inverse Regex Library?

2008-07-18 Thread John Engelhart
On Jul 17, 2008, at 10:09 AM, Philip Mötteli wrote: Hi, Does anybody know of a library, that takes a bunch of strings and produces a regex-string from them? E. g: Word1 Word2 Word5 Word8 Word11 Word19 Word23 Word45 Word77 should give Word[0-9]{1,2}. Or I would even be more happy with

Re: IBOutlet to same control in different nibs

2008-07-18 Thread Hamish Allan
On Thu, Jul 17, 2008 at 5:42 PM, Trygve Inda [EMAIL PROTECTED] wrote: I'll have one instance of this class for each screen, one of which will be handling the main screen. [...] Can a single class have an IBOutlet that goes two different (though functionally identical) places? It's a single

Re: NSViewController Binding Problem continued

2008-07-18 Thread Hamish Allan
On Thu, Jul 17, 2008 at 8:50 PM, Ron Lue-Sang [EMAIL PROTECTED] wrote: The tableview is expecting to be bound to the arraycontroller directly. It doesn't know that representedObject is an arrayController. You might wish to file an enhancement request for NSViewController to provide an init

how to eliminate an annoying issue of the multi-document cocoa application?

2008-07-18 Thread Cloud Strife
Greetings everyone. I am new to creating an new multi-doc application with Cocoa framework. After I created such one using the Xcode built-in template. There was a window, the new document, automatically jump out after I launched the application. Due to the requirement of my application, this

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 2:59 PM, j o a r wrote: On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: I don't see the difference from the caller's point of view. There isn't any, and that was not MMalcs point. His point was that you were using the term autoreleased incorrectly. I don't think I have

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 3:15 PM, Nick Zitzmann [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 12:15 PM, Matthew Williamson wrote: But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be 64-bit, I can't use any Carbon anyway, right?).

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: Autoreleased is inaccurate and is not a proper shorthand for you must retain it if you want it to stick around. To understand why, consider two possible implementations of a get accessor: - (NSString *)name { return name; } - (NSString

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: I don't see any reason to use autoreleased in a situation where the object in question has not, in fact, been sent the autorelease method. It's just confusing. Yes, you would have to acknowledge that you don't know whether autorelease has in

NSPopUpButton style question ... Push v.s. Round Textured

2008-07-18 Thread lbland
hi- The default NSPopUpButton button style is Push. But, I'm getting board of it and it looks old-style. I think the button style of Round Textured is more modern. Now I see that Xcode 3.0 - 3.1 changes the PUB button style to Round Textured (I think)! Looks yummy! Is Round Textured PUB

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
Hi Ivy, You can bind the representedObject in NIB, I do it all the time. My rO is an NSPersistentDocument subclass, which is set immediately after the view controller is -init-ed. The bindings in the nib are only set up after -loadView is called, which occurs after something in your app

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 4:19 PM, mmalc crawford wrote: On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: Autoreleased is inaccurate and is not a proper shorthand for you must retain it if you want it to stick around. To understand why, consider two possible implementations of a get accessor: -

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 1:48 PM, Andy Lee wrote: On Jul 18, 2008, at 4:19 PM, mmalc crawford wrote: On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: NSString *name = [aPerson name]; [aPerson setName:@Fido]; NSLog(@Old name: %@, name); And calling the return value from -name autoreleased would

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 4:55 PM, Hamish Allan wrote: On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee [EMAIL PROTECTED] wrote: What would you use for adjectives -- owned and unowned? How about retained and unretained? As in: this method returns an unretained object. Unfortunately, there's no such

tidying HTML up

2008-07-18 Thread Ivan
Hi, I'm developing a Cocoa Touch app for the iPhone/iPod Touch and I was using NSXMLDocument with the tidyXHTML option to transform some web paged into safe XML documents that I parsed with NSXMLParser later on. Since NSXMLDocument is no longer (or never had really been) part of the

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Vannorsdel
In my office we usually call objects returned directly without an autorelease as short returned and an retain-autoreleased object as pooled. Though these sound more slang than something that could be official. On Jul 18, 2008, at 3:10 PM, Andy Lee wrote: Unfortunately, there's no such

Re: tidying HTML up

2008-07-18 Thread Ivan
Please Mr. Jobe, keep on-topic :-) I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class, nothing to do with iPhone... :-) OK, I'm sory, I'll check for another list. Ivan. ___

Re: NSViewController Binding Problem continued

2008-07-18 Thread Cathy Shive
On Jul 17, 2008, at 10:26 PM, Hamish Allan wrote: You might wish to file an enhancement request for NSViewController to provide an init method taking a representedObject to be set up before attempting bindings etc., which would circumvent this issue. I wonder if it would actually make a

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: The better term already exists: own. As in, you own the return value or you do not own the return value. This tells you everything you need to know. Well, as I said I don't

NSTableHeaderView shifting after scrolling

2008-07-18 Thread Peter Hudson
I've had similar troubles. I fixed it by setting the min and max width of the column - and then an actual width as well. Then set it non re-sizeable. PH ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: tidying HTML up

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 3:07 PM, Ivan wrote: I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class NSXML uses libTidy. If for some reason you can't use those, you should be able to build libTidy yourself and link it into your

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
Hi Ivy, Can you tell us what the bound object the table receives is? If you could call this method (which, in its current state, would go in an NSTableView subclass) somewhere: - (NSArrayController *)arrayController; { return [[[self tableColumnWithIdentifier:@myColumn]

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 6:41 PM, Michael Ash wrote: On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: The better term already exists: own. As in, you own the return value or you do not own the return value. This tells you

MoveMe gone?

2008-07-18 Thread Diop Mercer
Hi, I'm trying to download the sample project MoveMe from the dev center website: http://developer.apple.com/iphone/gettingstarted/docs/creatingiphoneapps.action According to the link, it is supposed to be available here: http://developer.apple.com/iphone/library/samplecode/MoveMe/index.html

Background Color on WebView Load.

2008-07-18 Thread Bruce Cresanta
Hello, How does one change the background color from White when a Webview is loading resources?I have tried to change the view alpha's to 0.0 and I've also subclassed WebView to re-implement drawRect.. I suspected that its either the documentView, webView, or frameView that needs

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Hamish Allan
On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee [EMAIL PROTECTED] wrote: What would you use for adjectives -- owned and unowned? How about retained and unretained? As in: this method returns an unretained object. Hamish ___ Cocoa-dev mailing list

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Hamish Allan
On Fri, Jul 18, 2008 at 10:10 PM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 4:55 PM, Hamish Allan wrote: On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee [EMAIL PROTECTED] wrote: What would you use for adjectives -- owned and unowned? How about retained and unretained? As in: this

Re: NSViewController Binding Problem continued

2008-07-18 Thread Hamish Allan
On Fri, Jul 18, 2008 at 11:18 PM, Cathy Shive [EMAIL PROTECTED] wrote: I wonder if it would actually make a difference in this case. Since the nib doesn't get loaded until the 'load view' method is called Nor it does. and she's setting the rO directly after the initializer (before

Re: MoveMe gone?

2008-07-18 Thread Diop Mercer
Ok, answered my own question: found it under http://developer.apple.com/iphone/library/samplecode/MoveMe Somebody should fix that link! -m On Fri, Jul 18, 2008 at 7:57 PM, Diop Mercer [EMAIL PROTECTED] wrote: Hi, I'm trying to download the sample project MoveMe from the dev center website:

Re: Inverse Regex Library?

2008-07-18 Thread Marcel Weiher
On Jul 17, 2008, at 14:11 , Philip Mötteli wrote: What I'm asking is, if you can identify everything that is not a too-many relationship, find them via a process of elimination (if it's not something I can identify, then it must be a too-many). But I can't make this analysis every-time an

Re: tidying HTML up

2008-07-18 Thread Marcel Weiher
On Jul 18, 2008, at 14:22 , Ivan wrote: Since NSXMLDocument is no longer (or never had really been) part of the iPhone SDK, now I find my app can't be run on my iPhone. So, I wonder if is there any way I could take to keep on with my development. Just found tidylib at sourceforge, but

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 7:48 PM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 6:41 PM, Michael Ash wrote: On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: The better term already exists: own. As in, you own the

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Steve Weller
On Jul 18, 2008, at 1:55 PM, Hamish Allan wrote: On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee [EMAIL PROTECTED] wrote: What would you use for adjectives -- owned and unowned? How about retained and unretained? As in: this method returns an unretained object. How about dependent and

  1   2   >