Re: Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-09 Thread Nathan Day
I have seen that version of the MVC pattern a lot where the View and Model are directly connected sometimes only one way, never really understood how it was supposed to work, my understanding is that with cocoa the model and view where never directly connected to each and it was the purpose

Get Info via OS X UI on app with changed version data still shows old value, unless copied, then it works

2008-12-09 Thread Chris Markle
Confused here about where "Get Info" on an app bundle gets its info... I'm sure this is basic stuff for you guys, but I'm relatively new at this. I have a directory called say "AppDir" with an application bundle in it called "App1". I altered the various version strings and what-not in App1/Info.p

Re: Multithreading and Mach ports

2008-12-09 Thread Nathan Day
On 10/12/2008, at 07:36 , John Love wrote: Reference: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/chapter_6_section_5.html#/ /apple_ref/doc/uid/1057i-CH16-SW7 I've got several questions since I'm just starting to investigate Mach Ports.

Re: Fix for Core Data + NSTreeController + NSOutlineView Crashes?

2008-12-09 Thread Bill Monk
Has anyone ever found a way to use Core Data + NSTreeController + NSOutlineView without getting crashes during undo? Try setting an "isLeaf" leaf keypath on the tree controller in IB and add a Boolean isLeaf attribute in the data model. When I do that here, AbstractTree and similar examples

Re: How to launch window of the application on clicking of dock icon?

2008-12-09 Thread Arun
Thanks for the reply. My app is not a document based. I tried using the applicationDidBecomeActive to bring up my main window. It works only when my application is not active. i.e., when the MenuBar is occupied by other application. If i launch my app and close the window, the menu bar is still o

Re: How to use NSWorkspace?

2008-12-09 Thread Nathan Day
You probable do not have AppKit include into you command line tool (under the 'External Frameworks and Libraries' folder) either add it to your project or look at LaunchServices which is easy to use, I have an example/wrapper on my web site. On 08/12/2008, at 11:07 , John Velman wrote: I

Re: Another NSOutlineView question

2008-12-09 Thread Graham Cox
On 10 Dec 2008, at 11:21 am, Graham Cox wrote: I did also try the idea of using an "active" marker in a separate table column to indicate the active layer and that worked alright, but much less obvious and visible than using the selection highlight for this. It also added another column to

Re: Fix for Core Data + NSTreeController + NSOutlineView Crashes?

2008-12-09 Thread Sean McBride
Jerry Krinock ([EMAIL PROTECTED]) on 2008-12-09 10:13 PM said: >[2] Steps to Reproduce > >1. Download Apple's AbstractTree sample code project: > http://developer.apple.com/samplecode/AbstractTree/AbstractTree.zip >2. Doubleclick AbstractTree/AbstractTree/AbstractTree.xcodeproj >3. Just

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Sean McBride
I. Savant ([EMAIL PROTECTED]) on 2008-12-09 8:25 PM said: > Asking for the shared user defaults instance, then asking it for a >value, then unarchiving a more useful object from it, *then* using it >to draw is certainly more work than caching the value only when it >changes. It's not like it's p

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Michael Ash
On Tue, Dec 9, 2008 at 8:25 PM, I. Savant <[EMAIL PROTECTED]> wrote: > On Dec 9, 2008, at 8:09 PM, Ricky Sharp wrote: > >> In some cases, other attributes, when set, will 'dirty' that flag followed >> by a setNeedsDisplay. Colors will then be re-fetched/created and then >> reused until the next ch

Re: Symbol not found error

2008-12-09 Thread Sean McBride
Daniel Luis dos Santos ([EMAIL PROTECTED]) on 2008-12-10 7:38 PM said: >I am getting this error over and over again, whenever I do a new >target in some place and then try to use it somewhere else. >I have a dynamic library in a project that is used in another project. >Then I added another dynam

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Michael Ash
On Tue, Dec 9, 2008 at 6:31 PM, I. Savant <[EMAIL PROTECTED]> wrote: > >> Even if it were slower, contorting the code like this without >> having profiled the code and demonstrated that this is in fact a >> significant slowdown is bad practice. > > I disagree. Certainly it's "profile first", but t

Fix for Core Data + NSTreeController + NSOutlineView Crashes?

2008-12-09 Thread Jerry Krinock
Well, I just spent a half hour meticulously reproducing how to make Apple's AbstractTree Sample Code project crash after two Undo operations [2], and then found that this is a known issue [1]. Has anyone ever found a way to use Core Data + NSTreeController + NSOutlineView without getting cr

Re: Creating a window when pressing a button

2008-12-09 Thread Rob Rix
It sounds like you might want to set up the window in a new nib file, which you load and unload with NSWindowController by creating a new NSWindowController instance and then calling -showWindow: on it. This also gives you a convenient location to start adding controller code for the conten

Re: NSArrayController with a base class

2008-12-09 Thread Rob Rix
I’m doing something vaguely similar to this using a subclass of NSCollectionView, which sets up the collection view item differently depending on some attribute of the represented object it’s operating on. In this case, the class is just another attribute. NSArrayController being in the con

Re: Creating a window when pressing a button

2008-12-09 Thread Damien Cooke
Jushin, Here is an example loading from nib within an action method - (IBAction)showMyNewWindow:(id)sender { NSLog(@"Loading Nib"); if(!myNewWindow) { [NSBundle loadNibNamed:@"MyNewWindow" owner:self]; } [myNewWindow makeKeyAndOrderFront:nil

Re: Custom NSTableView cells

2008-12-09 Thread j o a r
On Dec 9, 2008, at 6:21 PM, Randall Meadows wrote: I could use a little guidance, please, on customizing cells for display in an NSTableView. (My app is Leopard-only.) I looked around the Apple docs and cocoadev, but didn't really find anything useful. Other pointers would be appreciate

Re: About NSAppleScriptErrorNumber = -2709

2008-12-09 Thread xiaobin
Thanks for your reply, Rob I found the following site had the same problem (using an Apple Script) to mine. http://lists.apple.com/archives/cocoa-dev/2003/Dec/msg00563.html In my App A I also use the Security Framework to authenticate the user to elevate privilege because my App B must be run by

Re: Creating a window when pressing a button

2008-12-09 Thread Damien Cooke
Jushin, What I have done in the past with these sort of issues is either load the nib in the button pushed action or depending on how complicated your secondary window is, you could programatically create it like this. myWindow = [[NSWindow alloc] initWithContentRect:myRect styleMask:NSTi

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Graham Cox
On 10 Dec 2008, at 12:25 pm, I. Savant wrote: Asking for the shared user defaults instance, then asking it for a value, then unarchiving a more useful object from it, *then* using it to draw is certainly more work than caching the value only when it changes. It's not like it's performance

Re: Custom NSTableView cells

2008-12-09 Thread Graham Cox
On 10 Dec 2008, at 12:21 pm, Randall Meadows wrote: I could use a little guidance, please, on customizing cells for display in an NSTableView. (My app is Leopard-only.) I looked around the Apple docs and cocoadev, but didn't really find anything useful. Other pointers would be appreciat

-[NSManagedObject reallyIsDeleted]?

2008-12-09 Thread Nick Zitzmann
I searched the archives and didn't see anything relevant... The -[NSManagedObject isDeleted] method "incorrectly" returns false if the object has been deleted. This is in the documentation, despite the misleading name, but how do I find out if an NSManagedObject has really been deleted? Rig

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Ricky Sharp
On Dec 9, 2008, at 7:25 PM, I. Savant wrote: On Dec 9, 2008, at 8:09 PM, Ricky Sharp wrote: In some cases, other attributes, when set, will 'dirty' that flag followed by a setNeedsDisplay. Colors will then be re-fetched/ created and then reused until the next change comes along. Perfect

Re: The thread that starts by NSTask didn't clear up

2008-12-09 Thread Xianyu_Ge
thanks for your reply. I means in my project, I want to use NSTask to launch an application, and send application some parameters, when use NSTask launch application that will add a new thread, right? and then send Apple event, when application received Apple event , it will quit, usually,

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread I. Savant
On Dec 9, 2008, at 8:09 PM, Ricky Sharp wrote: In some cases, other attributes, when set, will 'dirty' that flag followed by a setNeedsDisplay. Colors will then be re-fetched/ created and then reused until the next change comes along. Perfectly good example of "timely optimization". Th

Custom NSTableView cells

2008-12-09 Thread Randall Meadows
I could use a little guidance, please, on customizing cells for display in an NSTableView. (My app is Leopard-only.) I looked around the Apple docs and cocoadev, but didn't really find anything useful. Other pointers would be appreciated. My table has but one column, but each cell in tha

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Ricky Sharp
On Dec 9, 2008, at 5:31 PM, I. Savant wrote: Even if it were slower, contorting the code like this without having profiled the code and demonstrated that this is in fact a significant slowdown is bad practice. I disagree. Certainly it's "profile first", but to have a view that reads a si

Re: performance problem with IORegistryEntryCreateCFProperties

2008-12-09 Thread Brad Justice
First, I would like to thank all those who took the time to assist me with this issue. I have begun implementing the suggestions I received with good results. Modifying the code to use IORegistryEntryCreateCFProperty() rather than IORegistryEntryCreateCFProperties() resulted in CPU usage dropp

Symbol not found error

2008-12-09 Thread Daniel Luis dos Santos
Hello, I am getting this error over and over again, whenever I do a new target in some place and then try to use it somewhere else. I have a dynamic library in a project that is used in another project. Then I added another dynamic library to the first one which is also used by the second

Re: Another NSOutlineView question

2008-12-09 Thread Graham Cox
On 10 Dec 2008, at 11:02 am, Corbin Dunn wrote: Actually, I think the row does have to be selected to allow it to be edited. Is there a reason you can't let it be selected at this point? In other words, what are you trying to do? I may be able to offer another solution. OK. The outl

Re: commitEditing and unrecognized selector

2008-12-09 Thread Sean McBride
On 2008-Dec-9, at 18:53, Chris Idou wrote: I've got a modal dialog with a couple of NSTextFields. Changes weren't getting saved, so I thought I'd better call commitEditing on the text field before retrieving its value with stringValue. But when I call commitEditing on the NSTextField it giv

Re: Another NSOutlineView question

2008-12-09 Thread Corbin Dunn
Le Dec 9, 2008 à 3:36 PM, Graham Cox a écrit : On 10 Dec 2008, at 3:34 am, Corbin Dunn wrote: Le Dec 9, 2008 à 12:40 AM, Volker in Lists a écrit : Hi, you should be able to detect a double click and call a method then that either temporarily allows the selection or directly starts the

Re: commitEditing and unrecognized selector

2008-12-09 Thread Graham Cox
On 10 Dec 2008, at 10:53 am, Chris Idou wrote: I've got a modal dialog with a couple of NSTextFields. Changes weren't getting saved, so I thought I'd better call commitEditing on the text field before retrieving its value with stringValue. But when I call commitEditing on the NSTextField i

commitEditing and unrecognized selector

2008-12-09 Thread Chris Idou
I've got a modal dialog with a couple of NSTextFields. Changes weren't getting saved, so I thought I'd better call commitEditing on the text field before retrieving its value with stringValue. But when I call commitEditing on the NSTextField it gives the error: -[NSTextField commitEditing]: unr

problems debugging cocoa app w/ gdb

2008-12-09 Thread kvic...@pobox.com
for sometime now (i don't remember when this started, possibly w/ leopard or 10.5.5 or the previous dev tools update), i've been getting a number of lines like the following on the debugger console when hitting breakpoints: warning: Trying to look up "NSString" in 'this' but 'this' is not an a

Re: Another NSOutlineView question

2008-12-09 Thread Graham Cox
On 10 Dec 2008, at 3:34 am, Corbin Dunn wrote: Le Dec 9, 2008 à 12:40 AM, Volker in Lists a écrit : Hi, you should be able to detect a double click and call a method then that either temporarily allows the selection or directly starts the edit mode. I do have a similar setup - don't do e

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread I. Savant
Even if it were slower, contorting the code like this without having profiled the code and demonstrated that this is in fact a significant slowdown is bad practice. I disagree. Certainly it's "profile first", but to have a view that reads a simple property from user defaults every time it

Re: Quote in path name

2008-12-09 Thread David Blanton
Ok, my problem! We have some C++ code that preprocess our paths (for our reasons) and it was REMOVING the " , duh, sorry! But I did learn something. Some names come in with some UTF8 encoding and those were a problem until I realized stringWithUTF8Encoding. On Dec 9, 2008, at 1:45 PM, Ch

Re: Accessing NSKeyedArchiver's archivedDataWithRootObject by name

2008-12-09 Thread Michael Ash
On Tue, Dec 9, 2008 at 1:17 PM, Jim Turner <[EMAIL PROTECTED]> wrote: > I have a situation where I'm archiving an array of objects via > NSKeyedArchiver's archivedDataWithRootObject: and later needing to set > a delegate on the NSKeyedUnarchiver that decodes it. The > documentation is a bit unclea

How to detect a paste request for file copy/paste?

2008-12-09 Thread Ling Li
I want to implement a delayed file paste feature for file copy/paste. When I first put file lists into the clipboard, the files are actually not existing yet (in another unmapped network place). These files will only be created after got the paste request. So my question is how to detect the pas

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Michael Ash
On Tue, Dec 9, 2008 at 11:34 AM, I. Savant <[EMAIL PROTECTED]> wrote: > Also, the custom view that draws the rectangle should probably > maintain this property itself (such as -rectColor). It's probably > trivial for your current application (which looks like a learning > exercise) but has perform

NSUserDefaults and valueForKeyPath ?

2008-12-09 Thread Arthur C.
I've been busy adding some structure to the NSUserDefaults in my app. So I would have a dictionary like 'generalPrefs' with some key/value pairs, separate from 'otherPrefs' etc. Now I wonder why the following doesn't work: [[NSUserDefaultsController sharedUserDefaultsController] valueForKeyPath:

Correction: Cocoaheads Lake Forest (92630) meeting 12/10/2008 at 7 pm on "Adding Unit Tests to a Cocoa Application"

2008-12-09 Thread Scott Ellsworth
Please note corrected subject. Hello, all, CocoaHeads Lake Forest will be meeting on the second Wednesday in December, 12/10, from 7 to 9 PM. We will meet in our usual location at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630. Peter Hosey, o

Cocoaheads Lake Forest (92630) meeting 11/12/2008 at 7 pm on "Using and optimizing Core Data in a commercial application"

2008-12-09 Thread Scott Ellsworth
Hello, all, CocoaHeads Lake Forest will be meeting on the second Wednesday in December, 12/10, from 7 to 9 PM. We will meet in our usual location at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630. Peter Hosey, one of the developers of the inst

Re: Setting company checkbox programatically in an AddressBook

2008-12-09 Thread development2
On Dec 9, 2008, at 2:31 PM, Nick Zitzmann wrote: On Dec 9, 2008, at 2:18 PM, development2 wrote: int personFlags = [[addressItem valueForProperty:kABPersonFlags] intValue]; That should be an NSInteger, not an int, and you should use - integerValue instead. Yeah thanks, saw that in th

Re: Setting company checkbox programatically in an AddressBook

2008-12-09 Thread Nick Zitzmann
On Dec 9, 2008, at 2:18 PM, development2 wrote: int personFlags = [[addressItem valueForProperty:kABPersonFlags] intValue]; That should be an NSInteger, not an int, and you should use - integerValue instead. personFlags = (kABShowAsMask && kABShowAsCompany); That shou

Creating a window when pressing a button

2008-12-09 Thread Jushin
In my application, I have to open a form window when a user press a button. It is somewhat similar to Apple Mail. In Apple Mail, if you click "New Message" button from the toolbar, a "New Message" window is appeared. For now, what I did was something like this: In IB, I added a window (or a panel)

Setting company checkbox programatically in an AddressBook

2008-12-09 Thread development2
I am having a problem setting the Checkbox to show the address book item is for a company. It seems to crash settig the value. What am I doing wrong? // we need to create this address item addressItem = [[[ABPerson alloc] init] autorelease]; [addressItem setVal

Re: Multithreading and Mach ports

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 21:36, John Love a écrit : Reference: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/chapter_6_section_5.html#/ /apple_ref/doc/uid/1057i-CH16-SW7 I've got several questions since I'm just starting to investigate Mach Ports.

Re: Quote in path name

2008-12-09 Thread Charles Steinman
Can you not recreate the bug in testing or identify the code where the possibly faulty path variable is created? Cheers, Chuck - Original Message > From: David Blanton <[EMAIL PROTECTED]> > To: Charles Steinman <[EMAIL PROTECTED]> > Sent: Tuesday, December 9, 2008 11:50:26 AM > Subject

Multithreading and Mach ports

2008-12-09 Thread John Love
Reference: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/chapter_6_section_5.html#/ /apple_ref/doc/uid/1057i-CH16-SW7 I've got several questions since I'm just starting to investigate Mach Ports. 1) Why is +LaunchThreadWithPort: so designate

Re: Text Not Anti-Aliased In NSView

2008-12-09 Thread Peter Ammon
On Dec 9, 2008, at 8:21 AM, Chunk 1978 wrote: i have several views that are added and replaced by a main window using core animation... i've noticed that the text (label objects, checkbox text, etc.) in each view is not being anti-aliased. this link ( http://att.macrumors.com/attachment.php?a

NSTextField + Drag'n'Drop

2008-12-09 Thread Jean-Nicolas Jolivet
I'm trying to subclass NSTextField so that it accepts dragged directory from the Finder... (I know it already does, but I need to modify the behavior slightly)... Instead of "inserting" the dragged file's path in the current text of the text field, I need to replace the whole textfield's te

Re: Development workflows for signed code?

2008-12-09 Thread Jack Repenning
On Dec 9, 2008, at 6:36 AM, Chris Suter wrote: By the way, you should post code signing questions to the apple-cdsa list rather than the Cocoa list as you'll get a better response there. Thanks for that. I did look for a more focused list, but I guess that acronym didn't catch my eye. -=

NSTextField in a sheet and focus

2008-12-09 Thread Mike Chambers
I have a sheet which contains an NSTextField. I need to allow users to enter line returns in the textfield, so I have implemented the functionality according to this apple note: http://developer.apple.com/qa/qa2006/qa1454.html This works great. However, if the user clicks out of the text field (o

NSArrayController with a base class

2008-12-09 Thread Todd Heberlein
Hi all, I'm looking for documentation/tutorial/pointers on how to handle the situation when an NSArrayController is managing an NSMutableArray which will contain multiple types of objects but all of which have the same base class. So the NSArrayController's "Object Controller" "Class Name

Re: Quote in path name

2008-12-09 Thread Charles Steinman
It works for me. How is the string for path getting created? Cheers, Chuck - Original Message > From: David Blanton <[EMAIL PROTECTED]> > To: Cocoa-dev List > Sent: Tuesday, December 9, 2008 10:32:19 AM > Subject: Quote in path name > > The following returns a nil image with a path of

Re: NSNumberFormatter strange symbols on PPC/10.4

2008-12-09 Thread Stéphane BARON
I did encounter the same problem (developing on 10.5 and testing on 10.4) It seem's to be a know bug in NSNumberFormatter I solved it by subclassing NSNumberFormatter like this: #import "MCNumberFormatter.h" @implementation MCNumberFormatter - (NSString *)stringForObjectValue:(id)anObject {

Re: How to launch window of the application on clicking of dock icon?

2008-12-09 Thread Raleigh Ledet
This depends on your application. A document based application will automatically create a new untitled document for you. Which is generally what you want. If you app is really document based, its best to use the document based project template. If you app is not document based (say Mail

Quote in path name

2008-12-09 Thread David Blanton
The following returns a nil image with a path of lg002025-"Santa".tif NSImage *image = [[NSImage alloc] initWithContentsOfFile:path]; bool ok = [image isValid]; but returns a valid image if the path is lg002025-Santa.tif so how can the finder allow " in the name but NSImage burp

Re: performance problem with IORegistryEntryCreateCFProperties

2008-12-09 Thread Raleigh Ledet
I totally agree with Herb here. If matching on a specific serial number is not feasible, at the very least, match on the IOHIDDevicesKey. As opposed to polling, you will be informed with the HID topology changes. One very important note though. I would avoid calling IORegistryEntryCreateC

Accessing NSKeyedArchiver's archivedDataWithRootObject by name

2008-12-09 Thread Jim Turner
I have a situation where I'm archiving an array of objects via NSKeyedArchiver's archivedDataWithRootObject: and later needing to set a delegate on the NSKeyedUnarchiver that decodes it. The documentation is a bit unclear on how one starts the unarchive process when a NSKeyedUnarchiver is created

Fwd: Text Not Anti-Aliased In NSView

2008-12-09 Thread Chunk 1978
-- Forwarded message -- From: Chunk 1978 <[EMAIL PROTECTED]> Date: Tue, Dec 9, 2008 at 12:34 PM Subject: Re: Text Not Anti-Aliased In NSView To: Nick Zitzmann <[EMAIL PROTECTED]> i studied apple's "Basic Cocoa Animations" example found here: http://developer.apple.com/samplecode/B

Re: How to launch window of the application on clicking of dock icon?

2008-12-09 Thread Benjamin Dobson
On 9 Dec 2008, at 17:02:19, Arun wrote: Hi, I have created a simple application in cocoa. when it is ran, the main window appears and a default dock icon in the Dock. If i close the window, the dock icon still stays. But if i click on the dock icon then also the main window is visible. Th

Re: How to launch window of the application on clicking of dock icon?

2008-12-09 Thread Josh Abernathy
In your app delegate, implement -applicationDidBecomeActive: to show your window. On Dec 9, 2008, at 12:02 PM, Arun wrote: Hi, I have created a simple application in cocoa. when it is ran, the main window appears and a default dock icon in the Dock. If i close the window, the dock icon sti

How to launch window of the application on clicking of dock icon?

2008-12-09 Thread Arun
Hi, I have created a simple application in cocoa. when it is ran, the main window appears and a default dock icon in the Dock. If i close the window, the dock icon still stays. But if i click on the dock icon then also the main window is visible. The only way i can see the main window is by quitti

Re: performance problem with IORegistryEntryCreateCFProperties

2008-12-09 Thread Herb Petschauer
Out of curiosity, why spawn a second thread to poll when you can use IOServiceAddMatchingNotification() [and friends, search in /Developer/Examples] to get you notifications of devices appearing and disappearing? That is going to faster than walking the entire IORegistry every time to find the mat

Re: Printing File to PDF from Native Application

2008-12-09 Thread Joel Norvell
Jeff, Would the NSView (or NSWindow) method dataWithPDFInsideRect be a starting point for you? It does let you obtain your view as PDF data. Though, there might be a more direct approach to get what you need just by using the basic printing classes. In case these resources have eluded your ra

Re: performance problem with IORegistryEntryCreateCFProperties

2008-12-09 Thread Etienne Guérard
I would use Shark to isolate the counterperformant part of your application. EG On Dec 9, 2008, at 12:11 AM, Brad Justice wrote: My application spawns a POSIX background thread that polls for certain hardware changes. I have found that according to Activity Monitor and BigTop it is consum

Re: The thread that starts by NSTask didn't clear up

2008-12-09 Thread Etienne Guérard
I started an AP use NSTask in my project ,when I loaded this AP, thread count will be increased ,after sending apple event to AP , and AP will exit, but thread count can't decrease. If I used this method load AP more times, thread count will increased, but there was no problem on tiger, ju

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread I. Savant
On Tue, Dec 9, 2008 at 11:17 AM, Chunk 1978 <[EMAIL PROTECTED]> wrote: > that works... but now i want that rect to redraw itself when notified > to do so, but i can't figure out how to notify the NSRect to draw > again... all my NSUserDefaults colorAsData is in place, as well as my > NSNotification

Re: Another NSOutlineView question

2008-12-09 Thread Corbin Dunn
Le Dec 9, 2008 à 12:40 AM, Volker in Lists a écrit : Hi, you should be able to detect a double click and call a method then that either temporarily allows the selection or directly starts the edit mode. I do have a similar setup - don't do editing, but I use the double click action via bi

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Chunk 1978
i hadn't tried setNeedsDisplay:YES... but this works... and now i know what setNeedsDisplay means, which is exciting :) thanks everyone. On Tue, Dec 9, 2008 at 11:27 AM, rajesh <[EMAIL PROTECTED]> wrote: > > On Dec 9, 2008, at 5:17 PM, Chunk 1978 wrote: > >> i'm assuming this is simple, but i can

Re: Right way to implement contextual menu in table/outline view?

2008-12-09 Thread Corbin Dunn
Le Dec 8, 2008 à 8:12 PM, Graham Cox a écrit : On 9 Dec 2008, at 2:56 pm, Jim Correia wrote: On Dec 8, 2008, at 10:51 PM, Graham Cox wrote: In my app I have an NSOutlineView. I have contextual menus relating to the overall table, but also relating to an individual item row. I notice tha

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread rajesh
On Dec 9, 2008, at 5:17 PM, Chunk 1978 wrote: i'm assuming this is simple, but i can't solve the problem. at launch of the application, an NSRect is drawn with a userdefault color: -=-=-=-=- - (void)drawRect:(NSRect)rect { NSUserDefaults *defaults = [NSUserDefaults standardUser

Best way to do hit testing on an image?

2008-12-09 Thread Karan, Cem (Civ, ARL/CISD)
I am in the process of creating a new interface for my program, which, for lack of any good comparison, can be thought of as a 2D scrolling game with a bunch of clickable sprites. I need to do hit testing to see if particular bitmaps have been clicked on. I have the following information avail

Re: Text Not Anti-Aliased In NSView

2008-12-09 Thread Nick Zitzmann
On Dec 9, 2008, at 9:21 AM, Chunk 1978 wrote: this link ( http://att.macrumors.com/attachment.php?attachmentid=147663&d=1228770137 ) will show you an image displaying this problem. the window on the left is from within Interface Builder (anti-aliased text), the window on the right is the runn

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Nick Zitzmann
On Dec 9, 2008, at 9:17 AM, Chunk 1978 wrote: that works... but now i want that rect to redraw itself when notified to do so, but i can't figure out how to notify the NSRect to draw again... all my NSUserDefaults colorAsData is in place, as well as my NSNotifications. it will print to NSLog so

Text Not Anti-Aliased In NSView

2008-12-09 Thread Chunk 1978
i have several views that are added and replaced by a main window using core animation... i've noticed that the text (label objects, checkbox text, etc.) in each view is not being anti-aliased. this link ( http://att.macrumors.com/attachment.php?attachmentid=147663&d=1228770137 ) will show you an

How Can I Notify DrawRect Method?

2008-12-09 Thread Chunk 1978
i'm assuming this is simple, but i can't solve the problem. at launch of the application, an NSRect is drawn with a userdefault color: -=-=-=-=- - (void)drawRect:(NSRect)rect { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSData *colorAsData; co

Re: Printing File to PDF from Native Application

2008-12-09 Thread Scott Ribe
One more thing, if MS Word 2004 is one of your targets, there are more things to be aware of: - If Word is set to display the "project gallery" on launch, which is the default, it will ignore your request to open/print files, so this preference has to be turned off. - Occasionally Word will decid

Re: Printing File to PDF from Native Application

2008-12-09 Thread Scott Ribe
There is no reliable documented API for switching the default printer. There are workarounds which might or might not work in the future. Briefly: there are CUPS techniques for setting the default printer. Under 10.4 these worked. Under 10.5 these work unless the user has chosen "Last Printer" in

Re: ASLExpireTime Format? [Solved, somewhat]

2008-12-09 Thread Karl Moskowski
So, I think I know why ASLExpireTime had no effect on the making messages persist in the main database. It looks like syslogd has to be started with the -a flag to enable archiving. When I added the flag to the ProgramArguments section of / System/Library/LaunchDaemons/com.apple.syslogd.plis

Re: Development workflows for signed code?

2008-12-09 Thread Chris Suter
On Tue, Dec 9, 2008 at 4:12 AM, Jack Repenning <[EMAIL PROTECTED]> wrote: > My experiments so far seem to show that none of those things happens. In > fact, even if I modify one of the files, so that "codesign -v" no longer > likes the bundle, it still seems to work. Is "codesign -v" the only > (L

Re: Implementing Delete key event

2008-12-09 Thread Gregory Weston
Mahaboob wrote: Hi all, In my application NSPopUpButton shows the table names in the database. When I'm pointing one table name and hitting delete key, I need to delete the table from the database. How can I implement delete key event for PopUp Button? If I'm understanding correctly (or

[Moderator] Re: Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-09 Thread Scott Anguish
On 9-Dec-08, at 8:36 AM, Karan, Cem (Civ, ARL/CISD) wrote: To lay the groundwork for this question, I'm going to state that I'm getting my definitions for MVC, MVP, and Passive View from the following: http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model_Vi

Re: Development workflows for signed code?

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 05:12, Jack Repenning a écrit : I'm just dipping my toes into the world of signed code. After spending some time with the Code Signing guide, I'm still not clear on how this affects the work flows around my product (SCPlugin, http://scplugin.tigris.org , which adds Subversion

Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-09 Thread Karan, Cem (Civ, ARL/CISD)
To lay the groundwork for this question, I'm going to state that I'm getting my definitions for MVC, MVP, and Passive View from the following: http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model_View_Presenter http://www.martinfowler.com/eaaDev/PassiveScreen.html

Issue with the preference window

2008-12-09 Thread Arnab Ganguly
Hi All, I am trying out for the preference window.It is a simple app, and under the main menu when I click on the preference it shows the preference menu popup. But when I quit the preference window my app seemed to getting hang.I am not able to quit the application and also the main menu also beco

Development workflows for signed code?

2008-12-09 Thread Jack Repenning
I'm just dipping my toes into the world of signed code. After spending some time with the Code Signing guide, I'm still not clear on how this affects the work flows around my product (SCPlugin, http://scplugin.tigris.org , which adds Subversion capabilities to Finder), partly because of some

Re: Optimized image drawing (currently using CGImageCreate -> CGContextDrawImage)

2008-12-09 Thread Matthew Johnson
As far as I remember, you can get something like 1000 512x512 image draw per sec on a mac pro (not a very good card, but not bad also). If you use OpenGL instead of CoreGraphics, this is more like 7000 1024x768 image per sec. Did you have QuartzGL turned on when you tested this? Matthew ___

Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects

2008-12-09 Thread Volker in Lists
Hi Steven, as far as I know, the fect happens in the next run loop. So you would need to set the selection then. This is possible for example via the performSelector:withObject:afterDelay: and a delay of 0.0 on self (?). Cheers, Volker Ah, I understand. I've implemented the correc

Re: iPhone Orientation

2008-12-09 Thread Roland King
no longer a violation of the NDA provided you're discussing publicly released software, as the new NDA states; as far as I understand it. You may or may not have better luck over the iPhone dev forums, there's a couple of great people over there who are very good at answering the iPhone odd

Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects

2008-12-09 Thread Steven Hamilton
> > However, the arrangedObjects array, while existing, contains zero > objects. I've checked the Outlet is connected ok. A timing issue of > some sort? No. Based on the above, your code isn't KVO compliant. First of all, it's important to realize that nothing is ever bound to an instance vari

Re: NSTask and environment variables

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 11:51, Ingvar Nedrebo a écrit : On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and e

Re: NSTask and environment variables

2008-12-09 Thread Ingvar Nedrebo
On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and extend it before passing it to NSTask. Is there

Re: NSAlert with NSTimer

2008-12-09 Thread Rashmi Vyshnavi
It worked after adding timer in NSModalPanelRunLoopMode.Thanks On Tue, Dec 9, 2008 at 3:46 PM, Sherm Pendley <[EMAIL PROTECTED]>wrote: > The +scheduledTimer* methods schedule the timer using the default runloop > mode. Try creating a timer without scheduling it, then adding it yourself to > the c

Re: NSAlert with NSTimer

2008-12-09 Thread Sherm Pendley
The +scheduledTimer* methods schedule the timer using the default runloop mode. Try creating a timer without scheduling it, then adding it yourself to the current runloop with NSRunLoop's -addTimer:forMode: instead, using the NSModalPanelRunLoopMode mode: myTimer = [NSTimer timerWithTim

Re: NSAlert with NSTimer

2008-12-09 Thread Rashmi Vyshnavi
I am using NSAlert. When runModal is called on the NSAlert's object, timer is not fired till the time i close the alert panel.. On Tue, Dec 9, 2008 at 3:20 PM, rajesh <[EMAIL PROTECTED]> wrote: > I did something like this , long time back > > hope, this is close enough to your requirement or may

Re: NSAlert with NSTimer

2008-12-09 Thread rajesh
I did something like this , long time back hope, this is close enough to your requirement or may be its a wrong practice ( user discretion required :) ) -()runAlert { ..// show modal window NSTimer *myTimer = [[NSTimer scheduledTimerWithTimeInterval:someTime target:self selector:@selector(

  1   2   >