Re: Transparent colors

2008-07-28 Thread Ken Ferry
Mm, okay, but I don't want people to get it in their heads that something's wrong with these functions. I'm pretty sure if you were to investigate you'd find that it was something else. I just ran a test suite and verified that NSRectFill and related functions are not munging the compositing mode

Re: Pre-requisites for automatic image highlighting in NSButton?

2008-07-28 Thread Mark Allerton
Thanks very much Ken, that worked exactly as advertised! ..Mark.. On 28-Jul-08, at 10:09 PM, Ken Ferry wrote: Oops, better link: Ken Ferry Cocoa Frameworks On Mon, Jul 28, 2008 at 10:08 PM, Ken Ferry <[EMAIL PROT

Re: Pre-requisites for automatic image highlighting in NSButton?

2008-07-28 Thread Ken Ferry
Oops, better link: Ken Ferry Cocoa Frameworks On Mon, Jul 28, 2008 at 10:08 PM, Ken Ferry <[EMAIL PROTECTED]> wrote: > Hi Mark, > > You haven't mentioned anything about the isTeplate property yet, so > maybe you aren't a

Re: Pre-requisites for automatic image highlighting in NSButton?

2008-07-28 Thread Ken Ferry
Hi Mark, You haven't mentioned anything about the isTeplate property yet, so maybe you aren't aware of it. Take a look at the section of the AppKit Leopard release notes titled "Text and image effects: -[NSImage isTemplate]".

Some Application Windows are not Resizing

2008-07-28 Thread kalpana k
Hi... We are developing an application for which we need to resize third party Application Windows. I am using accessibility API's for resizing. Some of the Applications like TextEdit, Finder, Terminal etc... are resized properly according to the given size. But the Applications like iTunes, DVD P

Pre-requisites for automatic image highlighting in NSButton?

2008-07-28 Thread Mark Allerton
Hello, I have been trying to get automatic image highlighting to work in "rounded textured" style buttons, created in IB. So far I am able to make this work just fine when using "system provided" images (for example "NSGoRightTemplate") but unable to make this work with my own images provided as e

NSButton event waits until setEnabled is executed?

2008-07-28 Thread Dae Suk Chai
Hey all, I have a small cocoa app, which basically behaves like an regular installation program. The problem I am facing is the following : 1) User clicks so called "Next" button, I would hide that button and disable it using the following function (fHide = YES) -(void) hideButton:(NSButton*)

Re: Transparent colors

2008-07-28 Thread Graham Cox
OK, thanks for the clarification. A bit odd though - on Tiger I was using a transparent colour with NSRectFill and that worked OK, whatever was drawing "underneath" came out as expected. On Leopard, it still draws that rect OK, but anything drawn underneath this rect (using the usual bezier

Re: What is the maximum NSURL length?

2008-07-28 Thread Nick Zitzmann
On Jul 28, 2008, at 6:01 PM, Philip Dow wrote: Hello, quick question. What is the maximum length of an utf-8 string that NSURL can handle when using +[NSURL urlWithString:]. I understand that Safari can deal with tens of thousands of characters in the url field. Would somebody be able to o

Re: Transparent colors

2008-07-28 Thread Ken Ferry
> Don't think so.. NSRectFill does and always has filled in copy mode. Er, to be clear though, unless you have layer backed views on, every view draws into the same flat buffer of color. So if you do this: [[NSColor clearColor] set]; NSRectFill(rect); then you are clearing out all the color in

Re: Transparent colors

2008-07-28 Thread Ken Ferry
On Mon, Jul 28, 2008 at 7:46 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > > On 29 Jul 2008, at 12:31 pm, Dale Miller wrote: > >> I cannot get transparent colors to work. I have tried two cases: >> 1) I have a view which returns YES to "isTransparent". The log shows the >> method has been called and

Re: Transparent colors

2008-07-28 Thread Andrew Merenbach
Hi, Dale, Have you considered [NSBezierPath fillRect:]? Cheers, Andrew On Jul 28, 2008, at 7:31 PM, Dale Miller wrote: I cannot get transparent colors to work. I have tried two cases: 1) I have a view which returns YES to "isTransparent". The log shows the method has been called and

Re: Transparent colors

2008-07-28 Thread Graham Cox
On 29 Jul 2008, at 12:31 pm, Dale Miller wrote: I cannot get transparent colors to work. I have tried two cases: 1) I have a view which returns YES to "isTransparent". The log shows the method has been called and responded YES. If I do a NSRectFill after [[NSColor clearColor] set] the view

Re: [Newbie] Communication between two Views?

2008-07-28 Thread I. Savant
Ken: This is incorrect. Notifications are typically synchronous. They do not rely on the run-loop for delivery. The code which posts a notification does not proceed until all observers have received the notification. I stand corrected: http://developer.apple.com/documentation/Cocoa

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

2008-07-28 Thread Chris Suter
Hi Hamish, On Tue, Jul 29, 2008 at 7:35 AM, Hamish Allan <[EMAIL PROTECTED]> wrote: > 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 callbac

Transparent colors

2008-07-28 Thread Dale Miller
I cannot get transparent colors to work. I have tried two cases: 1) I have a view which returns YES to "isTransparent". The log shows the method has been called and responded YES. If I do a NSRectFill after [[NSColor clearColor] set] the view displays as black. 2) If i do a "drawInRect" with t

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

2008-07-28 Thread Adam R. Maxwell
On Jul 28, 2008, at 3:23 PM, Jean-Daniel Dupas wrote: 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

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Chris Suter
Hi Graham, On Mon, Jul 28, 2008 at 5:02 PM, 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

Re: [Newbie] Communication between two Views?

2008-07-28 Thread Ken Thomases
On Jul 28, 2008, at 8:32 PM, I. Savant wrote: [Using notifications is] certainly a way to accomplish one-way messaging "whenever it gets there", but it's not always appropriate. Notifications do not occur within the same run loop, so this method wouldn't work if you needed to, say, tell ano

Re: [Newbie] Communication between two Views?

2008-07-28 Thread I. Savant
No idea whether this is of use but an example of two logically unconnected controllers talking to each other via notifications can be found here. That's certainly a way to accomplish one-way messaging "whenever it gets there", but it's not always appropriate. Notifications do not occur

Re: [Newbie] Communication between two Views?

2008-07-28 Thread julius
On 28 Jul 2008, at 16:39, "Thomas Wickl" <[EMAIL PROTECTED]> wrote Subject: [Newbie] Communication between two Views? Can someone please give me an example? No idea whether this is of use but an example of two logically unconnected controllers talking to each other via notifications can be

Re: What is the maximum NSURL length?

2008-07-28 Thread Gregory Weston
Philip Dow wrote: Hello, quick question. What is the maximum length of an utf-8 string that NSURL can handle when using +[NSURL urlWithString:]. I understand that Safari can deal with tens of thousands of characters in the url field. Would somebody be able to offer a more specific number? Shou

Re: sorting two arrays

2008-07-28 Thread Michael Ash
On Mon, Jul 28, 2008 at 9:17 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > Ah, OK, didn't quite grok that. If they are related, could object A have a > reference to object B? If so, just sorting one array then gives you the > other objects sorted in the same order without having to sort array B (or >

Re: sorting two arrays

2008-07-28 Thread Graham Cox
Ah, OK, didn't quite grok that. If they are related, could object A have a reference to object B? If so, just sorting one array then gives you the other objects sorted in the same order without having to sort array B (or even have one). Graham On 29 Jul 2008, at 11:08 am, Randall Meadows

Re: sorting two arrays

2008-07-28 Thread Randall Meadows
On Jul 28, 2008, at 6:58 PM, Graham Cox wrote: This has a bit of a whiff about it. Two arrays of the same objects is not unusual, but forcing them always into the same order is - surely that's just a data duplication? If the arrays are meant to be identical, why not just use one array? What

Re: sorting two arrays

2008-07-28 Thread Graham Cox
Jeff, This has a bit of a whiff about it. Two arrays of the same objects is not unusual, but forcing them always into the same order is - surely that's just a data duplication? If the arrays are meant to be identical, why not just use one array? What is different? If array B contains arra

Re: Setting conditional breakpoint on Cocoa method? [SOLVED]

2008-07-28 Thread Graham Cox
Thanks Ken and Jonathan - with your help I got the debugger to reveal the source of the bug and fixed it. (And learned a useful new weapon in the process). cheers, Graham On 29 Jul 2008, at 9:38 am, Ken Thomases wrote: On Jul 28, 2008, at 7:30 AM, Graham Cox wrote: One thing that I'm a b

Re: [OT] How do you pronounce .xib?

2008-07-28 Thread William Squires
Can we kill this silly thread before I send a 'kill -9' to your ecks- eye-bee :) On Jul 28, 2008, at 3:26 PM, Andreas Wittenstein wrote: "Eleven B" - Andreas ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list

Re: sorting two arrays

2008-07-28 Thread William Squires
The most logical is to make a class that has - as properties - the two pieces of data being sorted, then put these in an NSArray (or NSMutableArray as appropriate to your situation), and then sort that instead. Not only will it sort both pieces of data together, but it's a lot easier to e

What is the maximum NSURL length?

2008-07-28 Thread Philip Dow
Hello, quick question. What is the maximum length of an utf-8 string that NSURL can handle when using +[NSURL urlWithString:]. I understand that Safari can deal with tens of thousands of characters in the url field. Would somebody be able to offer a more specific number? ~Phil _

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

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: 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: [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 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 = ...

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 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

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: 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: [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: 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: 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: 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

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: 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 ...

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: 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 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: 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. _

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

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

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

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: 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: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: 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: [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

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

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-

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

[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 ---

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

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: 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

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: 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

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 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 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 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: 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 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: 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: 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: [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: 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: 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: 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: [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

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: 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

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: 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

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: [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: 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: 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: 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: 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: 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

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

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

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

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: 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:

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

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

[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

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

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

  1   2   >