Re: core data - delete of object.

2008-11-17 Thread Quincey Morris
On Nov 17, 2008, at 22:54, John Clayton wrote: I'm basically looking to restore some state on an object at time of deletion, e.g. if A is associated with B via a to-many relationship from A->B, then when one instance of B is deleted - we need to change a property on A. If a B is delete,

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 18, 2008, at 1:14 AM, Brian Stern wrote: On Nov 18, 2008, at 12:59 AM, Roland King wrote: Hey Brian - Outlets for iPhone OS are established by calling setValue:forKeyPath:. The behavior of setValue:forKeyPath: is that if a setter exists, it is called. If a setter does not

Re: core data - delete of object.

2008-11-17 Thread John Clayton
Thanks Jim, unfortunately all occur either at pre-save or save time, which is too late. I'm basically looking to restore some state on an object at time of deletion, e.g. if A is associated with B via a to-many relationship from A->B, then when one instance of B is deleted - we need to ch

Re: Fetch value from field editor during editing?

2008-11-17 Thread Wayne Packard
There is a way. It works great. We (and by we, I mean the documentation) call it controlTextDidChange:. Create a method like this: - (void)controlTextDidChange:(NSNotification *)aNotification { NSTextField* field = [aNotification object]; NSLog([field stringValue]); if ([[field s

Re: NSDocument annoying warning

2008-11-17 Thread Quincey Morris
On Nov 17, 2008, at 21:12, Randall Meadows wrote: So, to "lock" the document, I get the current name, change the extension, use NSFileManager to move the file from the "unlocked" name to the "locked" name, call -setFileType: to the locked type, and call -setFileURL: with the new, locked pat

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 12:59 AM, Roland King wrote: Hey Brian - Outlets for iPhone OS are established by calling setValue:forKeyPath:. The behavior of setValue:forKeyPath: is that if a setter exists, it is called. If a setter does not exist, the instance variable is looked up and set

Re: Question about interface builder

2008-11-17 Thread Kyle Sluder
On Mon, Nov 17, 2008 at 7:07 PM, j o a r <[EMAIL PROTECTED]> wrote: > I know of one thing that's currently difficult to do in code: Setting up the > main menu. This would be what I'm referring to. But the main menu is very important; it includes things like the Services menu, Recent Files functio

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 1:00 AM, Jonathan Hess wrote: On Nov 18, 2008, at 12:49 AM, Brian Stern wrote: On Nov 18, 2008, at 12:35 AM, Jonathan Hess wrote: Normally instance variables and properties share the same name, Normally in your code maybe, not mine. so it doesn't matter to Interface

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 18, 2008, at 12:49 AM, Brian Stern wrote: On Nov 18, 2008, at 12:35 AM, Jonathan Hess wrote: Perhaps the new @property() syntax makes it easy to forget about object lifetimes because it does the set/get/change automagically. These days when I add any property I go right to the de

Re: Question about interface builder

2008-11-17 Thread j o a r
Dear Cocoa-Dev, // You should use IB whenever and wherever you can // It's often the case that developers new to the platform think that they have to write their UI in code. Perhaps because UI design tools on other platforms doesn't work as well as they should? Please note that Cocoa devel

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 18, 2008, at 12:49 AM, Brian Stern wrote: On Nov 18, 2008, at 12:35 AM, Jonathan Hess wrote: Normally instance variables and properties share the same name, Normally in your code maybe, not mine. so it doesn't matter to Interface Builder where the 'IBOutlet' text appears. If you'

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Roland King
Hey Brian - Outlets for iPhone OS are established by calling setValue:forKeyPath:. The behavior of setValue:forKeyPath: is that if a setter exists, it is called. If a setter does not exist, the instance variable is looked up and set directly, and if it is an object, it is retained. Thi

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 18, 2008, at 12:43 AM, Brian Stern wrote: On Nov 18, 2008, at 12:34 AM, Jonathan Hess wrote: The solution to a memory leak should never be an unbalanced release. What I did to fix this was to add all of the properties to all of the outlets so they'd all be retained through those

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 12:35 AM, Jonathan Hess wrote: Perhaps the new @property() syntax makes it easy to forget about object lifetimes because it does the set/get/change automagically. These days when I add any property I go right to the dealloc method (and init if I have one) and ensure I'v

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 12:35 AM, Jonathan Hess wrote: Normally instance variables and properties share the same name, Normally in your code maybe, not mine. so it doesn't matter to Interface Builder where the 'IBOutlet' text appears. If you're going to give your instance variables different

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 18, 2008, at 12:32 AM, Brian Stern wrote: On Nov 18, 2008, at 12:11 AM, Roland King wrote: Brian Stern wrote: On Nov 17, 2008, at 11:35 PM, Roland King wrote: Yes, but this is exactly the point. If I have no property for an Outlet it's still retained. If I have a propert

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
I simply don't need properties for all my Outlets, except for this issue. I also don't really like making all my outlets implicitly public. But I'm forced to do that. Here's one way to avoid making your outlets public: // Header @interface MyClass : NSObject { @private IBOutlet UIL

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 12:34 AM, Jonathan Hess wrote: The solution to a memory leak should never be an unbalanced release. What I did to fix this was to add all of the properties to all of the outlets so they'd all be retained through those properties. Then I added all the releases to all

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 18, 2008, at 1:11 PM, Roland King wrote: Brian Stern wrote: On Nov 17, 2008, at 11:35 PM, Roland King wrote: Yes, but this is exactly the point. If I have no property for an Outlet it's still retained. If I have a property for an outlet that is assign, and not retain th

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
Perhaps the new @property() syntax makes it easy to forget about object lifetimes because it does the set/get/change automagically. These days when I add any property I go right to the dealloc method (and init if I have one) and ensure I've managed that property before I forget. Yes, but

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 12:13 AM, mmalcolm crawford wrote: On Nov 17, 2008, at 8:53 PM, Brian Stern wrote: Here's my test project: http://bellsouthpwp2.net/b/r/brians99/projects/TestPropertiesAndOutlets.zip There are three labels that are outlets. One has a retain property, one an assign prop

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jonathan Hess
On Nov 17, 2008, at 10:12 PM, Brian Stern wrote: On Nov 17, 2008, at 9:11 PM, mmalcolm crawford wrote: One other consideration, particularly in iPhone applications, is where you might have outlets to subviews of a main view that might be released in sime situations -- e.g. a UIViewControl

Re: Regex

2008-11-17 Thread Mr. Gecko
I never was able to compile RegexKitLite for some reason, and when I use the framework it says warning: 'NSString' may not respond to '- arrayByMatchingObjectsWithRegex:' and when I run the code it gives me this in the debug *** -[NSCFString arrayByMatchingObjectsWithRegex:]: unrecognized se

RE: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Jeff Laing
> If you declare a property: > > @property (nonatomic, assign) MyLabel *label1; > > but make the connection in IB to mLabel1, then the property accessor > isn't used. So the outlet is set using setValue:forKey:. Which > results in the value being retained, precisely as described in the > docume

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 18, 2008, at 12:11 AM, Roland King wrote: Brian Stern wrote: On Nov 17, 2008, at 11:35 PM, Roland King wrote: Yes, but this is exactly the point. If I have no property for an Outlet it's still retained. If I have a property for an outlet that is assign, and not retain t

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 8:53 PM, Brian Stern wrote: Here's my test project: http://bellsouthpwp2.net/b/r/brians99/projects/TestPropertiesAndOutlets.zip There are three labels that are outlets. One has a retain property, one an assign property, and the third no property. Unless they are releas

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Luke the Hiesterman
On Nov 17, 2008, at 9:11 PM, Roland King wrote: I'm a bit limited at work, no Mac here, so I took a look with wordpad .. how nice. You've defined the actual label pointers as IBOutlet, like this IBOutlet MyLabel* mLabel1; and then called the properties label1 etc. in your .h file. When

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Luke the Hiesterman
On Nov 17, 2008, at 9:10 PM, Brian Stern wrote: I simply don't need properties for all my Outlets, except for this issue. I also don't really like making all my outlets implicitly public. But I'm forced to do that. You can use the readonly option for your properties. Alternatively, you

Re: NSDocument annoying warning

2008-11-17 Thread Randall Meadows
On Nov 14, 2008, at 4:52 PM, Quincey Morris wrote: On Nov 14, 2008, at 15:21, Randall Meadows wrote: Is there something I can do to tell NSDocument (or whomever) that these changes that it thinks are made by another application are on purpose, and that it needs to keep its opinions regarding

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Roland King
Brian Stern wrote: On Nov 17, 2008, at 11:35 PM, Roland King wrote: Yes, but this is exactly the point. If I have no property for an Outlet it's still retained. If I have a property for an outlet that is assign, and not retain the outlet is still retained, and I still must relea

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 11:51 PM, mmalcolm crawford wrote: On Nov 17, 2008, at 7:12 PM, Brian Stern wrote: On Nov 17, 2008, at 9:11 PM, mmalcolm crawford wrote: One other consideration, particularly in iPhone applications, is where you might have outlets to subviews of a main view that might

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 11:58 PM, mmalcolm crawford wrote: On Nov 17, 2008, at 8:34 PM, Brian Stern wrote: Don't you find it odd that you need to release outlets in didReceiveMemoryWarning? Not at all -- assuming that you have a reference -- strong or weak -- to an item in the user interfac

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 8:34 PM, Brian Stern wrote: Don't you find it odd that you need to release outlets in didReceiveMemoryWarning? Not at all -- assuming that you have a reference -- strong or weak -- to an item in the user interface, you want to make sure you break it if the view is sup

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 8:17 PM, Brian Stern wrote: I think it makes more sense to release the Outlets in viewDidLoad. This way I only have to release them in one spot, not two. No, it doesn't. There is no sense at all in releasing outlets in viewDidLoad. Follow the pattern I described and it'

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 8:05 PM, Roland King wrote: The iPhone version of nib unarchiving and hookup seemed very consistent to me, it makes use of properties or setFoo: if you have them, allowing you to manage objects any way you like. This applies to both iPhone and Mac OS X/desktop. This is

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 11:35 PM, Roland King wrote: Yes, but this is exactly the point. If I have no property for an Outlet it's still retained. If I have a property for an outlet that is assign, and not retain the outlet is still retained, and I still must release it, even though I

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 7:12 PM, Brian Stern wrote: On Nov 17, 2008, at 9:11 PM, mmalcolm crawford wrote: One other consideration, particularly in iPhone applications, is where you might have outlets to subviews of a main view that might be released in sime situations -- e.g. a UIViewControlle

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Roland King
Yes, but this is exactly the point. If I have no property for an Outlet it's still retained. If I have a property for an outlet that is assign, and not retain the outlet is still retained, and I still must release it, even though I never retained it. When you say I can manage the outl

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 11:20 PM, Luke the Hiesterman wrote: On Nov 17, 2008, at 8:17 PM, Brian Stern wrote: I think it makes more sense to release the Outlets in viewDidLoad. Why would you be releasing outlets when the view just loaded? Generally releasing happens when you're ready for some

Re: OutlineView, bindings and array of NSDictionaries.

2008-11-17 Thread Sandro Noel
Thank you Quincey, Very nice explanation i'll adjust my code. Sandro Noel. On 17-Nov-08, at 6:45 PM, Quincey Morris wrote: On Nov 17, 2008, at 13:51, Sandro Noel wrote: I cant seem to get my data to display properly in the Outline View, and i am sure it is because of the organisation of my

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Luke the Hiesterman
On Nov 17, 2008, at 8:17 PM, Brian Stern wrote: I think it makes more sense to release the Outlets in viewDidLoad. Why would you be releasing outlets when the view just loaded? Generally releasing happens when you're ready for something to go away

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Luke the Hiesterman
On Nov 17, 2008, at 8:15 PM, Brian Stern wrote: When you say I can manage the outlets any way I like this is wrong. They are managed for me. I want them to not be retained. I don't have that option. I never said this. I compared having objects unarchived from a nib to being alloc'd, w

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 9:11 PM, mmalcolm crawford wrote: One other consideration, particularly in iPhone applications, is where you might have outlets to subviews of a main view that might be released in sime situations -- e.g. a UIViewController whose view is released in didReceiveMemoryWarn

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 11:05 PM, Roland King wrote: OK, this issue has come up for me very recently. It appears that on iPhoneOS IBOutlets are retained, regardless of the presence of properties. Even worse, in the presence of an assign property the outlet is still retained. Whatever c

Crash in AppKit/CoreFoundation?

2008-11-17 Thread Kevin Dixon
I recently released a universal binary to beta testers. My application does offline batch processing on audio files, using the Audio Units framework. In general, the process takes about 5 minutes per file, so I do this work in a separate thread. One of my users reported that the application cra

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Roland King
OK, this issue has come up for me very recently. It appears that on iPhoneOS IBOutlets are retained, regardless of the presence of properties. Even worse, in the presence of an assign property the outlet is still retained. Whatever code is retaining the outlets never releases them. So

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 10:53 PM, Luke the Hiesterman wrote: On Nov 17, 2008, at 7:46 PM, Brian Stern wrote: On Nov 17, 2008, at 10:17 PM, Luke the Hiesterman wrote: On Nov 17, 2008, at 7:12 PM, Brian Stern wrote: OK, this issue has come up for me very recently. It appears that on iPhone

Re: Help on Software update application

2008-11-17 Thread Dave Fernandes
Have you looked at the Sparkle framework? http://en.wikipedia.org/wiki/Sparkle_(software) On Nov 17, 2008, at 10:48 PM, Arnab Ganguly wrote: Hi All, I am planning to develop an application similar to what you get in the "Software Update" in Mac.If you click on that it checks any update is requ

Re: Help on Software update application

2008-11-17 Thread Andrew Farmer
On 17 Nov 08, at 19:48, Arnab Ganguly wrote: I am planning to develop an application similar to what you get in the "Software Update" in Mac.If you click on that it checks any update is required for your machine etc...Mine application will look for the updates specific to the developed Client.

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Luke the Hiesterman
On Nov 17, 2008, at 7:46 PM, Brian Stern wrote: On Nov 17, 2008, at 10:17 PM, Luke the Hiesterman wrote: On Nov 17, 2008, at 7:12 PM, Brian Stern wrote: OK, this issue has come up for me very recently. It appears that on iPhoneOS IBOutlets are retained, regardless of the presence of p

Re: Regex

2008-11-17 Thread Peter N Lewis
Hello I have been trying to find a good Regex framework for cocoa. I am trying to find urls in an html page, I have this regex from php that I made so all I would need is a way to bring it to cocoa, the regex is /]*href=(\"??)([^\" >]*?)\\1[^>]*>.*<\/a>/siU

Help on Software update application

2008-11-17 Thread Arnab Ganguly
Hi All, I am planning to develop an application similar to what you get in the "Software Update" in Mac.If you click on that it checks any update is required for your machine etc...Mine application will look for the updates specific to the developed Client. Is there any sample app I can refer to ?A

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 10:17 PM, Luke the Hiesterman wrote: On Nov 17, 2008, at 7:12 PM, Brian Stern wrote: OK, this issue has come up for me very recently. It appears that on iPhoneOS IBOutlets are retained, regardless of the presence of properties. Even worse, in the presence of an assig

Re: Fetch value from field editor during editing?

2008-11-17 Thread Randall Meadows
On Nov 17, 2008, at 8:17 PM, Russ wrote: Nice try, but that definitely doesn't affect typing. According to the docs, it affects mouse tracking. NSTextField: why use the rowboat you need, when you can use an aircraft carrier instead. Still no way to find the text editor value while it is e

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Luke the Hiesterman
On Nov 17, 2008, at 7:12 PM, Brian Stern wrote: OK, this issue has come up for me very recently. It appears that on iPhoneOS IBOutlets are retained, regardless of the presence of properties. Even worse, in the presence of an assign property the outlet is still retained. Whatever code is

Re: Fetch value from field editor during editing?

2008-11-17 Thread Russ
Nice try, but that definitely doesn't affect typing. According to the docs, it affects mouse tracking. NSTextField: why use the rowboat you need, when you can use an aircraft carrier instead. Still no way to find the text editor value while it is editing, or receive notifications as the value

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 9:11 PM, mmalcolm crawford wrote: One other consideration, particularly in iPhone applications, is where you might have outlets to subviews of a main view that might be released in sime situations -- e.g. a UIViewController whose view is released in didReceiveMemoryWarn

Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 3:06 PM, mmalcolm crawford wrote: Going forward, you're encouraged to declare outlets as follows: @interface AppController : NSObject { NSTextField *myTextField; ... } @property (nonatomic, retain) IBOutlet NSTextField *myTextField; Jeff asked (posted with permission):

Re: Regex

2008-11-17 Thread Mr. Gecko
I've found RegexKit but I couldn't figure out how to get an array from my string. On Nov 17, 2008, at 7:43 PM, Andrew Farmer wrote: On 17 Nov 08, at 17:04, Mr. Gecko wrote: Hello I have been trying to find a good Regex framework for cocoa. I am trying to find urls in an html page... Assumi

Re: Regex

2008-11-17 Thread Mr. Gecko
I've never thought of that, but I am using NSURL because I want it to be a crawler. I'll see if I can do that with what I got so far. On Nov 17, 2008, at 7:43 PM, Andrew Farmer wrote: On 17 Nov 08, at 17:04, Mr. Gecko wrote: Hello I have been trying to find a good Regex framework for cocoa.

Re: Regex

2008-11-17 Thread Andrew Farmer
On 17 Nov 08, at 17:04, Mr. Gecko wrote: Hello I have been trying to find a good Regex framework for cocoa. I am trying to find urls in an html page... Assuming that you're loading the web page into a WebView or similar, you'll have a much easier time doing this through the HTML DOM. Trying

Re: Displaying NSArray in NSTableView

2008-11-17 Thread Quincey Morris
On Nov 17, 2008, at 04:03, 양승준 wrote: The data is in parBuffer initialized inside (id) init as parBuffer = [NSArray arrayWithObjects: [NSNumber numberWithInt:4], [NSNumber numberWithInt:8], [NSNumber numberWithFloat:3.14] , nil]; Is this a garbage-collected application? If not, then you

Re: Regex

2008-11-17 Thread Dave DeLong
http://regexkit.sourceforge.net I use it pretty frequently (the Lite version, anyway). HTH, Dave On 17 Nov, 2008, at 6:04 PM, Mr. Gecko wrote: Hello I have been trying to find a good Regex framework for cocoa. I am trying to find urls in an html page, I have this regex from php that I made

Re: NSDateFormatter strangeness

2008-11-17 Thread Greg Hoover
I am using NSDateFormatter. The code snippet included shows this. Greg On Nov 17, 2008, at 3:38 PM, Kyle Sluder wrote: I think it's a known issue. The documentation for -[NSDate descriptionWithCalendarFormat:timeZone:locale:] (which I can only assume that -[NSDate description] calls) has this

Regex

2008-11-17 Thread Mr. Gecko
Hello I have been trying to find a good Regex framework for cocoa. I am trying to find urls in an html page, I have this regex from php that I made so all I would need is a way to bring it to cocoa, the regex is /]*href=(\"??)([^\" >]*?)\\1[^>]*>.*<\/a>/siU Thanks for the help. Mr. Gecko ___

RE: Re: Displaying NSArray in NSTableView

2008-11-17 Thread 양승준
Thank you for replying.  I connected dataSource by ctrl-dragging from the  tableView to File's owner and selecting dataSource. If I change the number of elements of the array, the number of rows in the tableView changes. The problem is that the data in the array doesn't show up...  -Origina

Re: Question about interface builder

2008-11-17 Thread Gregory Weston
On Nov 17, 2008, at 6:53 PM, Andy Lee wrote: On Nov 17, 2008, at 6:23 PM, Kyle Sluder wrote: I'm wondering if Apple's doing a good enough job explaining how IB is different from UI code generators and why it is important that one use it. I think this is a good question. Maybe it'd be wor

CMGetImageSpace() replacement?

2008-11-17 Thread Randall Meadows
The code I'm working on uses CMGetImageSpace(), which is deprecated in 10.5, but the docs don't suggest anything to use in its stead. Anyone know? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Question about interface builder

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 6:19 PM, Kyle Sluder wrote: On Mon, Nov 17, 2008 at 5:25 PM, Brian Stern <[EMAIL PROTECTED]> wrote: I can tell you that the majority of iPhone developers are refusing to use IB. The reasons I usually see are I didn't get the implication that the OP was doing iPhone de

Re: Question about interface builder

2008-11-17 Thread j o a r
On Nov 17, 2008, at 4:02 PM, Kyle Sluder wrote: My point is that this isn't the case. Avoiding IB has been shown to introduce subtle bugs. Like what? I know of one thing that's currently difficult to do in code: Setting up the main menu. Difficult yes, but not impossible. Should this be

Re: Question about interface builder

2008-11-17 Thread Kyle Sluder
On Mon, Nov 17, 2008 at 6:54 PM, j o a r <[EMAIL PROTECTED]> wrote: > I don't agree that it's somehow more important for Cocoa developers to use > an UI design tool, compared to developers using other development > environments. Cocoa developers, much like developers on other platforms, can > alway

Re: Question about interface builder

2008-11-17 Thread Shawn Erickson
On Mon, Nov 17, 2008 at 3:53 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > There's no way to generate a text dump that you can eyeball. Can generate XML that you can eyeball or transform into something more readable... (not ideal but better then nothing) ibtool --connections /Developer/Examples/Quar

Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-17 Thread Douglas Davidson
On Nov 17, 2008, at 3:50 PM, Rua Haszard Morris wrote: I have found that NSSuperscriptAttributeName, NSUnderlineStyleAttributeName, and NSObliquenessAttributeName (those are the attributes that I have tested) render differently when Cocoa Text is used to draw the string. The attributes ap

Re: Question about interface builder

2008-11-17 Thread j o a r
On Nov 17, 2008, at 3:23 PM, Kyle Sluder wrote: I'm wondering if Apple's doing a good enough job explaining how IB is different from UI code generators and why it is important that one use it. I don't agree that it's somehow more important for Cocoa developers to use an UI design tool, com

Re: Question about interface builder

2008-11-17 Thread Andy Lee
On Nov 17, 2008, at 6:23 PM, Kyle Sluder wrote: I'm wondering if Apple's doing a good enough job explaining how IB is different from UI code generators and why it is important that one use it. I think this is a good question. Maybe it'd be worth having a WWDC session dedicated to clearing th

NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-17 Thread Rua Haszard Morris
I have found that NSSuperscriptAttributeName, NSUnderlineStyleAttributeName, and NSObliquenessAttributeName (those are the attributes that I have tested) render differently when Cocoa Text is used to draw the string. The attributes appear to be intrepreted inverted, in that 1 for superscri

Re: OutlineView, bindings and array of NSDictionaries.

2008-11-17 Thread Quincey Morris
On Nov 17, 2008, at 13:51, Sandro Noel wrote: I cant seem to get my data to display properly in the Outline View, and i am sure it is because of the organisation of my data See here: http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTreeController_Cla

Re: NSDateFormatter strangeness

2008-11-17 Thread Kyle Sluder
I think it's a known issue. The documentation for -[NSDate descriptionWithCalendarFormat:timeZone:locale:] (which I can only assume that -[NSDate description] calls) has this caveat: "There are several problems with the implementation of this method that cannot be fixed for compatibility reasons.

Re: Trouble with openFileWithoutUI

2008-11-17 Thread Kyle Sluder
On Mon, Nov 17, 2008 at 2:52 PM, <[EMAIL PROTECTED]> wrote: > It seemed like the think to use. Read that first sentence again. "Sent directly by the sender to the delegate..." The delegate is the receiver, not the NSApplication instance. > Ok, How do I open a file pragramatically? Read up on

Re: Question about interface builder

2008-11-17 Thread Kyle Sluder
On Mon, Nov 17, 2008 at 6:17 PM, macdev <[EMAIL PROTECTED]> wrote: > I guess 10+ years of developing in one platform pretty much shapes the way > one thinks about "how to build and write code". Learning to think like a Mac > developer is the hardest part so far... It very much does, and I don't me

Re: Question about interface builder

2008-11-17 Thread Kyle Sluder
On Mon, Nov 17, 2008 at 5:25 PM, Brian Stern <[EMAIL PROTECTED]> wrote: > I can tell you that the majority of iPhone developers are refusing to use > IB. The reasons I usually see are I didn't get the implication that the OP was doing iPhone development. In fact, I'd be very surprised if he were

RE: Question about interface builder

2008-11-17 Thread macdev
> mistakes. So it's really not a recommended technique. I understand > that what you're describing is what you're used to. You need to > understand that what you're used to isn't even close to optimal for > this platform. I guess 10+ years of developing in one platform pretty much shapes the way o

Re: Interface Builder & Wiring Objects

2008-11-17 Thread mmalcolm crawford
On Nov 17, 2008, at 1:46 PM, Andy Lee wrote: You don't have ivars "along with" outlets. An outlet *is* a particular kind of ivar. It's an object reference that is declared in such a way that IB recognizes it and allows you to assign its value graphically in IB. Typically the declaration

Re: Question about interface builder

2008-11-17 Thread Alex Kac
That's an interesting question. We use IB where we can on the iPhone and frankly we can use it a lot. Most of Apple's samples were redone to use IB when IB for iPhone became usable. Yes, there are many reasons to do things in code, but there are many to use IB. Its a balance. Using IB cuts

Re: Question about interface builder

2008-11-17 Thread Brian Stern
On Nov 17, 2008, at 4:59 PM, Kyle Sluder wrote: Why does everyone new to the platform want to immediately discard IB? It is the correct (yes, "correct", not "preferred", not "easiest", but *correct*) way to implement your interface. I can tell you that the majority of iPhone developers are re

Re: Writing a more usable AppleEvent logger

2008-11-17 Thread Dave DeLong
AEMonitor, AFAIK, is totally dead. My inquiries to the developer (Eric Oxalyn) haven't been answered. Dave On Nov 17, 2008, at 2:46 PM, has wrote: Have you looked at AE Monitor? http://software.oxalyn.com/AEMonitor ___ Cocoa-dev mailing

Re: core data - delete of object.

2008-11-17 Thread Jim Correia
On Nov 17, 2008, at 4:51 PM, John Clayton wrote: I'm using core-data and need to know when a particular core-data object (derived from NSManagedObject of course) is about to be deleted. I'm deleting objects simply by using the managed object context's deleteObject method, like this:

Re: Question about interface builder

2008-11-17 Thread Kyle Sluder
On Mon, Nov 17, 2008 at 7:49 AM, macdev <[EMAIL PROTECTED]> wrote: > I am migrating from PC/.NET development and I am very new to Xcode/IB/Cocoa. > I was wondering if I could generate GUIs using code without the need to use > the IB. Why does everyone new to the platform want to immediately disca

OutlineView, bindings and array of NSDictionaries.

2008-11-17 Thread Sandro Noel
Greetings! Once again, I am faced with a problem :) I cant seem to get my data to display properly in the Outline View, and i am sure it is because of the organisation of my data that it does not display so I'm asking you guy's to sugest some ideas. I have an array of Dictionaries the dict

core data - delete of object.

2008-11-17 Thread John Clayton
Hi All, I'm using core-data and need to know when a particular core-data object (derived from NSManagedObject of course) is about to be deleted. I'm deleting objects simply by using the managed object context's deleteObject method, like this: [[theObject managedObjectContext] del

Re: Writing a more usable AppleEvent logger

2008-11-17 Thread has
Ken Tozier wrote: I've been working with AppleEvents and discovering their internals by setting the following in the terminal export AEDebugSends=1; export AEDebugReceives=1 What I'd like to be able to do is observe apple events exactly like this tool but format them into an NSDictionary so

Re: Interface Builder & Wiring Objects

2008-11-17 Thread Andy Lee
On Nov 17, 2008, at 2:36 PM, Greg Deward wrote: In my example, I have the following items in my App Controller class: Text Field (along with an IBOutlet) Button (along with an IBOutlet) Table View (along with an IBOutlet) Mutable Array instance variable The

NSDateFormatter strangeness

2008-11-17 Thread Greg Hoover
I've worked with formatters for a while now, but this morning something odd happened. The following code translates the date string "17 Nov 2008" to "2007-12-23 00:00:00 -0800". NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat: @"d

Re: Opening Ports in Leopard

2008-11-17 Thread Andrew Farmer
On 17 Nov 08, at 04:40, Gerriet M. Denkmann wrote: I am trying to move a Cocoa app from Tiger to Leopard. This program wants to send and receive on port 123 (Network Time Protocoll) but it never gets no answers on Leopard. Do you have network time synchronization turned on already (in the D

Re: Trouble with openFileWithoutUI

2008-11-17 Thread jhjames3
Documentation for application:openFileWithoutUI: "Sent directly by sender to the delegate to request that the file filename be opened as a linked file. The method should open the file without bringing up its application’s user interface—that is, work with the file is under programmatic control o

Re: Interface Builder & Wiring Objects

2008-11-17 Thread Clark Cox
On Mon, Nov 17, 2008 at 11:36 AM, Greg Deward <[EMAIL PROTECTED]> wrote: > Luke / Randall, > > Thanks for replying. I did not want to embarrass Mr. Hillegass with my > ignorance, but his book IS the one I am trying to follow. I am currently > working on his "To Do List" example in Chapter 6 (page

Re: Interface Builder & Wiring Objects

2008-11-17 Thread Greg Deward
Luke / Randall, Thanks for replying. I did not want to embarrass Mr. Hillegass with my ignorance, but his book IS the one I am trying to follow. I am currently working on his "To Do List" example in Chapter 6 (page 110). In my example, I have the following items in my App Controller class

RE: Interface Builder & Wiring Objects

2008-11-17 Thread Etienne Guérard
As you pointed out, you have two kinds of relationship in IB: outlets and actions. >From a single object, you designate either an outlet object or a target object. For the target case, you have to specify the associated action selector. Usually though, you don't draw both kinds of connection from

Re: Displaying NSArray in NSTableView

2008-11-17 Thread Quincey Morris
On Nov 17, 2008, at 04:03, 양승준 wrote: Hi, I'm trying to display data in an array to a table view. The table view shows three rows, but no data in them. What did I do wrong? In IB, I connected the table view to the delegate in File's owner. Many thanks! Here is MyDocument.h: #import Cocoa.h

Re: Interface Builder & Wiring Objects

2008-11-17 Thread Randall Meadows
On Nov 17, 2008, at 11:09 AM, Greg Deward wrote: Good afternoon! I am trying to learn Cocoa and am having difficulty remembering which direction to CTRL-drag controls to wire up the controls in Interface Builder. For example, dragging from my button to my App Controller (NSObject) or vic

  1   2   >