Re: Resolution Independent View?

2009-05-14 Thread Gerriet M. Denkmann
On 13 May 2009, at 10:28, Chunk 1978 wrote: i suppose i could still try to do what i'm attempting by being slightly larger, but were your results on different screens drastically different in most cases? iBook (1024 x 768): CGDisplayScreenSize says: 250 x 180. My doctored numbers: 245.48352

Re: Calling undo programatically

2009-05-14 Thread Ryan Joseph
On May 14, 2009, at 12:48 PM, Graham Cox wrote: On 14/05/2009, at 3:37 PM, Ryan Joseph wrote: Great, thanks! That leads me to consider the real problem, do I need to create an undo manager manually if I create the NSTextView without initWithFrame:? I bet that's the problem... Thanks.

locale sensitive string comparison on Tiger

2009-05-14 Thread Martin Wierschin
Hi everyone, I'm attempting to compare some strings using arbitrary locales. On Leopard this works fine, the NSString method compare:options:range:locale: accepts an actual NSLocale instance. However, on Tiger the parameter is typed as NSDictionary. Searching the archives turns up that

Best practices for communicating with Java via Cocoa?

2009-05-14 Thread Conrad Taylor
Hi, what are the best practices for communicating to Java from Cocoa? It seems that a lot of the Java Bridge documents have been deprecated. For example, I'm seeing the following message: Legacy Document Important: The information in this document is obsolute and should not be used for new

Re: NSSpellChecker (foundation) broken for custom NSSpellServer servers

2009-05-14 Thread Adam Strzelecki
FYI this bug has been finally fixed in 10.5.7. I need to pay honor to Apple for writing me to check verify the bugfix, and to let many of us to switch spell checker language without glitches. This really makes my day! Thanks for everyone who followed this thread and sent reports to

how to write passord in KeyChain using cocoa

2009-05-14 Thread sandeep chaudhary
Hi all, I am working on Objective-C( cocoa framework). I need to write some data( like password...) in KeyChain Utility programatically.I have searched  about how to write in KeyChain but could not find any solution.  Can you plese tell me how can i write password in KeyChain programatically

Re: how to write passord in KeyChain using cocoa

2009-05-14 Thread I. Savant
On May 14, 2009, at 6:59 AM, sandeep chaudhary wrote: I am working on Objective-C( cocoa framework). I need to write some data( like password...) in KeyChain Utility programatically.I have searched about how to write in KeyChain but could not find any solution. That's odd, searching

[Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread malte . philipp
Hello list! On my path to learning Cocoa, I am currently trying to get a grasp on the bindings thing. Now I have run into a situation I can not solve myself, can not google the solution to, and could not get an answer to browsing Cocoa- Dev mailing list archive. I have the feeling it is

Re: Best practices for communicating with Java via Cocoa?

2009-05-14 Thread Warren Dodge
On May 14, 2009, at 3:08 AM, Conrad Taylor wrote: Hi, what are the best practices for communicating to Java from Cocoa? It seems that a lot of the Java Bridge documents have been deprecated. For example, I'm seeing the following message: Legacy Document Important: The information in this

Re: Special requirements for the window param of NSAlert beginSheetModalForWindow?

2009-05-14 Thread Michael Ash
On Thu, May 14, 2009 at 12:27 AM, Sean McBride cwat...@cam.org wrote: Michael Ash (michael@gmail.com) on 2009-05-13 11:07 PM said: 2) Display the second window as a modal panel instead of a sheet. Apple does this with NSSavePanel if you try to save over an existing file. It's easy and works

Re: Inverting a black and white NSImage

2009-05-14 Thread Eric Gorr
On May 13, 2009, at 7:08 PM, Randall Meadows wrote: On May 13, 2009, at 4:59 PM, Eric Gorr wrote: I have a black and white NSImage with some pixels in the image totally transparent. I need to change the white pixels to black, the black pixels to white, and leave the transparent area in the

Re: Special requirements for the window param of NSAlert beginSheetModalForWindow?

2009-05-14 Thread Keary Suska
On May 13, 2009, at 9:07 PM, Michael Ash wrote: 3) Use performSelector:withObject:afterDelay: with a 0 delay to run the code to show the new sheet after the old sheet has truly gone away. This will result in one sheet being followed by another sheet as you desire. I have had success with

Re: Updating NSTableView

2009-05-14 Thread Scott Ribe
Actually I have big DB, so for a single change it will take lot of time to get reflected NSTableView only fetches data for rows as they are displayed, so it should not take a long time to redraw. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice

Re: Updating NSTableView

2009-05-14 Thread I. Savant
On Thu, May 14, 2009 at 10:24 AM, Scott Ribe scott_r...@killerbytes.com wrote: Actually I have big DB, so for a single change it will take lot of time to get reflected NSTableView only fetches data for rows as they are displayed, so it should not take a long time to redraw. ... well,

Re: Updating NSTableView

2009-05-14 Thread Scott Ribe
... well, unless you have variable-height rows. Then (potentially complex) calculations have to be done to determine those cells that do need to be drawn. Corbin? Do I have this right? Well yes. Although that can be solved with the right underlying model... -- Scott Ribe

Re: Updating NSTableView

2009-05-14 Thread I. Savant
On Thu, May 14, 2009 at 10:34 AM, Scott Ribe scott_r...@killerbytes.com wrote:   ... well, unless you have variable-height rows. Then (potentially complex) calculations have to be done to determine those cells that do need to be drawn.   Corbin? Do I have this right? Well yes. Although that

Re: Updating NSTableView

2009-05-14 Thread Scott Ribe
[ Intrigued ] ... that being? First a fast way to read the data off disk to begin with, for start up time. Then caching of row heights when they are calculated. Finally binary search of row heights/positions when mapping coordinates to row indexes. Of course depending on what calculations are

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

2009-05-14 Thread Scott Ribe
Please ignore the original question. No ;-) It is perfectly reasonable for a handful of objects to get allocated and never freed throughout the lifetime of a run. It is perfectly reasonable for some such objects to be instantiated lazily rather than at startup. So it is normal to have some

Re: Updating NSTableView

2009-05-14 Thread I. Savant
On Thu, May 14, 2009 at 10:41 AM, Scott Ribe scott_r...@killerbytes.com wrote: First a fast way to read the data off disk to begin with, for start up time. Then caching of row heights when they are calculated. Finally binary search of row heights/positions when mapping coordinates to row

Re: [Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread Keary Suska
On May 14, 2009, at 5:51 AM, malte.phil...@mac.com wrote: Now here is what has me utterly confused and my actual question: In his tutorial Scott is setting up an NSObjectController (named ControllerAlias there) and binds that to the MyController instance with the explanation: quoteThis

Re: Updating NSTableView

2009-05-14 Thread Corbin Dunn
On May 14, 2009, at 7:49 AM, I. Savant wrote: On Thu, May 14, 2009 at 10:41 AM, Scott Ribe scott_r...@killerbytes.com wrote: First a fast way to read the data off disk to begin with, for start up time. Then caching of row heights when they are calculated. Finally binary search

Hide/Show Password

2009-05-14 Thread Patrick Neave
I would like to add a little button next to my apps password field to hide/show the password. I have searched this list but although it has bee mentioned I can find no example of doing this. NSSecureTextField seems to be the way to go but I am not having any luck. Any ideas how I could

Re: Hide/Show Password

2009-05-14 Thread Frederik Slijkerman
You can't toggle the password behavior in NSSecureTextField, so if you still need to toggle this, you can either create both a regular NSTextField and a NSSecureTextField and hide/show/synchronize them as needed, or recreate the text field with the correct class when needed... Best regards,

Re: Hide/Show Password

2009-05-14 Thread Keary Suska
On May 14, 2009, at 9:40 AM, Patrick Neave wrote: I would like to add a little button next to my apps password field to hide/show the password. I have searched this list but although it has bee mentioned I can find no example of doing this. NSSecureTextField seems to be the way to go but

Re: Interpreting -underlinePosition and -underlineThickness

2009-05-14 Thread Benjamin Stiglitz
How should NSFont's -underlinePosition and -underlineThickness values be interpreted? Are they fixed values, indicating an absolute offset, or are they some proportion of the pointSize or something else? In the optimal case (I’ll explain shortly), the underlinePosition is the number of

Re: Special requirements for the window param of NSAlert beginSheetModalForWindow?

2009-05-14 Thread Sean McBride
On 5/14/09 8:12 AM, Keary Suska said: Your advice is good, to be sure, but you are incorrect about the above. In fact, the 'do you want to replace?' question is displayed in a sheet that appears on top of the save panel sheet. Yes, but the docs are clear that stacked or nested sheets are

Re: initWIthFrame or awakeFromNib

2009-05-14 Thread Jonathan Hess
On May 13, 2009, at 9:32 PM, Joar Wingfors wrote: ...to follow up on that a bit: When you're instantiated from nib loading you will not see -initWithFrame: being called, but rather -initWithCoder:. You can read more about that in the NSCoding Nib Loading documentation. Depending on what

Re: Updating NSTableView

2009-05-14 Thread Todd Freese
If anyone has a tutorial or sample code for this it would be greatly appreciated! This issues comes up from time to time and there is not a lot sample code out there for it. Most of the posts are conceptual rather than examples. Todd On May 14, 2009, at 10:14 AM, Corbin Dunn wrote: On

Re: Updating NSTableView

2009-05-14 Thread Corbin Dunn
You are welcome to log a bug report requesting a sample. Please detail the things you would like to see in it. These are also the types of things we could cover at a WWDC event. I will be giving an advanced table view talk: Presenting User Data with Table Views and Browsers

Re: [Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread malte . philipp
On 14.05.2009, at 16:55, Keary Suska wrote: On May 14, 2009, at 5:51 AM, malte.phil...@mac.com wrote: Now here is what has me utterly confused and my actual question: In his tutorial Scott is setting up an NSObjectController (named ControllerAlias there) and binds that to the MyController

display optimization / display rectangles

2009-05-14 Thread David Harper
Hello, I'm working on optimizing a document based application, and I've found that overdrawing is a significant contributor to the (tolerable, but non-ideal) performance issues I am experiencing. The reason overdrawing occurs is as follows: Let's say the user draws a line in the document from

Check box with differwnt backgrouns colours

2009-05-14 Thread Arun
Hi All, Is it possible to fill up check-box with different background colours? If yes how can we achieve this? Thanks Arun ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: NSURLConnection willSendRequest: not behaving as expected on a 302 response - no further response after nil return

2009-05-14 Thread Cédric Luthi
This was indeed a bug and has been fixed in Mac OS X 10.5.7 See http://www.openradar.me/6700222 for the bug report. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: [Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread Quincey Morris
On May 14, 2009, at 04:51, malte.phil...@mac.com wrote: Now here is what has me utterly confused and my actual question: In his tutorial Scott is setting up an NSObjectController (named ControllerAlias there) and binds that to the MyController instance with the explanation: quote This

Re: display optimization / display rectangles

2009-05-14 Thread Quincey Morris
On May 14, 2009, at 10:09, David Harper wrote: In my document view class' drawRect: method, everything in the document overlapping the display rectangle is drawn. However, my pages are drawn as rectangular bezier paths with attached NSShadows, so I draw an entire page if it overlaps the

Re: [Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread Keary Suska
On May 14, 2009, at 11:07 AM, malte.phil...@mac.com wrote: To possibly refine my initial question a bit better though: In Scott's example I can *remove* the NSObjectController and bind the NSArrayController (he's binding to that NSObjectController) *directly* to the MyController instance in

NSURLConnection sendSynchronousRequest: crashes since upgrading to 10.5.7

2009-05-14 Thread Greg Hoover
After upgrading to 10.5.7 I've been having intermittent trouble with deallocated objects in NSURLConnections. All of my URL requests are made using sendSynchronousRequest. Everything is fine for about 10-15 minutes, then I get this crash. I am making requests on multiple threads,

[MEET] BYU CocoaHeads tonight @ 7PM

2009-05-14 Thread Dave DeLong
Hi everyone, BYU CocoaHeads will be having their monthly meeting tonight at 7pm in W108 TNRB (Tanner building) on BYU Campus in Provo, UT. Matt Stoker, developer of Mobile Finder and student at the University of Utah, will be presenting on OpenGL. Parking is free, and a map to BYU campus can

NSURLConnection vs. NSThread

2009-05-14 Thread Eric E. Dolecki
Just curious, but if I am loading images into a UIImageView in table cells from online URLs, is it better to use NSThread or use async NSURLConnection to ensure that the scrolling is smooth while images are loaded in? Eric ___ Cocoa-dev mailing list

Re: [Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread malte . philipp
Thank you Keary and Quincey for your responses. I feel that my puzzlement has been resolved a great deal! :) Thank you. -Philipp ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: display optimization / display rectangles

2009-05-14 Thread Alastair Houghton
On 14 May 2009, at 18:09, David Harper wrote: I'm working on optimizing a document based application, and I've found that overdrawing is a significant contributor to the (tolerable, but non-ideal) performance issues I am experiencing. [snip] It sounds from your description as if the

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Michael Ash
On Thu, May 14, 2009 at 4:52 PM, Eric E. Dolecki edole...@gmail.com wrote: Just curious, but if I am loading images into a UIImageView in table cells from online URLs, is it better to use NSThread or use async NSURLConnection to ensure that the scrolling is smooth while images are loaded in?

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Luke the Hiesterman
I actually think for a simple case like this one, the NSThread approach will have simpler, more straightforward code. I say go with whichever way makes more sense for your style of coding. Luke On May 14, 2009, at 2:56 PM, Michael Ash wrote: On Thu, May 14, 2009 at 4:52 PM, Eric E. Dolecki

NSTableView clicked position

2009-05-14 Thread Richard Nichols
Hello all, I need to get the character position that the mouse was clicked on in a NSTableView column. I have the delegate and datasource set and the entire application works fine. Management now wants to be able to click on specific words and get more information. Getting the cell

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Mike Abdullah
Threads would be unnecessary hassle and probably slower performing. NSURLConnection maintains its own private thread for performing the work of all open URL connections, even if you are using the synchronous API. By using NSThread, you are just bringing an extra unnecessary thread into the

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Luke the Hiesterman
Why is it assumed that threads created by NSURLConnection are faster than threads created manually with NSThread? Luke On May 14, 2009, at 3:36 PM, Mike Abdullah wrote: Threads would be unnecessary hassle and probably slower performing. NSURLConnection maintains its own private thread for

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Luke the Hiesterman
To add to that thought, I should add that even if there is a performance difference, I'd be surprised if it's anything that anyone would notice. It's generally a mistake to assume there's a performance problem with a certain approach until you've actually seen the performance problem. In

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Alastair Houghton
On 14 May 2009, at 23:39, Luke the Hiesterman wrote: Why is it assumed that threads created by NSURLConnection are faster than threads created manually with NSThread? It isn't. Mike's point is that the chances of someone who is asking whether or not to use NSThread on a developer mailing

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Mike Abdullah
I am not saying that the threads created by NSURLConnection are in any way faster than those created manually. I am saying that NSURLConnection is going to use its own thread internally whatever you do, so throwing another thread into the mix is only adding additional overhead. As it

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Michael Ash
On Thu, May 14, 2009 at 6:42 PM, Luke the Hiesterman luket...@apple.com wrote: To add to that thought, I should add that even if there is a performance difference, I'd be surprised if it's anything that anyone would notice. It's generally a mistake to assume there's a performance problem with a

Re: Interpreting -underlinePosition and -underlineThickness

2009-05-14 Thread Graham Cox
On 15/05/2009, at 1:59 AM, Benjamin Stiglitz wrote: How should NSFont's -underlinePosition and -underlineThickness values be interpreted? Are they fixed values, indicating an absolute offset, or are they some proportion of the pointSize or something else? In the optimal case (I’ll

Class Singleton Instantiation

2009-05-14 Thread Eric Hermanson
In the CryptoExercise iPhone example, they allocate a shared instance like this: = static SecKeyWrapper * __sharedKeyWrapper = nil; + (SecKeyWrapper *)sharedWrapper { @synchronized(self) { if (__sharedKeyWrapper == nil) { [[self alloc] init];

NSCFArray autoreleased with no pool in place

2009-05-14 Thread Tron Thomas
I am writing a Cocoa application that links to many frameworks. For some reason when I debug the program the following message appears in the debug output: *** _NSAutoreleaseNoPool(): Object 0x409660 of class NSCFArray autoreleased with no pool in place - just leaking This message is

Re: Class Singleton Instantiation

2009-05-14 Thread Kiel Gillard
On 15/05/2009, at 11:32 AM, Eric Hermanson wrote: Is the above paradigm any better/worse than doing something simpler, like the following (which is the paradigm I've been using) The sample code prevents other developers from allocating subsequent instances. See

Fetch Requests on Non Standard Classes in Core Data

2009-05-14 Thread Ian Peters-Campbell
Hey all, I'm fairly new to iPhone/Cocoa, and brand new to Core Data. I'm in the process of writing a data manager, and I would like it to use Core Data. Unfortunately my brain is breaking a little bit with a conceptual issue. I need an entity which will store some binary data along with a guid

Invoice program made in Objective c/Cocoa

2009-05-14 Thread Pedro Castel-Branco
Hi I am a 4D developer for almost 15 years. In the beginning of this year I am studding the idea of chancing my range of Invoice Programme made in 4D to XCODE/Objective-c 2.0/Cocoa. One of the reasons is the very expensive cost that 4D has when you work in Client/Server Mode. And the

LMSetKey[Rep]Thresh

2009-05-14 Thread Christopher Hansen
Hello, I'm writing a game and I need to set the key and key repeat thresholds in my Cocoa application. The functions needed to do to this under Carbon (Events.h) are: LMGetKeyThresh LMSetKeyThresh LMGetKeyRepThresh LMSetKeyRepThresh I'm looking for the Cocoa equivalents. Thank you,

Using an arraycontroller for different object classes

2009-05-14 Thread Gideon King
Hi, I have a situation where I have an array of objects that I want to bind to so I can use them in an inspector, but the objects are of different classes, and I want the inspector to only see the objects that have the key that I am binding to. For example, if I have an array of vehicles,

Re: Class Singleton Instantiation

2009-05-14 Thread Kiel Gillard
The first sentence of my reply should read The sample code prevents the allocation of subsequent instances. Sorry for the ambiguity. Kiel On 15/05/2009, at 11:46 AM, Kiel Gillard wrote: On 15/05/2009, at 11:32 AM, Eric Hermanson wrote: Is the above paradigm any better/worse than doing

Re: NSURLConnection vs. NSThread

2009-05-14 Thread George Warner
On Thu, 14 May 2009 16:52:48 -0400, Eric E. Dolecki edole...@gmail.com wrote: Just curious, but if I am loading images into a UIImageView in table cells from online URLs, is it better to use NSThread or use async NSURLConnection to ensure that the scrolling is smooth while images are loaded

Re: NSCFArray autoreleased with no pool in place

2009-05-14 Thread Clark Cox
On Thu, May 14, 2009 at 6:43 PM, Tron Thomas tron.tho...@verizon.net wrote: I am writing a Cocoa application that links to many frameworks.  For some reason when I debug the program the following message appears in the debug output: *** _NSAutoreleaseNoPool(): Object 0x409660 of class

Re: NSURLConnection vs. NSThread

2009-05-14 Thread Eric E. Dolecki
I'm going to try NSURLConnection first I guess and see how it goes. I'm loading larger images that get resized down in the table so I'll have the larger images cached for display in a details view. Thanks for all of this valuable feedback! Eric On Thu, May 14, 2009 at 11:21 PM, George Warner

Re: [Newbie] Binding an NSArrayController with/without NSObjectController

2009-05-14 Thread Ken Thomases
On May 14, 2009, at 6:51 AM, malte.phil...@mac.com wrote: I would really like to understand the difference in approach between these two methods and also if there are any implications by using or skipping an NSObjectController in between. Would anyone find the time and inclination to

Re: Class Singleton Instantiation

2009-05-14 Thread Eric Hermanson
Thank You. Good explanation. The example/doc makes sense and seems to be the safest route, although possibly overkill for private code that is not going to be distributed to other developers. - Eric On May 14, 2009, at 9:46 PM, Kiel Gillard wrote: On 15/05/2009, at 11:32 AM, Eric

Re: Using an arraycontroller for different object classes

2009-05-14 Thread Ken Thomases
On May 14, 2009, at 7:07 PM, Gideon King wrote: Hi, I have a situation where I have an array of objects that I want to bind to so I can use them in an inspector, but the objects are of different classes, and I want the inspector to only see the objects that have the key that I am binding

Re: display optimization / display rectangles

2009-05-14 Thread Graham Cox
On 15/05/2009, at 3:09 AM, David Harper wrote: I find this behavior to be somewhat bizarre, but nonetheless the solution seems to be to only draw a white rectangle using the NSIntersectionRect of both relevant rectangles. However, this causes a broken-up shadow appearance. Should I

Re: display optimization / display rectangles

2009-05-14 Thread Graham Cox
On 15/05/2009, at 3:24 PM, Graham Cox wrote: NSShadow (and the underlying CFShadow code) By which I meant CGContextSetShadow - you knew that... ;-) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Check box with differwnt backgrouns colours

2009-05-14 Thread Arun
Hi, I had a look at the code ... with the method suggested, user may not be able to click on the chec-box itself. Thanks Arun On Fri, May 15, 2009 at 10:48 AM, Graham Cox graham@bigpond.com wrote: On 15/05/2009, at 3:15 AM, Arun wrote: Hi All, Is it possible to fill up check-box

Re: Check box with differwnt backgrouns colours

2009-05-14 Thread Graham Cox
On 15/05/2009, at 3:37 PM, Arun wrote: Hi, I had a look at the code ... with the method suggested, user may not be able to click on the chec-box itself. I haven't gone into it in great detail, but it appears to support checked and unchecked states, but currently in the test app the

Re: Check box with differwnt backgrouns colours

2009-05-14 Thread Kyle Sluder
On Fri, May 15, 2009 at 1:37 AM, Arun arun...@gmail.com wrote: I had a look at the code ... with the method suggested, user may not be able to click on the chec-box itself. I doubt that Matt Gemmell would fail implement such fundamental behavior. You seem to be asking for someone to hand you