Re: sheet appears as normal window?

2008-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2008 at 2:39 AM, Kevin Dixon <[EMAIL PROTECTED]> wrote: > Yes, this was it, I wasn't aware of that, I assumed window was a method > that got the associated window, ala Win32. When you're working in Cocoa you *must* keep in mind that there is very little of this kind of magic stat

How to get Spaces configuration?

2008-03-21 Thread Scott.D.R
Hi everyone. I remember somebody has asked this question before. However, it is very difficult to search the original text... First apologize for repeat this question again. I am wondering how to query the current user configuration for the Spaces application in the system preferences? I re

NSView thread safety clarification

2008-03-21 Thread Mike Kluev
The Threading Programming Guide states: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/chapter_950_section_2.html#//apple_ref/doc/uid/1057i-CH12-SW4 <<... Drawing from secondary threads is thread-safe as long as you bracket drawing calls with cal

Could not find image named warning

2008-03-21 Thread Cocoa Developer
Hi, I added and removed warning.png image in interface builder, sometime back. This doesn't exist anymore in .nib file. But console log shows following message when I run the application "Could not find image named warning". Please help me how I can get rid of this message. Regards, Basavaraj __

Re: CILinearGradient on Leopard

2008-03-21 Thread Michael Babin
On Mar 20, 2008, at 10:52 AM, Chris Meyer wrote: I read the tech note for 10.5 describing changes to CILinearGradient and how "for applications compiled on Mac OS X v10.4, these filters continue to behave on Mac OS X v10.5 as they did previously." Trying to interpret this imprecise statemen

Re: Creating custom sheets

2008-03-21 Thread Ken Thomases
On Mar 20, 2008, at 7:37 PM, Kevin Dixon wrote: I want to create a custom sheet that displays a bit of text, a progress bar and an abort button. The Apple docs say use interface builder to make the UI for the sheet, but what should I add to my NIB, a window, panel, or custom view? A windo

Re: [Mini Announce] Leopard style tabs that need your help

2008-03-21 Thread Jesse Grosjean
I'm trying to create a simple clone of the tab view that's used by Terminal and Safari in Leopard. You say on your page that PSMTabBarControl doesn't have this style, but it does. It's the exact same tabs. Only the window background has changed, and that change is automatically picked up by PSMT

Updates in one split view pane causing other pane to redraw (on Tiger)

2008-03-21 Thread Martin Redington
In my app I have a split view (actually an RBSplitView). The left hand pane contains a table view representing disk volumes, and the right hand split view contains an NSOutlineView listing files and directories. When I update item in the files view, I'm *sometimes* seeing the volume vie

Determining Class from Instance address

2008-03-21 Thread Joseph Ayers
Given a log messages like: 2008-03-21 09:06:35.464 Roboplasm[12210:10b] *** -[VideoController measureMethodChanged:]: unrecognized selector sent to instance 0x3dfbc0 How does one determine the sender and self In my code VideoController doesn't get sent measureMethodChanged... -- Joseph A

Sync Services between Address Book and a web server

2008-03-21 Thread Dave Hersey
Hi, I've got an existing Cocoa application that's been around since 10.2 and syncs user data with a client's workgroup management server. The app does everything directly via SSL to the server and works very well from 10.2 through 10.5, but the client is considering converting it to use S

Re: Creating custom sheets

2008-03-21 Thread Sherm Pendley
On Fri, Mar 21, 2008 at 9:42 AM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Mar 20, 2008, at 7:37 PM, Kevin Dixon wrote: > > I want to create a custom sheet that displays a bit of text, a > > progress > > bar and an abort button. The Apple docs say use interface builder to > > make > > the UI fo

iPhone/iPod Touch

2008-03-21 Thread Matt Mashyna
This isn't really a cocoa question but you guys know everything. I need to know when an iPod Touch or iPhone is connected and get it's name. The other iPods are easy to query because they look like disk volumes. Does anyone know how I can as an iPod Touch what its name is ? Thanks, Matt ___

Re: Determining Class from Instance address

2008-03-21 Thread Sherm Pendley
On Fri, Mar 21, 2008 at 10:40 AM, Joseph Ayers <[EMAIL PROTECTED]> wrote: > Given a log messages like: > 2008-03-21 09:06:35.464 Roboplasm[12210:10b] *** -[VideoController > measureMethodChanged:]: unrecognized selector sent to instance 0x3dfbc0 > > How does one determine the sender and self >

Re: Determining Class from Instance address

2008-03-21 Thread Jerry Krinock
On 2008 Mar, 21, at 7:40, Joseph Ayers wrote: How does one determine the sender and self In my code VideoController doesn't get sent measureMethodChanged... Does VideoController implement measureMethodChanged: ? (Note carefully the colon which is part of the name.) If not, then implem

Re: iPhone/iPod Touch

2008-03-21 Thread Clark Cox
On Fri, Mar 21, 2008 at 7:23 AM, Matt Mashyna <[EMAIL PROTECTED]> wrote: > This isn't really a cocoa question but you guys know everything. I > need to know when an iPod Touch or iPhone is connected and get it's > name. The other iPods are easy to query because they look like disk > volumes. Doe

Re: disabling NSButton?

2008-03-21 Thread Rob Napier
Are you certain this code is actually running and that uiButton is bound to the button you think it's bound to? This looks correct (though you often don't require the setNeedsDisplay:). I would add: NSLog(@"DEBUG:disable uiButton:%@:%d", uiButton, [uiButton isEnabled]); And make sure what you

Re: Determining Class from Instance address

2008-03-21 Thread Jens Alfke
On 21 Mar '08, at 7:40 AM, Joseph Ayers wrote: Given a log messages like: 2008-03-21 09:06:35.464 Roboplasm[12210:10b] *** -[VideoController measureMethodChanged:]: unrecognized selector sent to instance 0x3dfbc0 How does one determine the sender and self Set a breakpoint at objc_ex

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread John Stiles
Michael Ash wrote: On Thu, Mar 20, 2008 at 7:58 PM, E. Wing <[EMAIL PROTECTED]> wrote: You really should profile to find your bottlenecks, especially when the STL is concerned. My personal experience has been that gcc poorly optimizes STL code automatically for you and you must go in and p

Re: Animation when adding view. Where should view come from, NIB or programmatic?

2008-03-21 Thread Rob Napier
On Thu, Mar 20, 2008 at 3:53 PM, David <[EMAIL PROTECTED]> wrote: > I think this is a basic question.In interface builder you can specify > animations which occur when adding a view. Question is, where does the > view > typical come from? It seems desirable to be able to design a potentially > com

Re: Leopard NSTableView Cell and single click editing

2008-03-21 Thread john chen
Hi Corbin and all, Sorry, I figured out that Corbin's solution did work, there was some other code in my project that cause problems. But I still suggest Apple should provide an open API for this double/single click feature if people like the behavior it was in tiger. Thanks & best regards, John

Re: [Mini Announce] Leopard style tabs that need your help

2008-03-21 Thread Seth Willits
On Mar 21, 2008, at 6:49 AM, Jesse Grosjean wrote: Seth thanks for your response. I know about the meta style in PSMTabBarControl. And yes it's very close, but still not exactly the same look as Safari's tabs. In a dark room, when you are sleepy, they tend to look pretty different to my

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread Gary L. Wade
I haven't been following this thread too closely, but after all this talk, I was wondering if the interested parties have tried using NSDictionary's dictionaryWithContentsOfFile or its related methods. The file it takes is a property list that can be created/edited in textual form or by using P

Re: yearly NSDraggingInfo -draggedImage question (BEWARE!)

2008-03-21 Thread Sherm Pendley
On Thu, Mar 20, 2008 at 7:09 PM, Nathan Vander Wilt < [EMAIL PROTECTED]> wrote: > On Mar 20, 2008, at 3:31 PM, Dave Hersey wrote: > > Do you get anything different if you print the object as a pointer > > (%p)? Printing it as an int value is... weird. > > > > Try: > > > > printf("Dragged Image: %

Re: Sync Services between Address Book and a web server

2008-03-21 Thread Alexander F. Hartner
Hi Dave, I have also been working on something quite similar to this for some time now, however I have been using Sync Services. Take a look at http://www.addressbookserver.com which uses WebServices (SOAP) to transfer Address Book content to a central server, which is also platform independent. T

Re: Intercepting retain/release of object

2008-03-21 Thread Scott Ribe
If you really want to understand what's going on, forget the counts, set breakpoints on your overloaded retain & release methods, then look at the stack trace every time. It may take a while, because there may be a lot going on behind the scenes, but it's one way to get an understanding. (Also add

Textview is overwriting itself

2008-03-21 Thread Christopher Woodruff
I used a textview to work as an automatically scrolling log window for a real time data output feed. I limit the size of the textstorage programmatically. When I fill the textstorage to my programmatic size limit (currently is 16384 characters), the textview overwrites itself momentarily.

Re: disabling NSButton?

2008-03-21 Thread Kevin Dixon
Actually, I already solved this problem. I needed to call [uiButton displayIfNeeded] instead of setNeedsDisplay to get it to update for some reason. thanks all -Kevin > On Wed, Mar 19, 2008 at 3:32 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I have two buttons, of the Round Textur

Beginner with Cocoa

2008-03-21 Thread Alex Handley
Hi, I have previously programmed in java and a few scripting languages and was wondering if anyone had any suggestion for learning cocoa, most of the tutorials I find are for pervious versions. Thanks Alex ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Sync Services between Address Book and a web server

2008-03-21 Thread Dave Hersey
Thanks for the info. Alex. Right, the code in question uses the Address Book framework, and all the sync logic was worked out and has been performing well. Since this work was originally done for 10.2, Sync Services wasn't around yet. Ideally, all of the AddressBook framework calls would go

Re: Beginner with Cocoa

2008-03-21 Thread Jeff LaMarche
On Mar 21, 2008, at 3:00 PM, Alex Handley wrote: Hi, I have previously programmed in java and a few scripting languages and was wondering if anyone had any suggestion for learning cocoa, most of the tutorials I find are for pervious version Apple has this: http://developer.apple.com/docu

Re: Intercepting retain/release of object

2008-03-21 Thread j o a r
On Mar 21, 2008, at 11:13 AM, Scott Ribe wrote: If you really want to understand what's going on, forget the counts, set breakpoints on your overloaded retain & release methods, then look at the stack trace every time. It may take a while, because there may be a lot going on behind the scen

Mac Application Developer- iPhone

2008-03-21 Thread Armand Daniels
Mac Application Developer Small startup is looking for an exceptional engineer to work on state-of-the art communication technology for Mac OS X for iPhone. Working on a suite of elegant, powerful applications, you will have the opportunity to have a major impact on the design and implementation

best practices for object instance initialization

2008-03-21 Thread Stuart Malin
I have a class (a subclass of NSObject) that requires several parameters to be properly initialized. I have a -(id) initWithParams... method defined. I can't have -init invoke -initWithParams (as a designated initializer) because the object instance wouldn't be set up properly. I am wonderi

NIB files on 10.1

2008-03-21 Thread Marcus
Hi. Is it possible to target Mac OS X 10.1 with Interface Builder 3.1? I have set the deployment target in Xcode to Mac OS X 10.1 but as far as I can see it's not possible to set anything older than Mac OS X 10.2 in Interface Builder. I've tried to run the application on a Mac with 10.1.5

Re: Intercepting retain/release of object

2008-03-21 Thread Sherm Pendley
On Fri, Mar 21, 2008 at 2:13 PM, Scott Ribe <[EMAIL PROTECTED]> wrote: > If you really want to understand what's going on, forget the counts, set > breakpoints on your overloaded retain & release methods, then look at the > stack trace every time. It may take a while, because there may be a lot >

Fwd: iPhone/iPod Touch

2008-03-21 Thread Conrad Taylor
Hey Clark, you might to take a look at the following video: Leveraging iPhone Location, Acceleration, Orientation, and System Information Lastly, I would recommend that you ut

Re: iPhone/iPod Touch

2008-03-21 Thread I. Savant
On Fri, Mar 21, 2008 at 4:16 PM, Conrad Taylor <[EMAIL PROTECTED]> wrote: > Hey Clark, you might to take a look at the following video: > Leveraging iPhone Location, Acceleration, Orientation, and System This is the point where we slam up hard against the non-disclosure agreement to which we al

Re: iPhone/iPod Touch

2008-03-21 Thread Clark Cox
On Fri, Mar 21, 2008 at 1:16 PM, Conrad Taylor <[EMAIL PROTECTED]> wrote: > Hey Clark, you might to take a look at the following video: First, what you posted has nothing to do with tht OP's question. They were asking about how to get the name of an iPod/iPhone *from a Mac to which they are connec

Re: Intercepting retain/release of object

2008-03-21 Thread Stuart Malin
Thanks for all the comments. I had started this thread not because I wanted to peak under the hood, or employ non-canonical techniques, but because I had an instance become free before its time. I had though that intercepting -release (and also -retain, why not), would allow me to find the

Re: iPhone/iPod Touch

2008-03-21 Thread I. Savant
> Second, all of this is still under NDA, and you shouldn't be posting > it to a public mailing list. ... and if I recall correctly, to answer the OPs question on cocoa-dev (as opposed to, say, Omni's list, hint-hint) would also be breaking the rules since there's no public API to get the name

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread Michael Ash
On Fri, Mar 21, 2008 at 12:13 PM, John Stiles <[EMAIL PROTECTED]> wrote: > Michael Ash wrote: > For what it's worth, I wrote a quick test program creating 50,000 > random key/value pairs of NSStrings of around 500 characters each, > then inserted them into an NSDictionary. My quick code compiled

Re: iPhone/iPod Touch

2008-03-21 Thread Dave Hersey
On Mar 21, 2008, at 4:21 PM, I. Savant wrote: ... except of course for that hour a few weeks ago before Apple changed their mind. But now we can't again and they *really mean it* this time. ;-) Man... Scott's been silent since that day the iPhone maniac was wildly flipping the NDA switch o

Re: iPhone/iPod Touch

2008-03-21 Thread I. Savant
> Man... Scott's been silent since that day the iPhone maniac was wildly > flipping the NDA switch on and off. > > I hope he's not in a straightjacket somewhere now, although I'd > totally understand that. Hopefully he's just got a bad case of the flu > or something. Personally, I think Sco

Re: Correct use of NSViewController

2008-03-21 Thread Jonathan Dann
Hi Cathy and Paul, Thanks to you both for your help, I'm really starting to get somewhere with this now. I now have a view controller hierarchy that reflects the views in my app. I've defined my own view controller subclass that I use and an abstract superclass for the view controllers I

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread John Stiles
Michael Ash wrote: On Fri, Mar 21, 2008 at 12:13 PM, John Stiles <[EMAIL PROTECTED]> wrote: Michael Ash wrote: For what it's worth, I wrote a quick test program creating 50,000 random key/value pairs of NSStrings of around 500 characters each, then inserted them into an NSDictionary. My qui

Round view on "move by background" window

2008-03-21 Thread glenn andreas
I've got a window that can be moved by clicking on the background (it's irregularly shape, so it doesn't have a title bar). In that window is a view which is basically circular (not opaque, only draws and responds to a circular area in the middle of the view). The problem is that this res

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread Michael Ash
On Fri, Mar 21, 2008 at 4:51 PM, John Stiles <[EMAIL PROTECTED]> wrote: > It's fine that you are uncomfortable with STL, but there's nothing about > your results that makes me think "this doesn't build a convincing case for > the STL option." If its performance is on par, then it's a highly convin

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread John Stiles
I'm using Thunderbird, dunno. I only took issue with your statement of "this doesn't build a convincing case for the STL option." I didn't agree with that, since the STL code should be quite similar in code length and complexity and appeared to generate identical performance while the underlyi

dealloc methods not being called?

2008-03-21 Thread Randall Meadows
I'm trying to do some cleanup work when my app terminates*. I have the appropriate code to do said cleanup in one of my dealloc methods. I'm finding that when I quit the app (cmd-Q), NONE of my dealloc methods are being called (I have breakpoints set of every one of them, and not a single

Re: NIB files on 10.1

2008-03-21 Thread Nick Zitzmann
On Mar 21, 2008, at 2:07 PM, Marcus wrote: Is it possible to target Mac OS X 10.1 with Interface Builder 3.1? Nope. Xcode 3.0 dropped support for writing software for Puma or earlier. Nick Zitzmann ___ Cocoa-dev ma

Re: dealloc methods not being called?

2008-03-21 Thread John Stiles
AppKit does an optimization where at app shutdown time, it stops dealloc'ing things. It does make app quitting faster, but it means that if your deallocs have side effects, the side effects will never occur. It also makes leak tracking difficult if you try to do a full-on leak check at applica

Re: dealloc methods not being called?

2008-03-21 Thread Nick Zitzmann
On Mar 21, 2008, at 3:23 PM, John Stiles wrote: AppKit does an optimization where at app shutdown time, it stops dealloc'ing things. There's one exception to this, though - upon quitting an application, NSApplication pops all autorelease pools in the program, releasing their contents.

Re: Correct use of NSViewController

2008-03-21 Thread Cathy Shive
Yeah, this is something I ran into dealing with the fact that I have several key value observations set up. The way I deal with it is to give my view controller's abstract superclass a -(void) removeObservations method. I set it up to work similarly to how you use the -(void)dealloc method

Re: Intercepting retain/release of object

2008-03-21 Thread Sherm Pendley
On Fri, Mar 21, 2008 at 4:32 PM, Stuart Malin <[EMAIL PROTECTED]> wrote: > Thanks for all the comments. I had started this thread not because I > wanted to peak under the hood, or employ non-canonical techniques, > but because I had an instance become free before its time. I had > though that inte

Re: NIB files on 10.1

2008-03-21 Thread Marcus
21 mar 2008 kl. 22.21 skrev Nick Zitzmann: On Mar 21, 2008, at 2:07 PM, Marcus wrote: Is it possible to target Mac OS X 10.1 with Interface Builder 3.1? Nope. Xcode 3.0 dropped support for writing software for Puma or earlier. Thank you. Then I'll just install Xcode 2.5 along side Xcod

Re: dealloc methods not being called?

2008-03-21 Thread Randall Meadows
OK, it would appear that I replied to myself on this...nice. (Tell me again why on a discussion list like that that reply-to-list is not the default?) On Mar 21, 2008, at 3:27 PM, Randall Meadows wrote: On Mar 21, 2008, at 3:11 PM, Randall Meadows wrote: but...why aren't any of the deallo

Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9

2008-03-21 Thread Jerry Krinock
I have created a demo app and private framework, in separate projects. Running in 10.3.9, when the framework sends a message to a Cocoa object, the app crashes. Works fine in 10.4 and 10.5. The framework adds a category with a single method onto NSString, as shown. Code, Project Settings

Cocoa Database Connection

2008-03-21 Thread Justin Giboney
I am trying to find a way to connect Cocoa to a DBMS. I have been working for a few weeks trying to find a way to get Cocoa to communicate with PostgreSQL (at this point I am willing to use just about any mainstream database). I have tried using BaseTen (http://www.karppinen.fi/baseten/ ) an

Re: Intercepting retain/release of object

2008-03-21 Thread Erik Buck
When dealing with an over release problem, just turn on NSZombieEnabled, and you will quickly find the problem. If you restrict retains and releases to accessors, you won't have very many places you need to look. ___ Cocoa-dev mailing list (Cocoa-dev

Re: iPhone/iPod Touch

2008-03-21 Thread Scott Anguish
NDA wasn't an issue with the original question, so I just kept my trap shut about it. nobody suggested the private API way either, so no harm no foul... On Mar 21, 2008, at 4:34 PM, I. Savant wrote: Second, all of this is still under NDA, and you shouldn't be posting it to a public mailing

Re: populate a custom sub-class with data from bindings - SOLVED

2008-03-21 Thread Adam Gerson
The answer in my case was to first impliment some NSOutlineView extenssions so that I could actually access the objects stored in the tree. These can be found at: http://homepage.mac.com/matthol2/cocoa/page2/page2.html Then I implemented the NSOutlineView delegate method - (void)outlineView:(NSO

Re: dealloc methods not being called?

2008-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2008 at 5:54 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > > I'm thinking I have overused "retain" on a multitude of properties I > > have created. What's a good rule of thumb for using "retain" versus > > "assign"? Things I explicitly allocate get "retain", whereas > > obj

Re: Cocoa Database Connection

2008-03-21 Thread Justin Giboney
So, libpq sounds like a well supported way to go, but when I import "libpq-fe.h" into my project I get an error that says "postgres_ext.h: No such file or directory", along with 30 more errors which I assume are related to the lack of this file. I searched my computer for it and I can't fin

xmldata: ContentTypeDeclaration *and* NodePrettyPrint?

2008-03-21 Thread Ian Kennedy
Hi all, I'm hoping this is an easy question: is it possible to use both NSXMLDocumentIncludeContentTypeDeclaration and NSXMLNodePrettyPrint as options when converting an NSXMLDocument to NSData? I seem to only to be able to do one or the other. relevant code: NSXMLDocument *manifestXML = [[NSXMLD

Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9

2008-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2008 at 6:16 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > The framework adds a category with a single method onto NSString, as > shown. Code, Project Settings, links to Build Transcripts and > projects, Console and Crash Log snippets are all given below. My guess is that sinc

How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
Hi, I am quite new in Cocoa programming and didn't understand yet how to set initial value for some NSTextField from program? Imagine I have a collection (Array of data, say, mates names). Want to see the first name from array in window once program starts up. So, I have a controller. Con

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2008 at 8:09 PM, Samvel Khalatian <[EMAIL PROTECTED]> wrote: > Field (NSTextField), call it 'mate name', is connected to Controller > via IBOutlet. Unfortunately setting any value in given text field from > Controller init method does not produce any meaningful effect because >

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Amr Nashaat
hi, values in NSTextField are not set by the convetional way, the are set by using the SetStringValue command. so for example if you have a certain string in variable called temp and you want to display it in a text field the command will be as follows: [textField setStringValue:temp];

Re: disabling NSButton?

2008-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2008 at 2:46 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: > I needed to call [uiButton displayIfNeeded] instead of setNeedsDisplay Where are you doing this? Essentially what you have done is short-circuited the coalesced update of dirty rectangles for drawing, which leads me to bel

Re: dealloc methods not being called?

2008-03-21 Thread mmalc crawford
On Mar 21, 2008, at 2:54 PM, Randall Meadows wrote: I'm thinking I have overused "retain" on a multitude of properties I have created. What's a good rule of thumb for using "retain" versus "assign"? Things I explicitly allocate get "retain", whereas objects I get from other objects get "a

Re: Cocoa Database Connection

2008-03-21 Thread Jason Stephenson
Justin Giboney wrote: So, libpq sounds like a well supported way to go, but when I import "libpq-fe.h" into my project I get an error that says "postgres_ext.h: No such file or directory", along with 30 more errors which I assume are related to the lack of this file. I searched my computer for

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Kevin Vanwulpen
___ 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 Subscription: http://lists.apple.com

Re: Cocoa Database Connection

2008-03-21 Thread Jeff LaMarche
On Mar 21, 2008, at 7:50 PM, Justin Giboney wrote: So, libpq sounds like a well supported way to go, but when I import "libpq-fe.h" into my project I get an error that says "postgres_ext.h: No such file or directory", along with 30 more errors which I assume are related to the lack of this

Synchronising across multiple NSUndoManager stacks

2008-03-21 Thread Graham Cox
This may not be entirely a Cocoa question as much as it is general in nature... but any insight would be appreciated. I have a multi-document Cocoa app where each document has its own NSUndoManager, as per normal. Undo works great in general. However I have a particular class of object, we'

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
Ok. Application is extremely simple: Window with two buttons: Next and Prev - and one NSTextField (call it nameField) where my mates names are supposed to be put. This is View. There is an array in program where buddies are kept. This is a Model. It is basically kept in Controller class bec

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
I use: [nameField setStringValue: ...]; in Collector init. Even though window shows up with empty field. I assume it is emptied upon show up or window construction. How can is be set up to some non-empty string in such a way that window appear with some value? Thanks. On Mar 21, 2008, a

Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9

2008-03-21 Thread Jerry Krinock
On 2008 Mar, 21, at 17:04, Kyle Sluder wrote: My guess is that since dyld doesn't support @loader_path on 10.3.9, your framework isn't loading, H...but the first NSLog() in the framework executes and logs. Does that not prove that the framework must be loaded? and therefore your cat

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Jonathan Hess
Hey Samvel - Your IBOutlets won't be connected until after init. You should probably move your code to awakeFromNib. Gotta run - Jon Hess On Mar 21, 2008, at 5:09 PM, Samvel Khalatian wrote: Hi, I am quite new in Cocoa programming and didn't understand yet how to set initial value for so

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Dave Hersey
If the window with that field is in the controller's nib, which I think is what you're saying, then nameField will be nil until awakeFromNib is called. You need to do setup there or later, such as applicationDidFinishLoading. Your code looks fine. - d On Mar 21, 2008, at 8:51 PM, Samvel K

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
Oh, thanks a lot. That resolved my question. Now it works just perfect. Samvel. On Mar 21, 2008, at 8:01 PM, Dave Hersey wrote: If the window with that field is in the controller's nib, which I think is what you're saying, then nameField will be nil until awakeFromNib is called. You need to

View with sliding rearranging thumbnails

2008-03-21 Thread Dave Hersey
Hi, I'm working on a view that has a bunch of image thumbnails, say something like iPhoto, and I want to be able to grab one and move it around, rearranging (with animation) all the other thumbnails as it's moved around. This is NOT an iPhone question, but if you put your iPhone in "psych

Re: best practices for object instance initialization

2008-03-21 Thread Andy Lee
On Mar 21, 2008, at 4:07 PM, Stuart Malin wrote: 1) Do I just let -init dangle (so to speak)? and then if I ever forget that the object needs special initialization and instead call -init, the code will end up failing down the line somewhere where those initialization parameters matter...

Re: Sync Services between Address Book and a web server

2008-03-21 Thread Dave Hersey
Alex replied to me off list, so for the archives, here's what he said. It's a great summary of how things work. You first register your application with the Sync Service. At registration you register

Re: View with sliding rearranging thumbnails

2008-03-21 Thread Jamie Phelps
You might have a look at the documentation for IKImageBrowserView (IKImageBrowserView Class Reference). It's Leopard only, but it might just do the trick. HTH, Jamie On Mar 21, 2008, at 8:15 PM, Dave Hersey wrote: Hi, I'm working on a view that has a bunch of image thumbnails, say somet

Re: View with sliding rearranging thumbnails

2008-03-21 Thread Dave Hersey
I need 10.4 support too. : ( - d On Mar 21, 2008, at 9:34 PM, Jamie Phelps wrote: You might have a look at the documentation for IKImageBrowserView (IKImageBrowserView Class Reference). It's Leopard only, but it might just do the trick. HTH, Jamie On Mar 21, 2008, at 8:15 PM, Dave Herse

doubleValue (for an NSString)

2008-03-21 Thread Boyd Collier
First, thanks to everyone who suggested ways to handle this. Next, an admission of guilt for faulty memory; mine, not my Mac's: in poking around, I discovered that I'd asked pretty much the same question (for ints) nearly 2 years ago and had gotten similar answers. My apologies. I've deci

Re: View with sliding rearranging thumbnails

2008-03-21 Thread Cathy Shive
If you need to support 10.4, you've gotta do it yourself the way you described. You don't have to use an OpenGLView, but the animation will suffer if you use Quartz for drawing. It won't have that really snappy, responsive feel that I'm guessing you want. OpenGl's going to give you real

Re: Correct use of NSViewController

2008-03-21 Thread Steve Weller
I'm going down this same path I think. I have a split view with a browser and a document. The way I solve it is to have the window controller have outlets to the scroll views of the two panes of the split view. Then in the window controller I do this: - (void)windowDidLoad { [super wi

Re: Correct use of NSViewController

2008-03-21 Thread Steve Weller
On Mar 21, 2008, at 2:31 PM, Cathy Shive wrote: 1, window is about to close (wish there was a more reliable place to do this, but it has to be before dealloc): windowController: - (void)windowWillClose { [mViewController removeObservations]; // this causes the method to be called all the

Re: Correct use of NSViewController

2008-03-21 Thread Cathy Shive
It's so interesting to me to see different people's way of dealing with this. Seems like everyone's design is very similar - they just differ in the implementation details. I hope Apple will fill in the blanks in the framework eventually. We have all come to the same solution in a certain

Re: Synchronising across multiple NSUndoManager stacks

2008-03-21 Thread Jerry Krinock
On 2008 Mar, 21, at 17:50, Graham Cox wrote: So the question is, is this a requirement that others have come across and if so, how did you solve it? Not exactly that requirement, but something like it: I've had to deal with objects that can be moved among open documents. My solution was