Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 14, 2008, at 8:20 PM, Ron Lue-Sang wrote: Hmm yea, that's a bummer. If I were building the views you're using, I'd publish another binding in/from those views. Like "dataType" or "ridiculouslyLongGermanStyleNameDescribingWhatTheBindingIsFor". And then your views would really have two

Table column header not highlighted at first

2008-08-15 Thread Graham Cox
I have a table view with a column + column header with a sort descriptor. In use, it works fine, I can click the column header and it sorts the list as it should, and the little arrow points up or down and it's blue. When I first show the window though, it's white and no arrow is visible.

Re: Is this a bug, or am I hacking?

2008-08-15 Thread Michael Ash
On Thu, Aug 14, 2008 at 8:45 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > > As it turns out I can get the functionality I need by simply subscribing to > both notifications, but I was trying to avoid linking in the headers for all > the object types that are contained by my data management code - th

Re: NSSearchField bindings almost work

2008-08-15 Thread Dustin Robert Kick
Ok, I'm not sure if anyone looked at this at all, but I figured out that I needed my predicate format binding to be "some somePath contains[cd] $value", for it to behave correctly, due to the fact that the paths that were malfunctioning for me were to-many relationships. I still don't unde

Re: Making a bound view re-read its value

2008-08-15 Thread Caleb Strockbine
On Aug 14, 2008, at 8:36 PM, Markus Spoettl wrote: When the user changes the preference, the view should update its value so it uses the right units. There is no change to the underlying data, so there's no change notification that would force the binding to refresh the view. So how can I manua

Synchronous modal sheet

2008-08-15 Thread Jacob Bandes-Storch
I want to display a modal sheet, but my code isn't currently at the point where I can split it up. Is there a way to run a modal sheet synchronously, so the rest of the code after it starts isn't called until it ends? Or do I have no choice but to restructure this? __

Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 14, 2008, at 9:47 PM, Caleb Strockbine wrote: Why not use -setKeys:triggerChangeNotificationsForDependentKey:? Make the key for your data dependent on the key for the preference, so that anyone who's watching the data will get a notification when the preference changes. This way, you

Re: Making a bound view re-read its value

2008-08-15 Thread Quincey Morris
On Aug 14, 2008, at 20:10, Markus Spoettl wrote: The problem is that I actually have a lot arrays of lots of objects each with a number of different properties that can be displayed in more than one way (all dependent on one preference settings). Putting these through proxies/proxy arrays s

Re: Core Data merging

2008-08-15 Thread Tim Isted
On 15 Aug 2008, at 00:19, Vadim Lozko wrote: I'm having a problem trying to upgrade an existing store of a Core Data database to a newer model that simply has 1 additional attribute property in an entity. This is not a document based app. Also, not sure if this is significant, but the xcdat

Re: Cocoa and SOAP without WebServicesCore

2008-08-15 Thread patrick machielse
Op 15 aug 2008, om 01:07 heeft Rohan Lloyd het volgende geschreven: On 13 Aug 2008, at 6:26 AM, patrick machielse wrote: Does anyone have experiences with gSOAP on OS X, or know of a good alternative? A while back I was looking for a way to handle SOAP in Cocoa, and couldn't really find a

Re: Synchronous modal sheet

2008-08-15 Thread Graham Cox
On 15 Aug 2008, at 3:16 pm, Jacob Bandes-Storch wrote: I want to display a modal sheet, but my code isn't currently at the point where I can split it up. Is there a way to run a modal sheet synchronously, so the rest of the code after it starts isn't called until it ends? Or do I have no c

Re: Core Data merging

2008-08-15 Thread Vadim Lozko
On Aug 15, 2008, at 6:09 AM, Tim Isted wrote: On 15 Aug 2008, at 00:19, Vadim Lozko wrote: I'm having a problem trying to upgrade an existing store of a Core Data database to a newer model that simply has 1 additional attribute property in an entity. This is not a document based app. Als

Re: Threading problem using AsyncSocket (Matthew Youney)

2008-08-15 Thread jonathan
Matthew 1. Are you using the latest AsyncSocket sources? cocoaasyncsocket - Google Code 2. AsyncSocket, though very good, is not perfect. I recently subclassed AsyncSocket and encountered a fundamental problem (easily fixed however). There could be unrecognised issues with the threading

Re: Threading problem using AsyncSocket (Matthew Youney)

2008-08-15 Thread jonathan
Hi Matthew The Cocoa docs have a lot of Info on threading and the run loop (you are probably sick looking at them by now). In particular see "Threading programming guide: Using run loop objects"; The section entitled Configuring the run loop says: Before you run a run loop on a secondary thr

Re: CoreData, Object/Array Controllers and KVO

2008-08-15 Thread Negm-Awad Amin
Am Do,14.08.2008 um 07:46 schrieb Jeff Hellman: Hi Folks- Hi as already said, KVO is not the right place to do that. If this is a real important property, you should think about a model user interface (update button, sheet) to handle it. You can use notifications or maybe "bindings throu

Re: Making a bound view re-read its value

2008-08-15 Thread Negm-Awad Amin
Hi, Am Fr,15.08.2008 um 00:21 schrieb Markus Spoettl: Hi List, how can I make a view value which is bound to a property manually re-read (or update) the value it displays? The simplified setup is this: I have an object, that stores its values (say a temperature) in Celcius. I also have

Re: Is this a bug, or am I hacking?

2008-08-15 Thread Keary Suska
8/14/08 6:45 PM, also sprach [EMAIL PROTECTED]: > [[NSNotificationCenter defaultCenter] addObserver:self selector: > (<...>) name:kMyConstant1 object:]; > > My observer doesn't receive notifications from kMyConstant2 even > though it's defined to be the same literal string as kMyConstant1. > > A

Question about directory for Application Caches

2008-08-15 Thread Jason Coco
Hello All, I'm a little unclear about this... maybe one of you has some ideas? Currently, the call to NSSearchPathForDirectoriesInDomain(NSCachesDirectory, NSUserDomainMask, NO); returns the path ~/Library/Caches. The FSFindFolder(...) call also returns the same thing. I noticed, however

Re: Is this a bug, or am I hacking? [SOLVED]

2008-08-15 Thread Graham Cox
On 15 Aug 2008, at 11:53 pm, Keary Suska wrote: What if we bark up the tree of the "object" parameter? If you are passing this parameter, you will only receive notifications from the specific object. It sounds like you are working with two different objects that you want to receive notifica

Re: Animating a view along a path

2008-08-15 Thread douglas welton
Chilton, How complex is your path? if it's linear, why not just tell the view's animator to do it? If it's more complex, you might want to check out NSAnimation and NSViewAnimation (particularly the progress marks and delegates in these two classes) Have you taken a look at the CocoaSl

Re: Synchronous modal sheet

2008-08-15 Thread Jacob Bandes-Storch
Yeah, I've worked with sheets before in different contexts. The problem with this one is that I want to display the sheet during the first iteration of a loop (in which I do a bit of work with other loops), and splitting it up will take some work. But unless there are any good alternatives

Re: Question about directory for Application Caches

2008-08-15 Thread Jeff Johnson
Jason, See the following threads for some discussion of these issues: http://lists.apple.com/archives/Macnetworkprog/2008/Apr/msg00033.html http://lists.apple.com/archives/Xcode-users/2008/Jul/msg00283.html -Jeff On Aug 15, 2008, at 8:56 AM, Jason Coco wrote: Hello All, I'm a little uncle

Re: Table column header not highlighted at first

2008-08-15 Thread Corbin Dunn
On Aug 14, 2008, at 9:28 PM, Graham Cox wrote: I have a table view with a column + column header with a sort descriptor. In use, it works fine, I can click the column header and it sorts the list as it should, and the little arrow points up or down and it's blue. When I first show the wi

Re: Question about directory for Application Caches

2008-08-15 Thread Jason Coco
On Aug 15, 2008, at 11:11 , Jeff Johnson wrote: Jason, See the following threads for some discussion of these issues: http://lists.apple.com/archives/Macnetworkprog/2008/Apr/msg00033.html http://lists.apple.com/archives/Xcode-users/2008/Jul/msg00283.html Interesting... thanks, Jeff. So I g

Re: Table column header not highlighted at first

2008-08-15 Thread Graham Cox
On 16 Aug 2008, at 1:27 am, Corbin Dunn wrote: Howdy! call setSortDescriptors: on the tableview -- pass it the [tableColumn sortDescriptorPrototype] in an array. [] Ah, never mind my first answer. Exactly how are you doing this (code)? When? Are you sure you aren't setting it to nil by

Re: Table column header not highlighted at first

2008-08-15 Thread Corbin Dunn
On Aug 15, 2008, at 8:36 AM, Graham Cox wrote: On 16 Aug 2008, at 1:27 am, Corbin Dunn wrote: Howdy! call setSortDescriptors: on the tableview -- pass it the [tableColumn sortDescriptorPrototype] in an array. [] Ah, never mind my first answer. Exactly how are you doing this (code)?

Changing NSTextFieldCells' editing appearance?

2008-08-15 Thread Tim Andersson
Hi there, I have a few questions about changing the way my NSTextFieldCells look while they are being edited. First off, when editing my cell, the cell's background-color changes to black (As such: http://img170.imageshack.us/img170/4610/ bild1zq3.png). Is there any way of changing it to whi

Re: Animating a view along a path

2008-08-15 Thread Chilton Webb
Hi Douglas! Thanks for writing. I realize this isn't something people do too much of, so any help would be greatly appreciated. On Aug 15, 2008, at 9:45 AM, douglas welton wrote: How complex is your path? if it's linear, why not just tell the view's animator to do it? That's the trick. I'm

Re: Changing NSTextFieldCells' editing appearance?

2008-08-15 Thread Negm-Awad Amin
Am Fr,15.08.2008 um 18:02 schrieb Tim Andersson: Hi there, I have a few questions about changing the way my NSTextFieldCells look while they are being edited. First off, when editing my cell, the cell's background-color changes to black (As such: http://img170.imageshack.us/img170/4610/bil

Re: AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?

2008-08-15 Thread Fritz Anderson
On 14 Aug 2008, at 1:16 PM, Lee, Frederick wrote: I tried to convert the integer into a pointer (via casting). Like this: NSInteger myID = ABRecordGetRecordID(myABGroup); [myDict setObject:(NSInteger)myID forKey:groupName]; But I get a compiler warning about the pointer vs integer. Must I wra

Re: Question about directory for Application Caches

2008-08-15 Thread Jeff Johnson
On Aug 15, 2008, at 10:33 AM, Jason Coco wrote: On Aug 15, 2008, at 11:11 , Jeff Johnson wrote: Jason, See the following threads for some discussion of these issues: http://lists.apple.com/archives/Macnetworkprog/2008/Apr/msg00033.html http://lists.apple.com/archives/Xcode-users/2008/Jul/ms

Re: Question about directory for Application Caches

2008-08-15 Thread Jason Coco
On Aug 15, 2008, at 12:21 , Jeff Johnson wrote: On Aug 15, 2008, at 10:33 AM, Jason Coco wrote: On Aug 15, 2008, at 11:11 , Jeff Johnson wrote: Jason, See the following threads for some discussion of these issues: http://lists.apple.com/archives/Macnetworkprog/2008/Apr/ msg00033.html h

Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 14, 2008, at 11:37 PM, Quincey Morris wrote: Can you not trigger the update by making the object property (temperature) KVO-dependent on the preference setting? I don't mean the object property's value, just the property itself. Either use keyPathForValuesAffectingTemperature (or what

Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 15, 2008, at 6:40 AM, Negm-Awad Amin wrote: [object willChangeValueForKeyPath:keyPath]; [object didChangeValueForKeyPath:keyPath]; I tried that yesterday but due to a stupid mistake it didn't work. I does now and it's that's a good idea. it would eliminate the need of changing thing

Re: Question about directory for Application Caches

2008-08-15 Thread Jeff Johnson
On Aug 15, 2008, at 11:21 AM, Jeff Johnson wrote: Thankfully, it seems that we're finally getting some full disk encryption solutions for the Mac. Oops, I should have said full disk encryption of the boot volume, considering that I developed a full disk encryption solution for non- boot vo

Re: Re: Synchronous modal sheet

2008-08-15 Thread Daniel Dickison
Yeah, I've worked with sheets before in different contexts. The problem with this one is that I want to display the sheet during the first iteration of a loop (in which I do a bit of work with other loops), and splitting it up will take some work. But unless there are any good alternatives

Re: Making a bound view re-read its value

2008-08-15 Thread Adam R. Maxwell
On Friday, August 15, 2008, at 09:57AM, "Markus Spoettl" <[EMAIL PROTECTED]> wrote: >On Aug 15, 2008, at 6:40 AM, Negm-Awad Amin wrote: >> [object willChangeValueForKeyPath:keyPath]; >> [object didChangeValueForKeyPath:keyPath]; > > >I tried that yesterday but due to a stupid mistake it didn't w

Re: Animating a view along a path

2008-08-15 Thread douglas welton
Chilton, Ultimately a "curve" is just a lot of straight line, really, really, really close to each other ; ^} Check out the "Animation Programming Guide for Cocoa" to see how you can link multiple animations together. Remember, you can also vary the rate of animation as well as the anim

Re: Making a bound view re-read its value

2008-08-15 Thread Jeff Johnson
On Aug 15, 2008, at 12:23 PM, Adam R. Maxwell wrote: Sending empty willChange/didChange messages is not a good idea: http://www.cocoabuilder.com/archive/message/cocoa/2008/5/18/207038 Hmm, I've read that whole thread and still can't figure out why it's not a good idea, other than mmalc says

Re: Changing NSTextFieldCells' editing appearance?

2008-08-15 Thread tim_ph
> > -setBackgroundColor: didn't work? > Nope, it didn't. But even if it would've, the background would have been visible at all times. I'm sorry if I didn't write clearly enough, but it's only when the cell is being edited that the background becomes black (Instead of white like it usually does).

Re: Animating a view along a path

2008-08-15 Thread Ron Lue-Sang
Are you able to just use CoreAnimation directly? Like, CAKeyframeAnimation? I've never used it, but the header seems to imply it'd apply to the problem you're trying to solve. On Aug 15, 2008, at 10:36 AM, douglas welton wrote: Chilton, Ultimately a "curve" is just a lot of straight line,

RE: Threading problem using AsyncSocket

2008-08-15 Thread Matthew Youney
Jonathan, Thank you sooo much for your assistance. Here's what ended up working for me: 1. I did update my AsyncSocket class as suggested. Thanks. 2. I determined that my runloop was not functioning as expected using your suggestions. As you said, there is a lot of information here, a

Re: Making a bound view re-read its value

2008-08-15 Thread Quincey Morris
On Aug 15, 2008, at 10:23, Adam R. Maxwell wrote: Sending empty willChange/didChange messages is not a good idea: http://www.cocoabuilder.com/archive/message/cocoa/2008/5/18/207038 Except that the idea of "non-empty" willChange/didChange messages doesn't cohere. The following is a perfectly

Re: Animating a view along a path

2008-08-15 Thread Bill Dudney
Hi Chilton, There are a couple of examples of doing just that in the CA book (disclaimer: I'm the author) showing how to animate views with keyframe animations. http://www.pragprog.com/titles/bdcora The basic idea is to set the path for the keyframe animation and then put that animation

Re: creating files to write data to?

2008-08-15 Thread FTB Accounts
I saw this post on the list previously. However I am still unable to write to a file... I have tried everything... Here is my code for my main.m file. What am I missing? I am running a Mac OS X 10.4.11 and editing with Xcode 2.2.1 HERE IS MY CODE FOR main.m: #import int main(int argc, char *a

RE: Threading problem using AsyncSocket

2008-08-15 Thread Matthew Youney
Jonathan, Thank you sooo much for your assistance. Here's what ended up working for me: 1. I did update my AsyncSocket class as suggested. Thanks. 2. I determined that my runloop was not functioning as expected using your suggestions. As you said, there is a lot of information here, a

Binding NSButton state to an NSMutableArray inside an NSMutableArray

2008-08-15 Thread TouchCab Developer
Hi list. I'm new to the list and fairly new to cocoa, although many years of programming assembler, C and C++ helps a lot. I'm getting the hang of Objective-C and enjoying it very much. In my App Delegate file I keep an NSMutableArray of "base" objects which is my application's data core.

best way to determine if portion of window is visible?

2008-08-15 Thread Jason Bobier
Hey folks, I'd like to fade my window out if any portion of it is visible to the user, otherwise I simply want to close it for speed. Is there an easy way to determine if some portion of the window is visible? Thanks! Jason ___ Cocoa-dev mailing

Re: creating files to write data to?

2008-08-15 Thread Nick Zitzmann
On Aug 14, 2008, at 6:42 PM, FTB Accounts wrote: However I am still unable to write to a file... I have tried everything... Here is my code for my main.m file. What am I missing? For starters, NSString constants have to begin with an @ sign, or they will be treated by the compiler as C c

Re: creating files to write data to?

2008-08-15 Thread Devon Ferns
NSFileHandle writeData takes an NSData pointer not a string and that's actually not how you do a string, you're missing the @ in front of it.

Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 15, 2008, at 10:23 AM, Adam R. Maxwell wrote: Sending empty willChange/didChange messages is not a good idea: http://www.cocoabuilder.com/archive/message/cocoa/2008/5/18/207038 That thread gives absolutely no explanation as to why this would be harmful. Care to elaborate if you know

Re: Binding NSButton state to an NSMutableArray inside an NSMutableArray

2008-08-15 Thread Jack Carbaugh
I too have something similar I'm trying to tackle ... I'd like binding to show/hide a label item based on a value in an array. I've thought about using a transformer but was not able to make that work. Any suggstions would be great. jack On Aug 15, 2008, at Fri-08 /15 /08-2:10 PM, TouchCa

Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 15, 2008, at 11:02 AM, Quincey Morris wrote: IAC, Marcus's alternative is to do this: object.temperature = object.temperature; I'm not sure how synthesized property setters are are constructed exactly, but I believe that they check for an actual change in the value and set

NSLocalizedString, genstrings, and Unicode

2008-08-15 Thread Sean McBride
Hi all, The docs for NSLocalizedString() say "In order to be parsed correctly by genstrings, 'key' should not contain any high-ASCII characters." On 10.5.4 / Xcode 3.1, this does not seem to be true. Anyone know if the docs are simply out of date? I suspect that since 10.5 now allows UTF8 in @"

Forcing an NSImage to render it's NSImageRep's ?

2008-08-15 Thread Matthew Mashyna
I want to interlace some images on a column by column basis. My initial idea was to open them all as NSImages, rotate them 90 degrees, interlace them row by row using the image rep's row data and then rotate the final image back 90 degrees. I can't seem to force my NSImage to draw into an i

Window 'close' action fails

2008-08-15 Thread dct
I have two classes, RPlotController and SPlotController, both subclasses of PlotController which is a subclass of NSWindowController. In both I have identical (I believe) button-actuated actions to close an active window. The action operates properly for RPlotController and does nothing fo

Re: Making a bound view re-read its value

2008-08-15 Thread Markus Spoettl
On Aug 15, 2008, at 11:39 AM, Markus Spoettl wrote: On Aug 15, 2008, at 10:23 AM, Adam R. Maxwell wrote: Sending empty willChange/didChange messages is not a good idea: http://www.cocoabuilder.com/archive/message/cocoa/2008/5/18/207038 That thread gives absolutely no explanation as to why thi

Re: NSLocalizedString, genstrings, and Unicode

2008-08-15 Thread Sean McBride
On 8/15/08 1:13 PM, Aki Inoue said: >Yes, the compiler shipped with Xcode 3.0 and later supports UTF-8 in >constant strings. Aki, Thanks for your reply. I'm not sure you understood however. I know that the compiler accepts UTF8 in constant NSStrings, but what I'm not sure about is the 'genstri

Re: NSLocalizedString, genstrings, and Unicode

2008-08-15 Thread Aki Inoue
Yeah, my statement my have been a bit ambiguous. What I meant is the "tools" shipped with Xcode 3.0 and later supports UTF-8 in constant strings 8-). The tools include genstrings. And, please file a bug for updating the doc. Thanks, Aki On 2008/08/15, at 13:32, Sean McBride wrote: On 8/

[MEET]: LA CocoaHeads starting group study of Hillegass book.

2008-08-15 Thread Rob Ross
If you are in Los Angeles and interested in participating in a group book study of Hillegass' "Cocoa Programming for Mac OS X, 3rd Edition", http://search.barnesandnoble.com/Cocoa-Programming-for-Mac-OS-X/Aaron- Hillegass/e/9780321503619/?itm=1 please sign up with the (very low traffic) LA C

Re: NSLocalizedString, genstrings, and Unicode

2008-08-15 Thread Sean McBride
On 8/15/08 1:46 PM, Aki Inoue said: >Yeah, my statement my have been a bit ambiguous. > >What I meant is the "tools" shipped with Xcode 3.0 and later supports >UTF-8 in constant strings 8-). > >The tools include genstrings. Ah. Cheers! >And, please file a bug for updating the doc. Will do. --

Re: Binding NSButton state to an NSMutableArray inside anNSMutableArray

2008-08-15 Thread negm-awad
1.Sh*t: *Never* respond with a webmailer. I will copy my answers to the last mails tomorrow, when I'm at work. However Markus can do this, too. >I too have something similar I'm trying to tackle ... > >I'd like binding to show/hide a label item based on a value in an >array. I've thought about

RE: best way to determine if portion of window is visible?

2008-08-15 Thread negm-awad
>Hey folks, > >I'd like to fade my window out if any portion of it is visible to the >user, otherwise I simply want to close it for speed. Is there an easy >way to determine if some portion of the window is visible? I do not know, whether this is a "dirty" hack (are there clean hacks?), but you

Re: best way to determine if portion of window is visible?

2008-08-15 Thread Andy Lee
On Aug 15, 2008, at 2:18 PM, Jason Bobier wrote: I'd like to fade my window out if any portion of it is visible to the user, otherwise I simply want to close it for speed. Is there an easy way to determine if some portion of the window is visible? Offhand I'd say if they can't see it, they c

Re: Window 'close' action fails

2008-08-15 Thread Charles Steinman
--- On Fri, 8/15/08, dct <[EMAIL PROTECTED]> wrote: > Both classes implement 'init' in like fashion > (using different nibs > and different NSView subclasses/connections): > > - init > { > [NSBundle > loadNibNamed:@"SPlotWindow.nib" owner:self]; > [super > initWithWindowNibName

NSCalendarDate has subsecond precision

2008-08-15 Thread Jim Thomason
Wow. I just spent about an hour and a half debugging this, since it's rather nefarious. Now I need to go back to all sorts of existing data and correct for it, too. :-( Anyway, I'm just posting to the list as an informational thing just in case anybody else runs into a similar issue. I wasn't havi

Re: NSCalendarDate has subsecond precision

2008-08-15 Thread Deborah Goldsmith
NSCalendarDate is deprecated, so any bugs reported against it are unlikely to be fixed. Use NSCalendar instead. Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Aug 15, 2008, at 2:28 PM, Jim Thomason wrote: Wow. I just spent about an hour and a half debugging this, since it's rather nefari

Expanding outline view item ancestry

2008-08-15 Thread Antonio Nunes
Hi, Although there is a fair number of posts referencing "expandItem" I couldn't quite find this in the archives, although I had expected it to be a fairly common scenario: I search for an item that belongs to a tree that is shown in an NSOutlineView. When I find the item, I want the outl

Re: NSCalendarDate has subsecond precision

2008-08-15 Thread Quincey Morris
On Aug 15, 2008, at 14:28, Jim Thomason wrote: First of all, the origin of this. I had a little method that returns "today at midnight". Basically, I just created an NSCalendarDate object with [NSCalendarDate date] and subtracted off the current hours, minutes, and seconds to yield today with ti

Re: Forcing an NSImage to render it's NSImageRep's ?

2008-08-15 Thread Peter Ammon
On Aug 15, 2008, at 11:44 AM, Matthew Mashyna wrote: I want to interlace some images on a column by column basis. My initial idea was to open them all as NSImages, rotate them 90 degrees, interlace them row by row using the image rep's row data and then rotate the final image back 90 degre

Re: Expanding outline view item ancestry

2008-08-15 Thread Antonio Nunes
On 15 Aug 2008, at 22:37, Antonio Nunes wrote: I search for an item that belongs to a tree that is shown in an NSOutlineView. When I find the item, I want the outline view to show the it (if it is currently collapsed) and select its row. For that I wrote the following code, that should ensu

Re: Expanding outline view item ancestry

2008-08-15 Thread Corbin Dunn
Hey António On Aug 15, 2008, at 2:37 PM, Antonio Nunes wrote: Hi, Although there is a fair number of posts referencing "expandItem" I couldn't quite find this in the archives, although I had expected it to be a fairly common scenario: I search for an item that belongs to a tree that is s

Re: Expanding outline view item ancestry

2008-08-15 Thread Corbin Dunn
On Aug 15, 2008, at 2:56 PM, Antonio Nunes wrote: On 15 Aug 2008, at 22:37, Antonio Nunes wrote: I search for an item that belongs to a tree that is shown in an NSOutlineView. When I find the item, I want the outline view to show the it (if it is currently collapsed) and select its row. Fo

Re: Making a bound view re-read its value

2008-08-15 Thread Michael Ash
On Fri, Aug 15, 2008 at 2:02 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: > On Aug 15, 2008, at 10:23, Adam R. Maxwell wrote: > >> Sending empty willChange/didChange messages is not a good idea: >> >> http://www.cocoabuilder.com/archive/message/cocoa/2008/5/18/207038 > > Except that the idea of "n

Re: best way to determine if portion of window is visible?

2008-08-15 Thread Michael Ash
On Fri, Aug 15, 2008 at 2:18 PM, Jason Bobier <[EMAIL PROTECTED]> wrote: > Hey folks, > > I'd like to fade my window out if any portion of it is visible to the user, > otherwise I simply want to close it for speed. Is there an easy way to > determine if some portion of the window is visible? If yo

Re: creating files to write data to?

2008-08-15 Thread FTB Accounts
Devon, thanks for your response. However, your suggestion still does not make the code work. No data is written to the file. > > /* WRITE DATA TO FILE: THIS IS A TEST */ > > [fh writeData:@"THIS IS A TEST"]; > > [fh closeFile]; I simply was copying the advice given on a previous post. I

Re: creating files to write data to?

2008-08-15 Thread Andy Lee
Are you sure you have write permissions to that directory? (I notice it's under /Applications, but it's also under xampp, so maybe you do, but I don't know.) Is an exception printed to the console? Are you sure fh is not nil? --Andy On Aug 15, 2008, at 6:10 PM, FTB Accounts wrote: Devon

Re: creating files to write data to?

2008-08-15 Thread Andy Lee
Also: You should add a check for the return value from your call to - writeToFile:atomically: (which is deprecated, by the way). The docs for +fileHandleForWritingAtPath: say it returns nil if the file doesn't exist (which might be the case if -writeToFile:atomically: failed), so you shou

Re: Window 'close' action fails

2008-08-15 Thread dct
I don't believe that my 'close' problem is explained by an awkward init -- as I said before, all of the other U/I operations of the nib "SPlotWindow.nib" are working as expected (so somehow I've dodged a potential bullet, at least so far). Re: "[splotView setFrame:NSMakeRect(50,50,50,50)];

Re: Expanding outline view item ancestry

2008-08-15 Thread Antonio Nunes
On 15 Aug 2008, at 23:01, Corbin Dunn wrote: See my response email to why that isn't possible. You can log a bug, but I won't change it. Thanks for the explanations Corbin. I'll leave it then. :-) António --- What you have inside you e

Re: Making a bound view re-read its value

2008-08-15 Thread Quincey Morris
On Aug 15, 2008, at 15:05, Michael Ash wrote: The problem then is that the empty will/did pair is used as a *substitute* for the proper calls. It's sometimes too hard to wrap every change in a will/did pair, so instead people put an empty will/did call *after* the change. It is this which ends u

Re: creating files to write data to?

2008-08-15 Thread Jason Coco
On Aug 15, 2008, at 18:10 , FTB Accounts wrote: Devon, thanks for your response. However, your suggestion still does not make the code work. No data is written to the file. /* WRITE DATA TO FILE: THIS IS A TEST */ [fh writeData:@"THIS IS A TEST"]; [fh closeFile]; I simply

Re: creating files to write data to?

2008-08-15 Thread Andy Lee
On Aug 15, 2008, at 6:43 PM, Jason Coco wrote: Adding the @ just makes it an NSString constant... but writeData still requires (NSData *), not (NSString *). Argh! Or perhaps, given the nature of this error, which I missed, I should say "Arg!" Surely you got a compiler warning? If you ign

Updating text field bound to core data

2008-08-15 Thread Andrew Zahra
I am working on a basic core data app. I have a single entity with a name attribute and other attributes including a file path. I have bound a table view to the entity name and then a group of text fields to the individual attributes to show the details. It works fine if I type stuff directly into

Re: Updating text field bound to core data

2008-08-15 Thread Ron Lue-Sang
On Aug 15, 2008, at 4:57 PM, Andrew Zahra wrote: I am working on a basic core data app. I have a single entity with a name attribute and other attributes including a file path. I have bound a table view to the entity name and then a group of text fields to the individual attributes to show

Re: Question about directory for Application Caches

2008-08-15 Thread Phil
On Sat, Aug 16, 2008 at 3:33 AM, Jason Coco <[EMAIL PROTECTED]> wrote: > 1) ~/Library/Caches is world writable too... so as long as you're logged in, > even if you have >your filevault armed, you're still gonna be somewhat vulnerable to cache > attacks. > 2) The new temporary directory (returne

Re: Updating text field bound to core data

2008-08-15 Thread Andrew Zahra
Excellent! It is starting to make sense to me now. I am using an ArrayController. I did this and it works: NSManagedObject *task = [controller selection]; [task setValue:fileName forKey:@"sourceFolder"]; 2008/8/16 Ron Lue-Sang <[EMAIL PROTECTED]> > > On Aug 15, 2008, at 4:57 PM, Andrew Zahra

Re: Window 'close' action fails

2008-08-15 Thread Charles Steinman
--- On Fri, 8/15/08, dct <[EMAIL PROTECTED]> wrote: > I don't believe that my 'close' problem is > explained by an awkward > init -- as I said before, all of the other U/I operations > of the nib > "SPlotWindow.nib" are working as expected (so > somehow I've dodged a > potential bullet, at l

Re: Updating text field bound to core data

2008-08-15 Thread Ron Lue-Sang
On Aug 15, 2008, at 5:59 PM, Andrew Zahra wrote: Excellent! It is starting to make sense to me now. I am using an ArrayController. I did this and it works: NSManagedObject *task = [controller selection]; [task setValue:fileName forKey:@"sourceF

Re: Window 'close' action fails

2008-08-15 Thread Keary Suska
8/15/08 4:28 PM, also sprach [EMAIL PROTECTED]: > I don't believe that my 'close' problem is explained by an awkward > init -- as I said before, all of the other U/I operations of the nib > "SPlotWindow.nib" are working as expected (so somehow I've dodged a > potential bullet, at least so far). Y

Re: Window 'close' action fails

2008-08-15 Thread Erik Buck
- init { [NSBundle loadNibNamed:@"SPlotWindow.nib" owner:self]; This step un-archives all of the objects in SPlotWindow.nib, restores all connections within the nib including connections made to File's Owner which you just specified, and calls -awakeFromNib for all of the un-archiv

Using Flex/Lex in a Cocoa project

2008-08-15 Thread John Joyce
Right now, I'm toying with using Flex/Lex in a Cocoa project. Unfortunately, I don't see a reliable or easy way to handle NSStrings correctly all the time with Flex. Does anybody have any suggestions for such text handling and reliable unicode aware regexes? I'm seriously not interested in imp

Re: NSTextView overdraw bug in Leopard?

2008-08-15 Thread Martin Wierschin
Replying to myself for the sake of the archives. We've had a report or two from users where text will incorrectly draw in an area it's not supposed to. Basically a line fragment (or part of one) from the prior NSTextContainer will draw over text in the current container. We did manage to

Re: Race in Apple's NSTreeContoller/NSOutlineView

2008-08-15 Thread Ron Lue-Sang
Hey Godfrey, I just happened upon this email. Could you please file a bug and include a sample project? On Jun 21, 2008, at 12:44 AM, Godfrey van der Linden wrote: Ok I gave up. No response was expected and I received what I expected. I suspect, but can't prove it, that there is a subtle

Re: Using Flex/Lex in a Cocoa project

2008-08-15 Thread Dustin Robert Kick
Just a thought, I haven't tried it, but the Core Foundation code is pure C, so you could send the NSString as a CFString, which is "toll- free bridged", which should mean you don't even have to make a cast (though, again, I haven't worked with this), but basically, you should be able to crea

arch: posix_spawnp: /Developer/Tools/otest: Bad CPU type in executable

2008-08-15 Thread Nick Pilch
Hi. I'm trying to put the infrastructure into my project for running unit tests and I'm stuck. The tests don't seem to execute. I've set things up as described here for independent tests: http://developer.apple.com/documentation/DeveloperTools/Conceptual/UnitTesting/Articles/CreatingTests.html

Problem with NSImage and .PNG file

2008-08-15 Thread Matt
I have an image that is 7200x32 pixels, which is used to store a series of 32x32 tiles. When drawing from this NSImage, the further towards the end of the image (right edge) the subrect goes, the blurrier it gets drawn. Changing the original image file to a TIFF resulted in the subrects being draw

Context and the drawing of NSImages

2008-08-15 Thread Brant Sears
Hi. I've run into some behavior that I don't understand. I'm trying to draw a series of NSImages programatically and then cache them into an NSArray. The problem I'm having is that some of the operations I'm doing on one image seem to have an effect on some subsequent images in the series

problem with DirectoryServices

2008-08-15 Thread Robert Kells
I am having trouble with some DirectoryServices calls. I have written a test app using an xcode template cmd-line utility/ coreFoundation tool. Basically, I want to mimic some cmd-line dscl with the corresponding ds* api calls, with the goal of unpacking RecordName, RealName, and UniqueID for

RE: Threading problem using AsyncSocket

2008-08-15 Thread Robbie Hanson
Jonathan, You might be interested to know that I just posted some sample code demonstrating multithreading with AsyncSocket. It's a sample HTTP server that splits incoming connections across multiple background threads. Check out the blog post: http://deusty.blogspot.com/2008/08/multi-th

  1   2   >