Re: I need a milder application badge (solution)

2009-07-24 Thread Kyle Sluder
On Jul 24, 2009, at 11:17 PM, Jay Reynolds Freeman > wrote: I ended up finding a basically sane way to do this -- just one method, and I did not have to subclass NSView -- but with a large hack for one feature: Subclassing NSView is not a big deal. Just override -drawRect, draw the image you

Re: I need a milder application badge (solution)

2009-07-24 Thread Jay Reynolds Freeman
> I have cause to display something like an application badge on > the docktile of my app, but [the regular one won't do] ... Solution (I think ...): I ended up finding a basically sane way to do this -- just one method, and I did not have to subclass NSView -- but with a large hack for one feat

Unit testing question

2009-07-24 Thread lorenzo7620
I'd like to add unit testing to my app, but I'ma little bit unclear on the concept. I've looked at Apple's docs on the Sentest framework and had no trouble getting the sample project working, but I lose it when translating the concepts to my particular application. I've seen some sample proje

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Ken Thomases
On Jul 24, 2009, at 4:50 PM, Jerry Krinock wrote: On 2009 Jul 23, at 17:44, Ken Thomases wrote: On Jul 23, 2009, at 6:44 PM, Jerry Krinock wrote: I'd often like to block the main thread First question is: why? Blocking the main thread is usually bad and to be avoided. What are you actu

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Ken Thomases
On Jul 24, 2009, at 5:10 PM, Dave Keck wrote: The notifications don't cross threads; they are delivered in the thread where they are posted. Yes, I understand that. There must be some quirk that allows it to work when doing an NSTask Just a tidbit - I don't think there's any quirks inv

Re: Crash when MyDocument becomes the delegate of NSApplication

2009-07-24 Thread Jochen Moeller
Hi Kyle, You are right, I did not consider that. Because NSDocument is a controller object I used it similar to a self- made AppController. Thanks for your explanation. Jochen Moeller Am 25.07.2009 um 03:26 schrieb Kyle Sluder: Why would your document be an NSApplication delegate? What hap

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Graham Cox
On 25/07/2009, at 7:50 AM, Jerry Krinock wrote: First question is: why? Blocking the main thread is usually bad and to be avoided. What are you actually trying to achieve? Can you give an example of when that would be desirable? This happens any time that a user action absolutely requir

Re: Crash when MyDocument becomes the delegate of NSApplication

2009-07-24 Thread Kyle Sluder
On Fri, Jul 24, 2009 at 6:01 PM, Jochen Moeller wrote: > In a long run I tracked it down when myDocument is made the delegate of > NSApplication. Why would your document be an NSApplication delegate? What happens when you have two documents open -- you can't have two NSApplication delegates. So

Crash when MyDocument becomes the delegate of NSApplication

2009-07-24 Thread Jochen Moeller
Hello List, Suddenly my Doc-based Cocoa App began to crash always when I closed a window. In a long run I tracked it down when myDocument is made the delegate of NSApplication. I did the following few steps to reproduce the crash with an empty App. in Xcode 3.1.3: New Document-based Coc

Display csv in a tableView with bindings

2009-07-24 Thread gumboots
I need some direction please. I would like to load a csv file and display the contents in an NSTableView. What is the best way to achieve this with bindings? Should the model store the data in an array of arrays (rows and columns) or a dictionary of arrays (keyed columns and rows)? __

Re: Search Item in the Application menu missing in Other languages

2009-07-24 Thread Peter Ammon
On Jul 24, 2009, at 11:22 AM, Arun wrote: Hi All, I have a cocoa application which is localized in multiple languages. My application uses default Menu's like File, Edit, View, etc., When the language is set to English in the System Preferences -> International -> languages, Under the Help men

Re: memory allocation different in simulator and on the iPhone [solved]

2009-07-24 Thread Dragos Ionel
Dear all, Thank you all for the feedback. With that help and few hours of digging I was able to solve the problem. Just for reference here is what I was doing wrong; 1. UIImage* image = [UIImage imageNamed:fileName]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; *[image *

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Charles Srstka
On Jul 24, 2009, at 5:10 PM, Dave Keck wrote: The notifications don't cross threads; they are delivered in the thread where they are posted. Yes, I understand that. There must be some quirk that allows it to work when doing an NSTask Just a tidbit - I don't think there's any quirks inv

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Dave Keck
>> The notifications don't cross threads; they are delivered in the thread >> where they are posted. > > Yes, I understand that.  There must be some quirk that allows it to work > when doing an NSTask Just a tidbit - I don't think there's any quirks involved. The general idea is this: NSTask creat

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Jerry Krinock
On 2009 Jul 23, at 17:44, Ken Thomases wrote: On Jul 23, 2009, at 6:44 PM, Jerry Krinock wrote: I'd often like to block the main thread First question is: why? Blocking the main thread is usually bad and to be avoided. What are you actually trying to achieve? Can you give an example

errSecDuplicateItem keychain error

2009-07-24 Thread Alejandro Rodriguez
Hello all, I'm having a very odd problem. I'm trying to add a keychain item using SecKeychainItemCreateFromContent from the security framework. Of course before trying to add a new item I check if it exists with: SecKeychainSearchCreateFromAttributes.That's when the odd part comes in, I

Search Item in the Application menu missing in Other languages

2009-07-24 Thread Arun
Hi All, I have a cocoa application which is localized in multiple languages. My application uses default Menu's like File, Edit, View, etc., When the language is set to English in the System Preferences -> International -> languages, Under the Help menu there is an item called "Search". But if the

Re: Comparing NSImages

2009-07-24 Thread Greg Guerin
Benjamin Rister wrote: Thanks, I didn't know if there was a cleaner way than doing it pixel- by-pixel myself; the info on reasonable tolerances is also quite helpful. Image subtraction or differencing is an image-processing operation. Consider looking in that domain. E.g. look for an O

Re: Text is flipped vertically

2009-07-24 Thread Agha Khan
I was able to fix that problem by CGContextTranslateCTM(context, 0.0, rect.size.height); CGContextScaleCTM(context,1.0, -1.0); It works fine now. Thank you for reply. Best regards Agha On Jul 23, 2009, at 8:18 PM, Kyle Sluder wrote: On Jul 23, 2009, at 6:03 PM, Agha Khan wrote: I was unabl

Re: Comparing NSImages

2009-07-24 Thread Benjamin Rister
On Jul 23, 2009, at 5:19 PM, Nick Zitzmann wrote: Considering that there are several different variations on the TIFF file format (e.g. big-endian vs. little-endian, 0 is black vs. 1 is black, and then there's metadata), this would not surprise me. Yeah, that's what I expected, thanks. On

Re: When saving the managed object context

2009-07-24 Thread Mike Abdullah
On 22 Jul 2009, at 15:22, Squ Aire wrote: How can I do some custom stuff before my NSManagedObjectContext saves? (I want to cleanup some "garbage" that might get created while my app is running). In my case this would be faster to do than override my NSManagedObject didTurnIntoFault. S

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Dave Camp
On Jul 23, 2009, at 4:44 PM, Jerry Krinock wrote: I'd often like to block the main thread while another thread or process performs a little task, but subject to a short timeout. A few weeks ago, I was able to achieve this by "running" the main thread's run loop while an NSTask completed.

Re: memory allocation different in simulator and on the iPhone

2009-07-24 Thread Jesse Armand
Try to use image allocation methods besides imageNamed Jesse Armand (http://jessearmand.com) On Fri, Jul 24, 2009 at 9:07 AM, Dragos Ionel wrote: > Hi, > I am working on a animal encyclopedia on iPhone. One of the pages displays > one photo of an animal.

Re: memory allocation different in simulator and on the iPhone

2009-07-24 Thread Jonathan del Strother
I believe +[UIImage imageNamed] caches the image, so you would see memory increasing. I'm guessing that you eventually triggered a memory warning, so UIImage dropped its caches, resulting in the crash due to your over-release. On Fri, Jul 24, 2009 at 1:04 PM, Dragos Ionel wrote: > You are right,

Re: mouse entered/exited in nscollectionviewitem's view

2009-07-24 Thread Keith Duncan
the setup code only gets called once and then none of the actually displayed views in the collection handle any of my intended mouse tracking. That's probably because your subclass of NSCollectionViewItem isn't getting created for each item. You can override -copyWithZone: to confirm this

[Modderato]Re: iPhone List? - few questions

2009-07-24 Thread Scott Anguish
None of this is Cocoa related take it off the list immediately On 2009-07-24, at 7:36 AM, Jesse Armand wrote: I suppose mobile banking is less secure than regular internet banking ? I'm not sure what is the weakness in mobile banking, compared to regular internet banking, where both of the

[OT] Re: iPhone List? - few questions

2009-07-24 Thread Alastair Houghton
On 24 Jul 2009, at 12:36, Jesse Armand wrote: I suppose mobile banking is less secure than regular internet banking ? I'm not sure what is the weakness in mobile banking, compared to regular internet banking, where both of them have a secure device to generate code for transactions ? Let's s

Re: memory allocation different in simulator and on the iPhone

2009-07-24 Thread Dragos Ionel
You are right, I was over releasing and maybe that was crashing the app. But still, even without [image release] the memory used by the app on iPhone is slowly increasing (like 3K for each image display). Maybe that is supposed to happen , maybe something is cached somewhere. But the good thing is

Re: iPhone List? - few questions

2009-07-24 Thread Jesse Armand
I suppose mobile banking is less secure than regular internet banking ? I'm not sure what is the weakness in mobile banking, compared to regular internet banking, where both of them have a secure device to generate code for transactions ? Let's say somebody stole your phone, what can he/she do wi

Re: Model index and Array Controller index

2009-07-24 Thread I. Savant
On Jul 23, 2009, at 11:46 PM, Ben Lachman wrote: So when do you actually do this, in the drop methods or somewhere more central? On accept drop. It's typically the only place I manually order items, so that kind of *is* the central location. :-) Everything else is handled by sort descri

Re: [iPhone] Zero opacity causes UIView to go numb (solved)

2009-07-24 Thread Sebastian Morsch
Completely transparent views (opacity 0.0) don't receive touch events Thanks Hank, good to know! :-) you're not missing anything there Actually, I did. I was thinking to complicated by animating 'opacity' for hiding/revealing a CALayer. That's exactly what's its 'hidden' property is

Re: memory allocation different in simulator and on the iPhone

2009-07-24 Thread Jonathan del Strother
UIImage* image = [UIImage imageNamed:fileName]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; [image release]; You're overreleasing the image there. You sure the phone is dying because it's out of memory, rather than because of that? On Fri, Jul 24, 2009 at 3:07 AM, Dragos

Re: iPhone List? - few questions

2009-07-24 Thread Gustavo Pizano
Roland hello. Thanks for the advises, I think I will stick with the reply SMS-> save my app status-> close my app -> (hit the link of the sms if comes with url, or copy the access code and relaunch my app)-> complete the authentication with the access code. well, if that;s they way to d

Re: iPhone List?

2009-07-24 Thread Scott Anguish
On 2009-07-23, at 3:04 AM, Gustavo Pizano wrote: Hello, I wish to know if this list works also for iPhone developer, I hadn't found one related to iPhone except the govIphone, that its for goverment iPhone apps... so.. :S. If this is the correct list to write then please let me know so I

[moderator] Re: Recording phone calls

2009-07-24 Thread Scott Anguish
WAY off topic. [moderator] On 2009-07-23, at 8:20 PM, Conrad Taylor wrote: On Thu, Jul 23, 2009 at 8:53 AM, Scott Ribe >wrote: ...most states require the consent of both parties for one party to record the conversation. Actually, most states require the consent of only a single party. A