Re: Cocoa and Computational Expense

2009-06-21 Thread Roland King
On Jun 21, 2009, at 1:50 PM, Justin Carlson wrote: Finally, on a side note and because this is my first OOP, just how big should a class get? Just as a rule of thumb. I have 700 lines and 50 methods in my MyDocument class and it seems positively bloated to me. It probably is too

Re: Crash in KVO when using -keyPathsForValuesAffectingKey

2009-06-21 Thread Quincey Morris
On Jun 20, 2009, at 14:15, Jean-Daniel Dupas wrote: Thank you for the suggestion, but it does not solve the problem. Even trying w1.object = nil before unregistring the observer has no effect. When I looked at your code a little harder, I realized my theory could not have been correct

Re: Crash in KVO when using -keyPathsForValuesAffectingKey

2009-06-21 Thread Jean-Daniel Dupas
Le 21 juin 09 à 11:26, Quincey Morris a écrit : On Jun 20, 2009, at 14:15, Jean-Daniel Dupas wrote: Thank you for the suggestion, but it does not solve the problem. Even trying w1.object = nil before unregistring the observer has no effect. When I looked at your code a little harder, I

Core Data Uniqueing not happening as expected

2009-06-21 Thread Jerry Krinock
My object graph in a Core Data document-based app shows the following relationship. Foo -- Bar I insert a single Bar and two Foos, then [foo1 setBar:bar] ; [foo2 setBar:bar] ; Save the document. [1] Fetch all Bars. Expected result: An array containing one Bar. Actual result: An array

renaming executable files

2009-06-21 Thread Angelo Chen
Hi, I need to rename the executable file without renaming the project, how to do that? thanks Yahoo!香港提供網上安全攻略,教你如何防範黑客! 請前往 http://hk.promo.yahoo.com/security/ 了解更多! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: renaming executable files

2009-06-21 Thread Filip van der Meeren
Just change the name of the targetname, or get Info on the proper target, and change the executable name in the properties tab. Filip van der Meeren On 21 Jun 2009, at 15:47, Angelo Chen wrote: Hi, I need to rename the executable file without renaming the project, how to do that? thanks

Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-21 Thread Donnie Lee
Hello, I created NSTableView and bind table column with NSTextFieldCell with custom NSValueTransformer subclass to NSArrayController. My value transformer should return NSAttributedString transformed from NSString. Everything works fine except that the table shows NSString instead of

Re: renaming executable files

2009-06-21 Thread Angelo Chen
thanks for the reply, i tried two approaches , all not working, still get the same name --- 2009年6月21日 星期日,Filip van der Meeren fi...@code2develop.com 寫道﹕ 寄件人: Filip van der Meeren fi...@code2develop.com 主題: Re: renaming executable files 收件人: Angelo Chen angelochen...@yahoo.com.hk 副本(CC):

Re: renaming executable files

2009-06-21 Thread Filip van der Meeren
I guess I have misread your question... You should see the folder Products in your groups files... Just change the name of your application/framework in your products folder. Filip van der Meeren On 21 Jun 2009, at 17:02, Angelo Chen wrote: thanks for the reply, i tried two approaches ,

Possible to set tab stops in an NSTextView?

2009-06-21 Thread Ken Tozier
Hi I'm working with an NSText view and want to display tab delimited strings in a table format. I don't need a full NSTable, just the ability to break up the text into columns using tab stops. Is there any built-in way to do this? Something like setTabStops? I looked in NSTextView,

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Jim Correia
On Sun, Jun 21, 2009 at 11:44 AM, Ken Tozier kentoz...@comcast.net wrote: I'm working with an NSText view and want to display tab delimited strings in a table format. I don't need a full NSTable, just the ability to break up the text into columns using tab stops. Is there any built-in way to

Re: Cocoa and Computational Expense

2009-06-21 Thread WT
On Jun 21, 2009, at 1:36 AM, syntonica wrote: Hello All-- Hi Kevin, I don't have much to add to the responses that others have already given you for your other questions, but I'll address the question below because I haven't seen anyone yet say what I'm about to say. Finally, on a side

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Ashley Clark
On Jun 21, 2009, at 10:44 AM, Ken Tozier wrote: Hi I'm working with an NSText view and want to display tab delimited strings in a table format. I don't need a full NSTable, just the ability to break up the text into columns using tab stops. Is there any built-in way to do this? Something

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread Quincey Morris
On Jun 21, 2009, at 06:26, Jerry Krinock wrote: My object graph in a Core Data document-based app shows the following relationship. Foo -- Bar I insert a single Bar and two Foos, then [foo1 setBar:bar] ; [foo2 setBar:bar] ; Save the document. [1] Fetch all Bars. Expected result: An

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread Jerry Krinock
On 2009 Jun 21, at 09:55, Quincey Morris wrote: First, you *seem* to be suggesting that uniquing is a process of winnowing away unwanted duplicate objects, but I'm pretty sure that Core Data doesn't create duplicate objects. Rather, it seems likely that it uses the object UID to find out

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread Jerry Krinock
On 2009 Jun 21, at 09:55, Quincey Morris wrote: Unless you can see 2 different objects with the same UID ... More precisely, you mean the same -objectID. Yup. To our surprise, my fetch request is returning two objects with the same objectID, or from a Core Data perspective, I suppose

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread Jerry Krinock
Whoops -- ignore previous post. I'm so accustomed to looking at UUID strings that I didn't notice the / p1 and /p2 on the ends of the object ID strings. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: NSDate scope

2009-06-21 Thread Ken Thomases
On Jun 20, 2009, at 6:52 PM, John Baldwin wrote: I declared a (NSDate *) in my .h file. NSDate *originalDate; The above is unclear. You mean you declared an instance variable in some class with type NSDate*? Then in my init method, I initialized it to the current date. I tried

Re: Just implementing -isEqual:, never invoked, causes crash

2009-06-21 Thread Ken Thomases
On Jun 20, 2009, at 7:26 PM, Jerry Krinock wrote: Oh, I also figured out how to enter a command in the gdb console -- You have to hit the 'enter' key instead of 'return' after entering a command. I've never used 'enter' in a console-type-thing. I suppose this may be to allow multi-line

Core Data capabilities questions

2009-06-21 Thread Rick Mann
My iPhone app is running into memory issues. I have some objects that I load via Core Data all at once at startup, because I need at least some of the attributes for all of them almost all the time. Is it possible (or does Core Data automatically do this) for attributes that aren't

Re: Weird dyld loader crash

2009-06-21 Thread Ken Thomases
On Jun 20, 2009, at 10:44 PM, Andrew Farmer wrote: On 20 Jun 2009, at 20:27, Erg Consultant wrote: I suddenly started getting a weird loader crash when launching my app. Has anyone seen any errors similar to this one: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes:

Re: Core Data capabilities questions

2009-06-21 Thread Kyle Sluder
On Sun, Jun 21, 2009 at 1:48 PM, Rick Mannrm...@latencyzero.com wrote: Is it possible (or does Core Data automatically do this) for attributes that aren't accessed to not actually load? For example, my entities have a description attributes that is rarely accessed. Will Core Data defer loading

Re: Core Data capabilities questions

2009-06-21 Thread Rick Mann
On Jun 21, 2009, at 14:04:42, Kyle Sluder wrote: On Sun, Jun 21, 2009 at 1:48 PM, Rick Mannrm...@latencyzero.com wrote: Is it possible (or does Core Data automatically do this) for attributes that aren't accessed to not actually load? For example, my entities have a description attributes

Re: NSDate scope

2009-06-21 Thread Kyle Sluder
On Sat, Jun 20, 2009 at 4:52 PM, John Baldwinjohnbaldwinco...@gmail.com wrote: I declared a (NSDate *) in my .h file. Where? Inside an @implementation, or as a global variable? If it's a global variable, you are aware that for every translation unit that imports your header, you will wind up

Re: Core Data capabilities questions

2009-06-21 Thread Kyle Sluder
On Sun, Jun 21, 2009 at 2:06 PM, Rick Mannrm...@latencyzero.com wrote: Yeah, I figured I could do this, just didn't want to :-) This is an important point to be made about Core Data, and one that often trips up people new to the framework: Core Data is NOT an RDBMS. It's not intended to be used

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread mmalc Crawford
On Jun 21, 2009, at 1:23 PM, Jerry Krinock wrote: x-coredata://101E2F60-412A-41EE-9DEF-59797757C29C/Browfile_entity/p1[perm] , x-coredata://101E2F60-412A-41EE-9DEF-59797757C29C/Browfile_entity/p2[perm] ) 2009-06-21 13:04:00.995 TestApp[77117:10b] 47115: pointers to fetched objects:

Re: Core Data capabilities questions

2009-06-21 Thread mmalc Crawford
On Jun 21, 2009, at 2:04 PM, Kyle Sluder wrote: Is it possible (or does Core Data automatically do this) for attributes that aren't accessed to not actually load? For example, my entities have a description attributes that is rarely accessed. Will Core Data defer loading the data for that

Re: Core Data capabilities questions

2009-06-21 Thread Kyle Sluder
On Sun, Jun 21, 2009 at 2:22 PM, mmalc Crawfordmmalc_li...@me.com wrote: This is not the case with iPhone OS -- see NSFetchRequest's setPropertiesToFetch: Well hot damn! That's what I get for sticking to the desktop I guess. --Kyle Sluder ___

Re: Cocoa and Computational Expense

2009-06-21 Thread syntonica
Thanks All for your replies. I think I have seen the error of my ways regarding the size of my class. Since I had two classes that were so hopelessly intertwined, I put them together into one and now I see that I could indeed have done it instead with two or maybe three. The paradigm shift

iPhone: Landscape support for tab bar?

2009-06-21 Thread Rick Genter
I'm just starting to design/develop my first iPhone app and have been reviewing the iPhone human interface guidelines. Is it true that tab bars do not support landscape mode? -- Rick Genter rick.gen...@gmail.com ___ Cocoa-dev mailing list

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Ken Tozier
Thanks Ashley I tried your snippet, but am getting the following error: 2009-06-21 18:32:34.912 QuarkXPress[4956:10b] *** -[NSCFNumber location]: unrecognized selector sent to instance 0x300bc300 2009-06-21 18:32:34.914 QuarkXPress[4956:10b] NSATSTypesetter: 0x23c60e70: Exception ***

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Andrew Farmer
On 21 Jun 2009, at 15:44, Ken Tozier wrote: Here's how I interpreted your code NSArray *tabStops = [[[NSArray alloc] initWithObjects: [NSNumber numberWithInt: 70], [NSNumber numberWithInt:

Missing functionality in copy/paste of NSAttributedStrings? or of NSData?

2009-06-21 Thread James Stein
I use a few non-standard attributes in NSAttributedStrings. (Standard attributes are listed in the Attributed Strings Programming Guide.) My first stumbling block is that such a string (or substring) in an NSTextView, when copied and pasted, will lose its non-standard attributes. (As an aside,

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Ken Tozier
Thanks Andrew. That worked. On Jun 21, 2009, at 7:04 PM, Andrew Farmer wrote: On 21 Jun 2009, at 15:44, Ken Tozier wrote: Here's how I interpreted your code NSArray *tabStops = [[[NSArray alloc] initWithObjects: [NSNumber numberWithInt:

Re: iPhone: Landscape support for tab bar?

2009-06-21 Thread WT
On Jun 21, 2009, at 9:51 PM, Rick Genter wrote: I'm just starting to design/develop my first iPhone app and have been reviewing the iPhone human interface guidelines. Is it true that tab bars do not support landscape mode? I would imagine that the documentation would give you the answer to

Re: Missing functionality in copy/paste of NSAttributedStrings? or of NSData?

2009-06-21 Thread Graham Cox
On 22/06/2009, at 9:27 AM, James Stein wrote: I need to create an NSData object from my NSAttributedString. But how? NSData* myStringData = [NSKeyedArchiver archivedDataWithRootObject:myString]; --Graham ___ Cocoa-dev mailing list

Re: Cocoa and Computational Expense

2009-06-21 Thread Graham Cox
On 22/06/2009, at 8:08 AM, syntonica wrote: The paradigm shift from all data available at all times with all the globals you can eat to private data has been a difficult one to make for me. I think most people who move to object-oriented programming from a classical programming

Any Cocoa Developers on this list in Tallinn, Estonia?

2009-06-21 Thread Kok-Yong Tan
There's a potential client there I'd like to refer to you. Please reply to me off-list. Thanks. Tan -- Reality Artisans, Inc. # Network Wrangling and Delousing P.O. Box 565, Gracie Station # Apple Certified Help Desk Specialist New York, NY

Re: Missing functionality in copy/paste of NSAttributedStrings? or of NSData?

2009-06-21 Thread Michael Ash
On Sun, Jun 21, 2009 at 7:27 PM, James Steinco...@stein.org wrote: I use a few non-standard attributes in NSAttributedStrings. (Standard attributes are listed in the Attributed Strings Programming Guide.) My first stumbling block is that such a string (or substring) in an NSTextView, when

Re: Show the dock icon's context menu:

2009-06-21 Thread Andrew Farmer
On 19 Jun 2009, at 16:37, Ian was here wrote: I think the best way to show an application dock icon's context menu from within the application itself is to write an AppleScript that can find the desired application's dock icon, then ask it to show its context menu. And how would you

Re: Core Data capabilities questions

2009-06-21 Thread Rick Mann
On Jun 21, 2009, at 14:22:00, mmalc Crawford wrote: On Jun 21, 2009, at 2:04 PM, Kyle Sluder wrote: Is it possible (or does Core Data automatically do this) for attributes that aren't accessed to not actually load? For example, my entities have a description attributes that is rarely

Core Data Fetching Limitations?

2009-06-21 Thread Ulai Beekam
Draw up the following model on a piece of paper: We have three entities: Department, Employee, and EmployeeCar. Each of them has the 'name' attribute. Department has the to-many 'employees' relationship to Employee. Its inverse is, naturally, the to-one 'department' relationship in Employee.

Re: Core Data capabilities questions

2009-06-21 Thread Rick Mann
Is there also a way to tell Core Data to release objects it has currently allocated? ___ 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

Core Data Fetching Limitations?

2009-06-21 Thread Ulai Beekam
(Sorry, the previous post was not sent with plaintext) Please draw up the following model on a piece of paper: We have three entities: Department, Employee, and EmployeeCar. Each of them has the 'name' attribute. Department has the to-many 'employees' relationship to Employee. Its inverse

Re: Core Data capabilities questions

2009-06-21 Thread mmalc Crawford
On Jun 21, 2009, at 5:56 PM, Rick Mann wrote: Is there also a way to tell Core Data to release objects it has currently allocated? A managed object's lifetime is by default determined by the run loop— autoreleased managed objects will be deallocated when the run loop's autorelease pool

Re: Show the dock icon's context menu:

2009-06-21 Thread Uli Kusterer
Am 22.06.2009 um 02:46 schrieb Andrew Farmer: And how would you propose to do that? AppleScript isn't magic (sadly). It can't do anything that you can't do from code already. Look at the docs. AppleScript supports GUI scripting, which is a layer above the accessibility APIs and some other

Re: How to fill rectangle under vertical scroller?

2009-06-21 Thread Uli Kusterer
Am 19.06.2009 um 04:23 schrieb Sumin Kim: the area under the vertical scroller and right to horizontal scroller still remains white. I tried to set different origin and frame size for the view that is supposed to be drawn the area, but the results have not changed. Where in the window

Re: Core Data capabilities questions

2009-06-21 Thread Kyle Sluder
On Sun, Jun 21, 2009 at 5:56 PM, Rick Mannrm...@latencyzero.com wrote: Is there also a way to tell Core Data to release objects it has currently allocated? After you've read the documentation mmalc pointed you at, also take a look at the section Turning Objects into Faults in the Faulting and

Re: Core Data capabilities questions

2009-06-21 Thread Rick Mann
On Jun 21, 2009, at 18:36:55, Kyle Sluder wrote: On Sun, Jun 21, 2009 at 5:56 PM, Rick Mannrm...@latencyzero.com wrote: Is there also a way to tell Core Data to release objects it has currently allocated? After you've read the documentation mmalc pointed you at, also take a look at the

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread Jerry Krinock
Well, the explanation of where these two Bars came from turned out to be quite interesting, so I thought I'd report it. It turns out that I wasn't inserting any Bars at all into that moc. But when I did this: [foo1 setBar:bar] ; [foo2 setBar:bar] ; the Foos and the bar were in

Re: Core Data Uniqueing not happening as expected

2009-06-21 Thread Quincey Morris
On Jun 21, 2009, at 19:02, Jerry Krinock wrote: It turns out that I wasn't inserting any Bars at all into that moc. But when I did this: [foo1 setBar:bar] ; [foo2 setBar:bar] ; the Foos and the bar were in different managed object contexts that had different stores -- Yikes -- I was

Re: How to fill rectangle under vertical scroller?

2009-06-21 Thread Graham Cox
On 21/06/2009, at 9:18 AM, Sumin Kim wrote: Hi, Graham, I think I finally got what you said. I referred your linked sample, and implemented my source as follows.(I enclose my source for anyone who has same problem with many thanks to this list.) I also needed to add some code to

Re: Approaches for this Matching Problem?

2009-06-21 Thread Jerry Krinock
Given the numbers in your post, 3-5, 250 and several, I'd say you should just split the phrase into words, write an outer loop for(words in phraseWords), an inner loop for(tag in tags), and inside it all compare using -isEqualToString, breaking when found. Just do it. You won't even

Re: Show the dock icon's context menu:

2009-06-21 Thread Michael Ash
On Sun, Jun 21, 2009 at 9:19 PM, Uli Kustererwitness.of.teacht...@gmx.net wrote: Am 22.06.2009 um 02:46 schrieb Andrew Farmer: And how would you propose to do that? AppleScript isn't magic (sadly). It can't do anything that you can't do from code already. Look at the docs. AppleScript

Re: How to fill rectangle under vertical scroller?

2009-06-21 Thread Quincey Morris
On Jun 21, 2009, at 20:39, Graham Cox wrote: What I meant was to create a small view that is just the size of that small corner and use the -tile method to position it in the corner where you want it. This is what the sample code I pointed to is doing, albeit positioning a placard view in