Re: cocoa app is cancelling shutdown

2010-07-21 Thread Kyle Sluder
On Wed, Jul 21, 2010 at 3:27 AM, Elizabeth Kellner wrote: > Second is that this app is being launched programmatically from > another app, using [NSTask launchedTaskWithLaunchPath:arguments:].  If > I launch the app directly, it does not seem to impede shutdown.  Is > there somehow a way for a ret

Saving numbered list as web archive causes indenting problem

2010-07-21 Thread Rob M
This is kind of an obscure problem, but any help would be appreciated :) GOAL Given an attributed string that contains a numbered list (created using NSTextView's List Panel), I want to programmatically scale the text larger, then save the scaled string as a web archive. PROBLEM When the attr

Re: Command-line parsing

2010-07-21 Thread Carter Allen
You might be thinking of DDCLI: http://www.dribin.org/dave/blog/archives/2008/04/29/ddcli/ I've used it before, and when you're writing an ObjC CLI, it does its job perfectly. - Carter Allen On Jul 21, 2010, at 8:54 AM, Fritz Anderson wrote: > I'm writing a Foundation tool that will take both

cocoa app is cancelling shutdown

2010-07-21 Thread Elizabeth Kellner
Hi, I have a cocoa app which is cancelling shutdown (message in german is "das Programm hat das Beenden abgebrochen"), and I don't know why. It also only happens sometimes. I am trying to shutdown with the applescript "tell application "System Events" to shut down", and I can't figure out what i

Re: How to force NSMenu to redraw its menu items?

2010-07-21 Thread Nava Carmon
Thanks guys for the advice, I'll definitely look into window approach. The "can NOT be updated" is Apple's guideline or real technical limitation? Thanks again, Nava On Jul 22, 2010, at 3:26 AM, Graham Cox wrote: > > On 22/07/2010, at 7:14 AM, Jerry Krinock wrote: > >> NSMenu can NOT be upda

Discard all drawing in a UIView

2010-07-21 Thread Malayil George
Hi, I am trying to draw to a custom UITableViewCell. The UITableViewCell has a UIView and I do some custom drawing in it's drawRect. However, in some cases while doing the drawing I run into an exception. I catch the exception and at this point, want to clear all existing drawing in the view and

Re: How to force NSMenu to redraw its menu items?

2010-07-21 Thread Graham Cox
On 22/07/2010, at 7:14 AM, Jerry Krinock wrote: > NSMenu can NOT be updated while it is being displayed. That can't literally be true - how do alternate menu items work? However, I think the general advice is right - use a window. --Graham ___ Co

Re: Command-line parsing

2010-07-21 Thread Daniel DeCovnick
I for one had no idea that existed. -Daniel On Jul 21, 2010, at 8:03 AM, Alastair Houghton wrote: On 21 Jul 2010, at 15:54, Fritz Anderson wrote: I'm writing a Foundation tool that will take both options and pathname arguments. If you use NSUserDefaults, you can handle key-value options (

Re: Debugger hangs?

2010-07-21 Thread Tony Romano
There is an issue the XCode front end has accessing variables for display. The formatters are used not only for the variable window but also others areas such as tool-tips. I filed a bug against this a few weeks ago(Bug# 8128556) To me the wrong approach is to turn off the formatters, this ma

Re: How to force NSMenu to redraw its menu items?

2010-07-21 Thread Jerry Krinock
On 2010 Jul 21, at 08:46, Kyle Sluder wrote: > Side note: It's been mentioned a few times in the past week or so that you'll > be better off if you don't use NSMenu, but instead a custom borderless > window. This is the approach Spotlight takes. It's worth taking that into > consideration earl

Re: Debugger hangs?

2010-07-21 Thread Charlie Dickman
I have turned the data formatters off and the debugger continues to get EXC_BAD_ACCESS while stepping through code. It then "times out fetching data" and everything is hosed. On Jul 21, 2010, at 12:03 PM, Nick Zitzmann wrote: > > On Jul 21, 2010, at 4:43 AM, sebi wrote: > >> every few times I

Re: Problem with category and obj-c++?

2010-07-21 Thread Laurent Daudelin
On Jul 21, 2010, at 12:14, Karl Moskowski wrote: > On 2010-07-21, at 1:26 PM, Laurent Daudelin wrote: > >> Is there some limitation on how categories perform or can be used when >> invoked by an Objective-C++ class? >> >> I started using the zipkit with an Objective-C++ class in one of my comma

UIImage Color Overlay

2010-07-21 Thread Tony S . Wu
Hi, I have a UIView with a UIImage as background, and I would like to overlay the UIImage with different colors according to user preferences. Right now I draw the image over the background, and apply the color overlay: UIImage *backgroundImage = [UIImage imageNamed:@"background.png"]; [backgro

Re: Problem with category and obj-c++?

2010-07-21 Thread Karl Moskowski
On 2010-07-21, at 1:26 PM, Laurent Daudelin wrote: > Is there some limitation on how categories perform or can be used when > invoked by an Objective-C++ class? > > I started using the zipkit with an Objective-C++ class in one of my command > line tool project. When I got everything wired prop

Re: WebView pagination for printing

2010-07-21 Thread Flavio Donadio
Matt and Gideon, Although my solution below is not Cocoa, WebView supports it. So, I can give further help off-list if the HTML/CSS subject is not adequate for this list. Gideon's requirements seem to be very simple and, although WebView's capabilities are not comparable to "real" printing, he

How to grab content of CALayer and sublayers into a bitmap

2010-07-21 Thread Oleg Krupnov
Hi, I need to make a snapshot of a CALayer, together with all its sublayers and effects, into a bitmap. I've found I can use -[CALayer renderInContext:], but I find it too slow, particularly because some of the sublayers have shadows and the Shark shows that most of time is spent in calculating b

Re: Flipping coordinate system of a CALayer

2010-07-21 Thread Oleg Krupnov
Responding to myself, as I promised. I have found a fatal problem with my approach on Leopard. The layers begin to appear in weird places, sometimes they disappear at all. As it turns out, -setPosition: is called with wrong values (probably assuming a different anchorPoint) and -setBounds: is calle

Problem with category and obj-c++?

2010-07-21 Thread Laurent Daudelin
Is there some limitation on how categories perform or can be used when invoked by an Objective-C++ class? I started using the zipkit with an Objective-C++ class in one of my command line tool project. When I got everything wired properly, I tried running the tool in debug mode. As soon as I cal

Re: Debugger hangs?

2010-07-21 Thread Nick Zitzmann
On Jul 21, 2010, at 4:43 AM, sebi wrote: > every few times I want to step through my code with Xcode's debugger it > eventually refuses to work. I click on the "Step Over" button and then > nothing happens. The variable window becomes empty and the three step buttons > become greyed out. The "

Re: How to force NSMenu to redraw its menu items?

2010-07-21 Thread Kyle Sluder
On Jul 21, 2010, at 5:27 AM, Nava Carmon wrote: > Hi, > > I'm implementing a custom status bar menu, which has a custom view with > NSSearchField. I'm updating number of menu items according to search results. > The number of menu items is changed as user types in the NSSearchField. I've > no

Re: How to force NSMenu to redraw its menu items?

2010-07-21 Thread Nava Carmon
I'm updating menu items as the user types in the NSSearchField. The number of menu items is up to number of search results. When number of search results stays the same and update menu items with new results (remove previous NSMenuItems and add new upon the search results), the menu is not being

Re: Core Data conflict detection

2010-07-21 Thread Miguel Arroz
Hi! On 2010/07/19, at 14:04, Paulo Andrade wrote: > You have two threads (T1 and T2) each with their own managed object context > (moc1 and moc2) which use the same persistent store coordinator. > > 1 - T1 reads ObjectX > > 2 - T2 reads ObjectX > 3 - T1 makes some changes to ObjectX > 4 - T2 m

Re: How to force NSMenu to redraw its menu items?

2010-07-21 Thread Jerry Krinock
On 2010 Jul 21, at 05:27, Nava Carmon wrote: > I'm implementing a custom status bar menu ... How do I force them to redraw? I'm not sure I quite understand your situation, but usually the answer is to implement the -menuNeedsUpdate:. This method is invoked whenever the menu is about to be dis

Re: WebView pagination for printing

2010-07-21 Thread Laurent Demaret
Kyle Sluder wrote: > If Apple were to provide a print-oriented table or report class, I > would expect and hope it was separate from NSTableView. NSTableView is > very much an onscreen control, and its design reflects such. There is the NSTextTable Class that inherits from NSTextBlock that goes i

Re: Command-line parsing

2010-07-21 Thread Alastair Houghton
On 21 Jul 2010, at 15:54, Fritz Anderson wrote: > I'm writing a Foundation tool that will take both options and pathname > arguments. > > If you use NSUserDefaults, you can handle key-value options (-threshold 17) > pretty easily, but this has limitations. I don't see how it can be graceful >

Re: Knowing how a Text Editing Session ended

2010-07-21 Thread Mike Abdullah
Look up the docs on NSTextDidEndEditingNotification. I believe the same user info gets handed out in controlTextDidEndEditing: On 21 Jul 2010, at 15:30, Motti Shneor wrote: > Hello Everyone. > > I'm implementing a programmatic wrapper for using an NSTextField on our > custom view --- > > I pr

Command-line parsing

2010-07-21 Thread Fritz Anderson
I'm writing a Foundation tool that will take both options and pathname arguments. If you use NSUserDefaults, you can handle key-value options (-threshold 17) pretty easily, but this has limitations. I don't see how it can be graceful for * Two-hyphen options (chatty --verbose). * Non-value opt

Knowing how a Text Editing Session ended

2010-07-21 Thread Motti Shneor
Hello Everyone. I'm implementing a programmatic wrapper for using an NSTextField on our custom view --- I programmatically create an NSTextField, Embed it in the super-view, then let the user type in text and as soon as the user finishes, I need to collect the typed string, plus the way the

How to force NSMenu to redraw its menu items?

2010-07-21 Thread Nava Carmon
Hi, I'm implementing a custom status bar menu, which has a custom view with NSSearchField. I'm updating number of menu items according to search results. The number of menu items is changed as user types in the NSSearchField. I've noticed, that if number of results stays the same, items titles

Debugger hangs?

2010-07-21 Thread sebi
Hello, every few times I want to step through my code with Xcode's debugger it eventually refuses to work. I click on the "Step Over" button and then nothing happens. The variable window becomes empty and the three step buttons become greyed out. The "Pause" button reacts on clicks but doesn't

Changing the token color in NSTokenField

2010-07-21 Thread Vijayakumar_Thota
Dear list, I am facing an issue in changing the first token field color in the NSTokenField, which is getting populated from an array. The token field should allow editing, drag & drop. If the user selected any token and drag&drop at the first place, the dropped token field background color sho