Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Graham Cox
Once in a blue moon, I get a console message that a nil string was passed to [NSConcreteAttributedString initWithString:] I'd like to find out where this is coming from by setting a breakpoint there, but only for a nil string. Adding the breakpoint as a symbol to the symbolic breakpoints wo

Re: IB not recognizing class hierarchy

2008-07-28 Thread James Maxwell
Ah, I didn't try dragging the DKDrawingDocument.h file, just MyDocument.h. I'll give that a shot. Thanks, Graham. On 27-Jul-08, at 5:36 PM, Graham Cox wrote: Because DKDrawingDocument comes from a framework it's possible that IB can't find the definition. I'm not sure that's the problem, b

Re: Folder has limited permissions.

2008-07-28 Thread Macarov Anatoli
This is my code, I would give you an example.In documentation on authopen command-w writes data in file, but I can't do it. On 27 Jul 08, at 02:19, Macarov Anatoli wrote: > HI Andrew Farmer, > This is my cod: > > NSString *command =@"/usr/libexec/authopen" ; > NSArray *args = [NSArray

Re: Folder has limited permissions.

2008-07-28 Thread Jean-Daniel Dupas
You have to use "create and write" (-c -w) authopen -c -w /etc/tolea.txt And also to write some data by creating an other pipe and binding it to the task's standard input (and then using fileHandleForWriting). Le 28 juil. 08 à 09:46, Macarov Anatoli a écrit : This is my code, I would give

Re: Need help with predicate format

2008-07-28 Thread Fabian
Thanks. Maybe I should have made myself a little more clear. I don't want to iterate over the array, but filter the array using a NSPredicate. I'm looking at the Predicate Programming Guide, which only gives basic guidance, and the docs for NSExpression. It has several class methods that "sound ri

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Alex Heinz
There's probably a better way, but you could create an if statement containing a log message (or something) that has a breakpoint (e.g.: if (aString == nil) { NSLog(@"blah") <-- Breakpoint here } ) Kinda stupid solution, though. Alex On Jul 28, 2008, at 12:02 AM, Graham Cox wrote:

Re: NSGraphicsContext restore crashes my xtension

2008-07-28 Thread Ken Tozier
On Jul 28, 2008, at 2:42 AM, Ken Ferry wrote: Graham's suggestion is also better because -[NSGraphicsContext setCurrentContext:] just releases the context that was previously current, as opposed to autoreleasing it. So this has a bug: NSGraphicsContext *originalContext = [NSGraphicsContext

Re: NSGraphicsContext restore crashes my xtension

2008-07-28 Thread Jean-Daniel Dupas
Le 28 juil. 08 à 10:17, Ken Tozier a écrit : On Jul 28, 2008, at 2:42 AM, Ken Ferry wrote: Graham's suggestion is also better because -[NSGraphicsContext setCurrentContext:] just releases the context that was previously current, as opposed to autoreleasing it. So this has a bug: NSGraphics

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Jonathan del Strother
On Mon, Jul 28, 2008 at 8:02 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > Once in a blue moon, I get a console message that a nil string was passed to > [NSConcreteAttributedString initWithString:] I'd like to find out where this > is coming from by setting a breakpoint there, but only for a nil str

Re: Need help with predicate format

2008-07-28 Thread Conrad Taylor
Hi, I would recommend taking a look at the following document. http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/predicates.html Good luck, -Conrad On Mon, Jul 28, 2008 at 1:02 AM, Fabian <[EMAIL PROTECTED]> wrote: > Thanks. Maybe I should have made myself a little more clear

iCal like calendar interface in my application

2008-07-28 Thread Devraj Mukherjee
Hi all, One of our projects needs an interface to schedule appointments. We are thinking of an iCal like interface but realize that its a lot of work to come up with something like it. Are there any components we can use or are we able to incorproate iCal itself in our application? Or is the best

Re: iCal like calendar interface in my application

2008-07-28 Thread Phil
On Mon, Jul 28, 2008 at 9:21 PM, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > Are there any components we can use or are we able to incorproate iCal > itself in our application? Or is the best way to integrate an > application using the calendaring server? > The Calendar Store framework lets you

Re: Folder has limited permissions.

2008-07-28 Thread Macarov Anatoli
   Problem solved.    Cod work:     NSPipe *writePipe = [NSPipe pipe];     NSFileHandle *writeHandle = [writePipe fileHandleForWriting];     NSTask *task = [[NSTask alloc] init];     NSString *command = @"/usr/libexec/authopen";     NSArray *args = [NSArray arrayWithObjects:@"-w",@"/etc/tolea.txt"

Re: Need help with predicate format

2008-07-28 Thread Fabian
Thanks. As I said, I already read that but it doesn't give any examples on how to format subqueries. Anyway, I ended up adding a helper method to my subclass after all. It returns a single array of keywords, which I can examine using a predicate with format "(ANY keywords contains[c] %@, searchStri

Re: NSPopupButton and bindings to NSArrayController

2008-07-28 Thread I. Savant
Well, I already checked that, it is Class, not Entity. I'm already aware that Entity is used with Core Data models. Oh, well, I'll figure something out. I always have a terrible time with NSPopupButton in any context. Sorry, it occurred to me that I'd forgotten to mention the other aspect.

How to get the cursor animation effects - Clouds of smoke when deleting something

2008-07-28 Thread Oleg Krupnov
I assume that there is a system-wide set of predefined cursor appearances and effects intended to be used by applications to mean particular standard actions. Is this correct? For example, when I drag something outside a view to get rid of it, the cursor shows a vanishing cloud of smoke and plays

Re: NSGraphicsContext restore crashes my xtension

2008-07-28 Thread Graham Cox
On 28 Jul 2008, at 6:17 pm, Ken Tozier wrote: Maybe I'm just misunderstanding what saveGraphicsState does, behind the scenes, but I actually need to draw into the passed in CGPDFContext, not any sort of view/image/winbow context. Best I can figure, this requires a forced context switch, no

Re: How to get the cursor animation effects - Clouds of smoke when deleting something

2008-07-28 Thread Antonio Nunes
On 28 Jul 2008, at 12:33, Oleg Krupnov wrote: For example, when I drag something outside a view to get rid of it, the cursor shows a vanishing cloud of smoke and plays a special sound. Have a look at NSShowAnimationEffect in the docs. António -

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Graham Cox
Ah thanks, that's very helpful. One thing that I'm a bit unsure about. If I enter a symbolic breakpoint, will it break on the first instruction of that method or further along? It matters because that doc states: "If you've stopped at the first instruction of a routine, the first paramete

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Graham Cox
I need to break on a Cocoa method that I don't have the source to. If I had the source, I could just set a breakpoint by clicking in the margin in the usual way. Thanks anyway, Graham On 28 Jul 2008, at 6:11 pm, Alex Heinz wrote: There's probably a better way, but you could create an if s

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Jacob Bandes-Storch
On Jul 27, 2008, at 10:49 PM, Andy Lee wrote: On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder,

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Graham Cox
On 28 Jul 2008, at 11:59 pm, Jacob Bandes-Storch wrote: Because the Text View that IB provides is embedded in a scroll view already and I can't add another view to it. Choose "Unembed Objects" to get the unenclosed NSTextView after dragging the view to the window in IB. No... what I wan

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 9:59 AM, Jacob Bandes-Storch wrote: On Jul 27, 2008, at 10:49 PM, Andy Lee wrote: If you were trying to create a Mail-like layout, I would have expected your two views to be an NSTableView and an NSTextView, both embedded in a Split View. No... what I want is like the bott

Authenticate Password.

2008-07-28 Thread Macarov Anatoli
HI!!! Cocoa, Obj-C. With the help of this procedure I check whether the password has been entered correctly. But the code works only for the user with admins rights. How do I check the password being a standard user? Cod: -(BOOL) authenticatePassword:(NSString *)password :(NSString *)userName {

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 10:11 AM, Graham Cox wrote: I suspect Mail just uses a single NSTextView and just arranges the header text using custom text attributes, etc. Maybe someone at Apple reading this would know for sure. I guessed that too, but a look at the nib file in Mail.app indicates ot

Re: draw string with ellipsis

2008-07-28 Thread chaitanya pandit
What u can do is get the actual size occupied by the string using sizeWithAttributes:attrs and center it accordingly. -Chaitanya On 28-Jul-08, at 2:23 AM, Vitaly Ovchinnikov wrote: Thanks, exactly what I need. Btw, is there any easy way to center this line vertically? Or I need to measure i

sorting two arrays

2008-07-28 Thread Jeff LaMarche
Hey all... I've got two arrays that are related, so that object 0 in one array corresponds to object 0 in the other array. I'd like to implement a sort based on the values in one array, but to reorder both array so that the order of the two arrays stays in sync and that object x in one a

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Andy Lee
On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSText

Re: draw string with ellipsis

2008-07-28 Thread Uli Kusterer
On 28.07.2008, at 08:23, Vitaly Ovchinnikov wrote: Thanks, exactly what I need. Btw, is there any easy way to center this line vertically? Or I need to measure it's height and offset it vertically myself? NSParagraphStyle -setAlignment: ? Cheers, -- Uli Kusterer "The Witnesses of TeachText

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Jacob Bandes-Storch
On Jul 28, 2008, at 7:48 AM, Andy Lee <[EMAIL PROTECTED]> wrote: On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in

Re: draw string with ellipsis

2008-07-28 Thread Vitaly Ovchinnikov
This one aligns string horizontally, I need vertical alignment. Well, OK, will measure it's height and center it myself. On Mon, Jul 28, 2008 at 7:12 PM, Uli Kusterer <[EMAIL PROTECTED]> wrote: > > On 28.07.2008, at 08:23, Vitaly Ovchinnikov wrote: > >> Thanks, exactly what I need. >> Btw, is ther

Re: Folder sharing attributes

2008-07-28 Thread Peter Alshuth
Thanks for the info. I tried this code section but it doesn't work. The result of sharingFlags is always 0. Is there another way with DirServices to request the sharing attribute about a folder if this in not working under Leopard? Peter FSRef fileRef; NSString *filePath = @"/Users/Test/M

[Newbie] Communication between two Views?

2008-07-28 Thread Thomas Wickl
Hello, I have a question regarding to communication between two Views. My tableview creates a view in which the user can enter a text. How do I get the text from the View to my tableview? The View is created in the following was in my tableview: - (IBAction)addAction:(id)sender{ if (ncvCo

Text Editor

2008-07-28 Thread mahaboob pa
Hi, I'm new to cocoa. I'm developing an application that converts the text into HTML and vice versa. I can convert text into HTML format but, I didn't get the code to convert an HTML contents into text format. How can I do this ? ___ Cocoa-dev mailing li

Re: memory management

2008-07-28 Thread Scott Ribe
> Follow convention. No matter how well-documented it is, your successor > will be much happier if it it's consistent with all other classes Also, a year from now, you will presumably be *much* more accustomed to the conventions, to the point that they're reflexive. You don't want old classes trip

Re: NSTextView + other NSView in NSScrollView?

2008-07-28 Thread Andy Lee
I don't know offhand. A quick search on CocoaBuilder for "NSTextView flipped" turns up this suggestion to flip the superview: But I haven't read it closely. --Andy On Jul 28, 2008, at 11:09 AM, Jacob Bandes-Storch wrote:

Access to events in tight loop?

2008-07-28 Thread Scott Squires
If I handle a mouse event and am processing it in a time consuming method which includes display, what's the cleanest way to peek at events during this time (to get updated mouse info,etc ) or to allow the run loop to continue enough to make another pass? Is there a clean way to allow the main

Re: [Newbie] Communication between two Views?

2008-07-28 Thread I. Savant
> I have a question regarding to communication between two Views. > My tableview creates a view in which the user can enter a text. How do > I get the text from the View to my tableview? > The View is created in the following was in my tableview: Search the documentation for the "Model View Cont

Inconsistent Socket Communications

2008-07-28 Thread Justin Giboney
I am trying to set up a client-server chat application for practice. I am getting inconsistent communications. Meaning that it works some of time and doesn't work some of the time during the same application run. Any help will be greatly appreciated Here are the projects: www.justingiboney.com/co

Hidden Shares

2008-07-28 Thread Peter Alshuth
Hi all, I would like to hide a shared folder on the network, similar like it is done under Windows by adding a $ sign to its shared name. This is not working for non smb connections. Apparently, if I hide the folder locally in the Finder and share it, it will not keep this attribute over

Re: Text Editor

2008-07-28 Thread Mike Abdullah
3 options: * NSAttributedString * Create a parser using NSScanner that strips out all non-text. * WebKit, in particular the DOM API. On 28 Jul 2008, at 12:10, mahaboob pa wrote: Hi, I'm new to cocoa. I'm developing an application that converts the text into HTML and vice versa. I can convert

Re: Access to events in tight loop?

2008-07-28 Thread Glenn English
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Scott Squires wrote: > If I handle a mouse event and am processing it in a time consuming > method which includes display, what's the cleanest way to peek at events > during this time (to get updated mouse info,etc ) or to allow the run > loop to cont

Re: Access to events in tight loop?

2008-07-28 Thread chaitanya pandit
What you can do is use the NSWindow's nextEventMatchingMask: method to determine the next event, here you can check for events that should discontinue your current processing. So, say if u want to do some processing only while mouse down, and stop if there is a mouse up while you are doing it

Re: NSTableview Datasource and NSPopupbuttonCell

2008-07-28 Thread Matt Neuburg
On Thu, 24 Jul 2008 21:50:31 +1000, Steven Hamilton <[EMAIL PROTECTED]> said: >Hi Folks, > >I have a NSTableview with a datasource consisting of an NSArray of >dictionaries. One column in my table has an NSPopupbuttonCell. The >content and contentValues are bound to a Core Data "Account" object. I

Re: Creating a styles menu like the one in the ruler accessory view of NSLayoutManager...

2008-07-28 Thread Keith Blount
Hmm, Looking into this some more, it seems that the user's favourite styles can be accessed like this: NSDictionary *favStyles = [[NSUserDefaults standardUserDefaults] objectForKey:@"NSFavoriteStyles"]; Presumably this is what is used to generate the pop-up menu in NSLayoutManager's ruler acc

Re: [Newbie] Communication between two Views?

2008-07-28 Thread Wickl thomas
Hi, and thank you for your answer. Yes, the understanding of the MVC- Problem seems to be my problem. I know how MVC works with one Model, one View and one Controller but I really don´t understnd how the controllers of different Views communicate with each other. And I really don´t find an

Re: Getting process table info from within a Cocoa app

2008-07-28 Thread Sumner Trammell
Thanks guys. I thought I'd post my solution. The difference between my solution and the examples on the net that I was able to find is that I already know the pid -- I just want to see if that pid is still running, if it's running as root, and if it has a certain name. Although the Cocoa content i

Re: NSTimer and a problem with document-based apps

2008-07-28 Thread Sumner Trammell
Thanks guys. Using class methods was a brilliant idea. Solidified my understanding of when I might want to use them, and when I might want to use @synchronized as well. -s On Sat, Jul 26, 2008 at 7:30 PM, Todd Heberlein <[EMAIL PROTECTED]> wrote: >> - (id)init { >> ... >> timer = [NSTimer schedu

How would you tell WebKit to keep all JavaScript popup windows on top/in front?

2008-07-28 Thread Sumner Trammell
Hi, I've used WebKit to write a small Single-Site Browser that takes you straight to a special section of the company intranet. It works great, but there is one particular link on the page that creates a popup window using JavaScript. I want this popup to always stay on top. In other words, I don'

Re: DO Chat Example

2008-07-28 Thread Lukhnos D. Liu
On Jul 26, 2008, at 3:38 AM, Justin Giboney wrote: It works so far... well mostly. It isn't very consistent. I don't have a lot of experience with ports, and I was hoping that someone could look at it and see if they can find out why some messages go through while others don't. Here are the

Storing values in dictionary with their address as the key

2008-07-28 Thread Carter R. Harrison
Hey Everybody, If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? Right now I'm doing this: int i; for (i = 0 ; i < 10 ; i++) { NSObject *myObject = [[NSObject alloc] init]; [dictionary setValue:myObject forKey:[N

Re: [Newbie] Communication between two Views?

2008-07-28 Thread I. Savant
> and thank you for your answer. Yes, the understanding of the MVC-Problem > seems to be my problem. I know how MVC works with one Model, one View and > one Controller but I really don´t understnd how the controllers of different > Views communicate with each other. And I really don´t find an Examp

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Dave Carrigan
On Jul 28, 2008, at 11:13 AM, Carter R. Harrison wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking my brains trying to think of a good reason to do this and am drawing a blank. I can, however,

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread I. Savant
>> If I wanted to store an object in a dictionary and set its key as the >> object's memory address - how would I go about doing this? > > I'm racking my brains trying to think of a good reason to do this and am > drawing a blank. I can, however, think of myriad bad reasons. Agreed - I can't hel

Re: DO Chat Example

2008-07-28 Thread Justin Giboney
My original intention was to make the client serve a DO also. The problem I was having, was how to have the server know who is out there. Now that I think about it, I could have the Server keep a list of the registered names of the clients. Would that be a better option? As far as the inconsisten

Re: [Newbie] Communication between two Views?

2008-07-28 Thread I. Savant
>> I know how MVC works with one Model, one View and >> one Controller but I really don´t understnd how the controllers of different >> Views communicate with each other. > > Through the model. The controllers of different views do not generally > communicate directly. That's a pretty general

Re: Converting Windows RC to NIBs (was Re: Creating and App menu from Scratch)

2008-07-28 Thread Jonathan Hess
On Jul 16, 2008, at 3:38 AM, Uli Kusterer wrote: On 14.07.2008, at 14:53, Bill Royds wrote: Are there any good tools for porting Application menus and forms from other windowing systems (such as MS Windows or X or even Carbon) to Cocoa nibs? I have a number of applications that I would li

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread David Wilson
On Mon, Jul 28, 2008 at 2:13 PM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: > Hey Everybody, > > If I wanted to store an object in a dictionary and set its key as the > object's memory address - how would I go about doing this? > > Right now I'm doing this: > > int i; > for (i = 0 ; i < 10 ; i+

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Quincey Morris
On Jul 28, 2008, at 11:13, Carter R. Harrison wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? The usual way would be to use the result of +[NSValue valueWithNonretainedObject:] as a dictionary key. __

Re: Event-Driven XML Parsing and Entity References

2008-07-28 Thread Carter R. Harrison
On Jul 27, 2008, at 5:13 PM, Nathan Kinsinger wrote: On Jul 27, 2008, at 12:52 PM, Carter R. Harrison wrote: There's been some discussion on this topic previously, but I haven't been able to find the solution that I'm looking for. I'm using the event-driven XML parser (CFXMLParser). App

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Jonathan Hess
On Jul 28, 2008, at 11:44 AM, I. Savant wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking my brains trying to think of a good reason to do this and am drawing a blank. I can, however, think

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Carter R. Harrison
On Jul 28, 2008, at 3:24 PM, David Wilson wrote: On Mon, Jul 28, 2008 at 2:13 PM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: Hey Everybody, If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? Right now I'm doing

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 2:31 PM, Dave Carrigan wrote: On Jul 28, 2008, at 11:13 AM, Carter R. Harrison wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking my brains trying to think of a good reason to

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Charles Srstka
On Jul 28, 2008, at 2:29 PM, Jonathan Hess wrote: A good reason would be that you care about identity equality and not value equality. You care that the key is the exact same instance, not that it is an equivalent instance. (== vs isEqual:) Another reason would be that the keys might not im

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 3:29 PM, Jonathan Hess wrote: On Jul 28, 2008, at 11:44 AM, I. Savant wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking my brains trying to think of a good reason to do this

Shameless Ottawa (Canada) Cocoaheads plug

2008-07-28 Thread Greg Robertson
This is a shameless plug for a new Ottawa (Canada) Cocoa Heads group Now that Canada finally has the iPhone, if there are any Ottawa (Canada) area iPhone Developers who might want to get together to talk about iPhone, Touch or Cocoa there is a new Google group. Philippe Guitard who some of you mi

Re: Access to events in tight loop?

2008-07-28 Thread Scott Anguish
do you have to use the tight loop approach? The view documentation discusses the pros and cons of this approach and other options. http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/SubclassingNSView/chapter_6_section_4.html#/ /apple_ref/doc/uid/TP40002978-CH7-SW27 O

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Quincey Morris
On Jul 28, 2008, at 12:34, Andy Lee wrote: On Jul 28, 2008, at 2:31 PM, Dave Carrigan wrote: On Jul 28, 2008, at 11:13 AM, Carter R. Harrison wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread David Duncan
On Jul 28, 2008, at 12:32 PM, Carter R. Harrison wrote: The issue was with the format string.. Instead of a %x, I needed a %qx. The %qx displays a 64 bit address whereas the %x displays a 32 bit address. When you give %x, only the least significant 32 bits are printed and those happen to

[Moderator] Re: Shameless Ottawa (Canada) Cocoaheads plug

2008-07-28 Thread Scott Anguish
I hate to dampen anyone's enthusiasm, but... You can't discuss the iPhone SDK or iPhone Development with anyone outside of your own organization. Discussing it publicly is a violation of the NDA. That restricts the discussion both in person, as well as on the google groups. iPhone SDK ---

NSTableView dragging to the finder - NSDragOperation

2008-07-28 Thread Don Messerli
I have a subclass of NSTableView in which I'm implementing drag and drop to the finder. Everything is basically working. However, when my class gets the call draggedImage:endedAt:operation:, operation is NSDragOperationGeneric (for a copy or move) or NSDragOperationDelete (for a delete). I'm

How to specify a relative path to a (pdf)-document in a (pdf)-document

2008-07-28 Thread Dirk Hollstein
Dear list members, I am writing to you to ask for some help on specifying a path to a document, which I could not find by searching the web and the list. What I want to achieve is this: - Having a couple of hyperlinks in a PDF-

Drawing Graphs in Cocoa

2008-07-28 Thread Taylor Barstow
Hi, I'm working on an application where I need to draw graphs in Cocoa. I'm not talking about data plotting, I'm talking about creating visualizations for directed, acyclic graphs in the computer science / discrete math sense (where a "graph" is a collection of nodes and edges). Does a

Re: [Newbie] Communication between two Views?

2008-07-28 Thread Hamish Allan
On Mon, Jul 28, 2008 at 5:51 PM, Wickl thomas <[EMAIL PROTECTED]> wrote: > I know how MVC works with one Model, one View and > one Controller but I really don´t understnd how the controllers of different > Views communicate with each other. Through the model. The controllers of different views do

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 3:40 PM, Charles Srstka wrote: On Jul 28, 2008, at 2:29 PM, Jonathan Hess wrote: A good reason would be that you care about identity equality and not value equality. You care that the key is the exact same instance, not that it is an equivalent instance. (== vs isEqual:)

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 3:56 PM, Quincey Morris wrote: On Jul 28, 2008, at 12:34, Andy Lee wrote: Count me as another mystified person -- can you say what you're trying to do? I'm thinking maybe some kind of serialization or maybe object caching, but nothing makes sense. It sounds like what y

Re: draw string with ellipsis

2008-07-28 Thread Uli Kusterer
On 28.07.2008, at 17:22, Vitaly Ovchinnikov wrote: This one aligns string horizontally, I need vertical alignment. Well, OK, will measure it's height and center it myself. Oh, sorry. Wasn't quite awake when I wrote that, apparently. Yeah, I think vertical is up to you. Cheers, -- Uli Kust

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Andy Lee
On Jul 28, 2008, at 3:41 PM, Andy Lee wrote: On Jul 28, 2008, at 3:29 PM, Jonathan Hess wrote: A good reason would be that you care about identity equality and not value equality. You care that the key is the exact same instance, not that it is an equivalent instance. (== vs isEqual:) Ah, g

Re: Drawing Graphs in Cocoa

2008-07-28 Thread Erik Buck
You may want http://www.graphviz.org/ ___ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your

Efficient Updating of Thousands of NSManagedObject Relationships

2008-07-28 Thread Kenny Carruthers
Given an array of NSManagedObjects, is there an efficient way to batch update a relationship on each object? Iterating through the array and setting the relationship using any of the available methods is incredibly slow when doing this on thousands of objects. As an example, assume

Predicate Binding Format/case sensitive question ...

2008-07-28 Thread vince
Thanks, I've added a search field to my database using bindings. Works fine. How do I alter the following Predicate Format binding syntax ... entry contains $value ... so that text search inputs are NOT case sensitive? thanks again, v. ___ Cocoa-d

Re: Efficient Updating of Thousands of NSManagedObject Relationships

2008-07-28 Thread I. Savant
> for (song in songs) > NSManagedObject *song = ... (Fetch some from proper context) > song.playlist = destinationList > end You could always ask the playlist for its -mutableSetValueForKey:@"songs" ... then call -addObjects: and pass in your songs array. -- I.S. _

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Carter R. Harrison
On Jul 28, 2008, at 3:24 PM, David Wilson wrote: On Mon, Jul 28, 2008 at 2:13 PM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: Hey Everybody, If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? Right now I'm doing

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread David Wilson
On Mon, Jul 28, 2008 at 3:52 PM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: > > Actually now that I'm looking at this more closely, NSDictionary is > expecting an NSString for the key when inserting a value. Your example uses > an NSValue for the key - the compiler is throwing a warning for thi

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Michael Ash
On Mon, Jul 28, 2008 at 3:29 PM, Jonathan Hess <[EMAIL PROTECTED]> wrote: > > On Jul 28, 2008, at 11:44 AM, I. Savant wrote: > If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? >>> >>> I'm racking my brains try

Re: Predicate Binding Format/case sensitive question ...

2008-07-28 Thread Fabian
Easy. entry contains[c] $value, or [cd] for case- and diacritic-insensitive. F. On Mon, Jul 28, 2008 at 10:32 PM, vince <[EMAIL PROTECTED]> wrote: > Thanks, > I've added a search field to my database using bindings. Works fine. > > How do I alter the following Predicate Format binding syntax ...

Bizarre Xcode Behaviour

2008-07-28 Thread Patrick Walker
I've been working on an item and it worked all fine and dandy. Knowing things would soon go awry, I took a snapshot. I did a build after making an addition of another NSTextField label. Suddenly, each time the program was built or launched, I would get this: 2008-07-28 18:15:31.039 Server

Re: Authenticate Password.

2008-07-28 Thread Shawn Erickson
On Mon, Jul 28, 2008 at 7:24 AM, Macarov Anatoli <[EMAIL PROTECTED]> wrote: > With the help of this procedure I check whether the password has been entered > correctly. But the code works only for the user with admins rights. How do I > check the password being a standard user? You should "neve

Re: Bizarre Xcode Behaviour

2008-07-28 Thread Nick Zitzmann
On Jul 28, 2008, at 3:19 PM, Patrick Walker wrote: 2008-07-28 18:15:31.062 Server[6718:10b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** - [NSApplication isDescendantOf:]: unrecognized selector sent to instance 0x112580' That doesn't look like

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Charles Steinman
--- On Mon, 7/28/08, Carter R. Harrison <[EMAIL PROTECTED]> wrote: > Actually now that I'm looking at this more closely, > NSDictionary is > expecting an NSString for the key when inserting a value. > Your > example uses an NSValue for the key - the compiler is > throwing a > warning for th

Re: [Newbie] Communication between two Views?

2008-07-28 Thread Hamish Allan
On Mon, Jul 28, 2008 at 8:12 PM, I. Savant <[EMAIL PROTECTED]> wrote: > On Mon, Jul 28, 2008 at 8:01 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: > >> On Mon, Jul 28, 2008 at 5:51 PM, Wickl thomas <[EMAIL PROTECTED]> wrote: >> >>> I know how MVC works with one Model, one View and >>> one Controller

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-28 Thread Hamish Allan
For anyone searching the archives for "connection went invalid while waiting for a reply": I never found out why this message was appearing, but I found a workaround. Instead of calling [client callbackWithArgument:arg], call [client performSelector:@selector(callbackWithArgument:) withObject:arg

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Jean-Daniel Dupas
Le 29 juil. 08 à 00:09, Charles Steinman a écrit : --- On Mon, 7/28/08, Carter R. Harrison <[EMAIL PROTECTED]> wrote: Actually now that I'm looking at this more closely, NSDictionary is expecting an NSString for the key when inserting a value. Your example uses an NSValue for the key - the

Re: Repositioning a content view w/in a window

2008-07-28 Thread R.L. Grigg
On Jul 26, 2008, at 3:15 AM, Michael Ash wrote: On Fri, Jul 25, 2008 at 11:08 PM, Henry McGilton (Starbase) <[EMAIL PROTECTED]> wrote: On Jul 25, 2008, at 6:50 PM, Michael Ash wrote: In fact I would go so far as to say that if you ever use -setContentView:, you are very probably doing it wro

NSTreeController rearrangeObjects doesn't always trigger sorting

2008-07-28 Thread Jonathan Fewtrell
I know that similar issues have been raised in the past, but I haven't been able to find a clear solution. I have a Core Data app with an NSOutlineView controlled by an entity- mode NSTreeController bound to the managed object context. The NSTreeController has sort descriptors based on certa

Re: Repositioning a content view w/in a window

2008-07-28 Thread Erik Buck
Is something like this a decent Cocoa approach: // create the window myWindow = [[NSWindow alloc] initWithContentRect: ... ]; // insert the existing matrix as it's content view [myWindow setContentView:myMatrix]; // alter the position of the matrix NSPoint newPoint = ...

Re: [Newbie] Communication between two Views?

2008-07-28 Thread I. Savant
On Jul 28, 2008, at 5:26 PM, Hamish Allan wrote: I agree, so I'm not sure why you're using this as a counter-example to what I said! I'm confused. The OP said, "... I really don´t understnd how the controllers of different Views communicate with each other." To which you replied, "Thr

Re: Repositioning a content view w/in a window

2008-07-28 Thread R.L. Grigg
On Jul 28, 2008, at 3:54 PM, Erik Buck wrote: Is something like this a decent Cocoa approach: // create the window myWindow = [[NSWindow alloc] initWithContentRect: ... ]; // insert the existing matrix as it's content view [myWindow setContentView:myMatrix]; // alter the position

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Ken Thomases
On Jul 28, 2008, at 7:30 AM, Graham Cox wrote: One thing that I'm a bit unsure about. If I enter a symbolic breakpoint, will it break on the first instruction of that method or further along? The breakpoint is after the local frame has been set up: $ gdb /Applications/TextEdit.app/Contents

Re: Efficient Updating of Thousands of NSManagedObject Relationships

2008-07-28 Thread Kenny Carruthers
Even building up an array of managedobjects and then passing that to the set returned from mutableSetValueForKey results in extremely long updates. For example, I just tried moving 1300 songs to a playlist and while it took almost no time to fetch each song from the managed context and buil

  1   2   >