Re: Output of NSHTTPCookieStorage to NSTableView

2008-07-01 Thread Chris Purcell
Again thank you for the reply. Thanks to the column identifier, I am able to see data in the table view! However, when I attempt to click on a row or scroll down I receive an error in the console. -[NSURL objectAtIndex:]: unrecognized selector sent to instance 0x10edd0 I've tried with

Re: Process app.

2008-07-01 Thread Jean-Daniel Dupas
Le 1 juil. 08 à 10:28, Толя Макаров a écrit : dreamcat7 The process loginwindow is not shown In the list that is given by the function sysctl. May be this process has another name. Do you know anything about it? Makarov Anatolii Just curious about it. Why do you need to listen

Re: Process app.

2008-07-01 Thread Толя Макаров
Jean-Daniel Dupas. I want to know if loginwindow.app is started up at the moment, after this my program enters a password. Sometimes I enter password myself and my program should know that loginwindow.app has finished its work. Makarov Anatolii.

Re: Process app.

2008-07-01 Thread Jean-Daniel Dupas
Le 1 juil. 08 à 11:24, Толя Макаров a écrit : Jean-Daniel Dupas. I want to know if loginwindow.app is started up at the moment, after this my program enters a password. Sometimes I enter password myself and my program should know that loginwindow.app has finished its work. Makarov

Re: NSDateComponents question

2008-07-01 Thread Jason Wiggins
Thanks mmalc, much appreciated. I'll give it a go when I get time to code. Regards, JJ On 01/07/2008, at 6:08 PM, mmalc crawford wrote: On Jun 30, 2008, at 10:27 AM, Jason Wiggins wrote: Thanks mmalc for your reply. What you say makes sense. So comps is the whole date (now) minus 3

newb- Overwriting a file or folder

2008-07-01 Thread Chris Paveglio
Newb alert. I'm trying to copy some files and folders from one location to another. I would like to overwrite them at the destination. Is this possible yet? [theManager copyPath:theSettings toPath:theDestinationFile handler:nil]; I've read the documentation: The file specified in source must

Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Jonathan Hohle
I recently wrote some code to retrieve data from an NTLM authenticated web server. As far as I can tell NTLM isn't supported at the Cocoa level, so I used CFNetwork to make the request. The example docs were clear and helpful, but I couldn't find anything on deallocating a

Trying to display a static image on my window. Any tips would be great

2008-07-01 Thread Papa-Raboon
Hi All, I have been trying to get a static image to display in a corner of my window and it has to literally just sit there and do nothing however I have searched and searched Apple's dodumentation but no success yet. I have dropped an Image View onto the window in IB and set the following in my

Re: newb- Overwriting a file or folder

2008-07-01 Thread Mike Abdullah
On 1 Jul 2008, at 13:57, Chris Paveglio wrote: Newb alert. I'm trying to copy some files and folders from one location to another. I would like to overwrite them at the destination. Is this possible yet? [theManager copyPath:theSettings toPath:theDestinationFile handler:nil]; I've

Re: Process app.

2008-07-01 Thread Толя Макаров
There is the same problem with SecurityAgent.app. Are there any other suggestions knowing that loginwindow.app doesn't work? FROM : Makarov Anatolii DATE : Tue Jul 01 13:25:46 2008 I have worked out the issue. Upon user's authorization the application SecurityAgent.app

Re: Trying to display a static image on my window. Any tips would be great

2008-07-01 Thread Chris Paveglio
(I'm new also so someone please correct me if this is wrong...) If your image does nothing at all (or never changes), could you just set in directly in IB? I've made some Applescript apps with images in an image view, I just drag the image (in IB's Image panel) directly into my window, or into

Re: Process app.

2008-07-01 Thread Jean-Daniel Dupas
I don't understand what on and does not works mean ? And also what do you mean by loginwindow.app has finished its work. loginwindow is a process managed by launchd and should be considere as an implementation details. The only public loginwindow API I know is a couple of Apple Event to

[Q] Status Bar icon and Tiger

2008-07-01 Thread JongAm Park
Hello, all. Can anyone help me to figure out an issue regarding to a status menu width issue on Tiger? The project I work on is for the Tiger and the Leopard. I used this code to set an icon, which is longer horizontally than vertically, and it worked on the Leopard. NSStatusBar *statusBar

CATextLayer and preferredFrameSize

2008-07-01 Thread shoaib
Does CATextLayer override preferredFrameSize to always return a size that accomodates the text in it? I'm adding a CATextLayer, say myTextLayer, to a parent layer which uses a custom layout manager. In the custom layout manager's layoutSublayersOfLayer: method, I'm setting the frame of the

Displaying NSArray in NSTableView

2008-07-01 Thread Brandon Schlenker
I'm using MGTwitterEngine and I am having problems displaying the downloaded tweets (an NSArray) in a table view or text view. MGTwitterEngine downloads the tweets using this. - (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)identifier I need to display statuses in an

exec(uting) Safari - How (newbie)

2008-07-01 Thread Barrie Green
Hi all, I want to write a quick little cocoa app that fires off Safari. I started with something like int main(int argc, char* argv[]) { ... ... if(execv(/Applications/Safari.app, someArgs) == -1) { NSLog(@execv failed with %s, strerror(errno)); } } It always fails with 'Permission

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Kristopher Matthews
Try executing /Applications/Safari.app/Contents/MacOS/Safari. /Applications/Safari.app identifies a bundle, not the actual application (and execv() is not aware of bundles). --Kris On Jul 1, 2008, at 10:15 AM, Barrie Green wrote: Hi all, I want to write a quick little cocoa app that

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Marcelo Alves
Why not use [NSWorkspace launchApplication:] method? http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWorkspace/launchApplication: 2008/7/1 Barrie Green [EMAIL PROTECTED]: Hi all, I want to write

Re: Displaying NSArray in NSTableView

2008-07-01 Thread mmalc crawford
On Jul 1, 2008, at 8:12 AM, Brandon Schlenker wrote: I'm using MGTwitterEngine and I am having problems displaying the downloaded tweets (an NSArray) in a table view or text view. MGTwitterEngine downloads the tweets using this. - (void)statusesReceived:(NSArray *)statuses

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Jason Coco
You could also use /usr/bin/open -- then you wouldn't have to know where safari lives. execl(/usr/bin/open, /usr/bin/open, -a, Safari, 0); On Jul 1, 2008, at 11:19 , Kristopher Matthews wrote: Try executing /Applications/Safari.app/Contents/MacOS/Safari. /Applications/Safari.app identifies

Re: OpenStreetMap GPS/Map Viewer

2008-07-01 Thread I. Savant
i'll just start with a basic osx app ;-) ... but i am a bit stuck with the scrolling and zooming thing. now if my user scrolls (taps) or zooms, howto dynamically reload map parts in a iPh*** like fashion? In a basic OS X app, you respond to the desired events, such as a mouse click, a

mouse down selectively not select the cell

2008-07-01 Thread Mitchell Livingston
Hello, I have an outline view that consists of custom-drawn cells, where I have images representing buttons. I want a left click on the buttons to not change the selected cells but still perform mouse tracking (I use hitTestForEvent:inRect:ofView: to determine if it should track); a

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Kyle Sluder
On Tue, Jul 1, 2008 at 11:30 AM, Jason Coco [EMAIL PROTECTED] wrote: You could also use /usr/bin/open -- then you wouldn't have to know where safari lives. Abaddesignsayswhat? What do you think open uses anyway? ;-) ___ Cocoa-dev mailing list

Re: Trying to display a static image on my window. Any tips would be great

2008-07-01 Thread Steve Christensen
On Jul 1, 2008, at 6:41 AM, Papa-Raboon wrote: I have been trying to get a static image to display in a corner of my window and it has to literally just sit there and do nothing however I have searched and searched Apple's dodumentation but no success yet. I have dropped an Image View onto the

How to make the FileOwner of a nib file accessible globally in whole project

2008-07-01 Thread JArod Wen
Hi Jedis, Here is my problem: my application now have a main nib file MovieDocument.nib with its FileOwner MovieDocument.mm(We used AVCVideoServices which requires to be in a c++ source file). I need to send messages to the methods in MovieDocument.mm from other classes in the project(I

Re: NSDateComponents question

2008-07-01 Thread Christopher Kane
On Jul 1, 2008, at 1:08 AM, mmalc crawford wrote: On Jun 30, 2008, at 10:27 AM, Jason Wiggins wrote: Thanks mmalc for your reply. What you say makes sense. So comps is the whole date (now) minus 3 days. I wasn't expecting that. I should've made it clear what I was trying to achieve. I want to

Re: Creating AppControllers in InterfaceBuilder 3.1

2008-07-01 Thread Ron Lue-Sang
On Jun 30, 2008, at 10:25 AM, Owen Yamauchi wrote: On Mon, Jun 30, 2008 at 7:27 AM, j o a r [EMAIL PROTECTED] wrote: The thinking here is indeed that Xcode handles the creation of classes, while IB handles instances of classes and their configuration. IB can actually create classes. In

Re: PDFDocument subclass with an undo manager

2008-07-01 Thread Kevin Ross
That did the trick, thank you for the insight. It seems so obvious after the fact! Thank you again very much! - Kevin On Jun 30, 2008, at 6:23 PM, Graham Cox wrote: It won't redo because when it performs the undo, it is calling - initWithData: directly, and I take it from this snippet

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-07-01 Thread Ron Lue-Sang
On Jul 1, 2008, at 12:05 AM, Andy Kim wrote: Thanks - I've seen solutions like this before, I just wanted to get it working the regular way! I totally understand the sentiment. Is itemForPersistentObject expecting an NSTreeNode? You say you have it working in a similar way - what does

Re: NSDateComponents question

2008-07-01 Thread mmalc crawford
Hi Chris, On Jul 1, 2008, at 9:10 AM, Christopher Kane wrote: The more subtle and serious issue is that Sunday in the current week might be in the previous Month (so, Day Weekday), or even previous Year, so setting the Day to a negative value and keeping the Month and Year the same will

Re: mutableArrayForKeyValue Question (ignore other email)

2008-07-01 Thread Ron Lue-Sang
On Jun 29, 2008, at 10:44 AM, Stuart Malin wrote: On Jun 29, 2008, at 7:05 AM, Scot t Anguish wrote: From: Scott Anguish [EMAIL PROTECTED] Subject: Re: mutableArrayForKeyValue Question (ignore other email) To: Alex Wait [EMAIL PROTECTED] Cc: cocoa-dev Cocoa-dev@lists.apple.com Message-ID:

Re: OpenStreetMap GPS/Map Viewer

2008-07-01 Thread Bill Dudney
Hi Joeles, The tiled layer does much of the work for you in terms of scrolling and scaling. I have an example on my blog; http://bill.dudney.net/roller/objc/entry/catiledlayer_example that does something like what you want (I expect based on the description). Good luck! -bd-

Re: Trying to display a static image on my window. Any tips would be great

2008-07-01 Thread Steve Christensen
If you add an IBAction method to your window controller's class, it can respond to a click on the image by calling [[NSWorkspace sharedWorkspace] openURL:@http://www.apple.com;]; On Jul 1, 2008, at 9:09 AM, Papa-Raboon wrote: Thanks loads for that Steve. It seems to be doing as I wanted

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Andrew Merenbach
On Jul 1, 2008, at 8:15 AM, Barrie Green wrote: Hi all, I want to write a quick little cocoa app that fires off Safari. I started with something like int main(int argc, char* argv[]) { ... ... if(execv(/Applications/Safari.app, someArgs) == -1) { NSLog(@execv failed with %s,

Re: Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Kyle Sluder
On Tue, Jul 1, 2008 at 9:09 AM, Jonathan Hohle [EMAIL PROTECTED] wrote: I recently wrote some code to retrieve data from an NTLM authenticated web server. As far as I can tell NTLM isn't supported at the Cocoa level, so I used CFNetwork to make the request. The example docs were clear and

Date and Time Conversion with TimeZone

2008-07-01 Thread wayne . daley
Hello, I have a date event returned as a date time string from a feed in the following format, Tue 01 Jul 2008 15:00:00 +0100 I'm assuming this is GMT plus one hour, I'd like to convert this string to the to a more user friendly date time string such as, Today at 9:00am or Tue Jul 01, 2008

RE: Newbie question: Timers

2008-07-01 Thread Matthew Youney
Thanks, I will have to investigate further about how exactly to implement this. Again, thanks for your help, Matt -Original Message- From: Daniel Richman [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 5:46 PM To: Matthew Youney Cc: Cocoa Subject: Re: Newbie question: Timers Use

Re: Scaled Printing

2008-07-01 Thread Scott Ribe
but the view always prints at 100% and thus scaling does not print correctly Yeah, you're dividing by the scaling factor, thus negating the scaling. IOW, user wants to print at 0.75, you divide by 0.75 thus scaling your own page area *up*, then the printing system multiplies by 0.75, and

Re: NSDateComponents question

2008-07-01 Thread Chris Kane
On Jul 1, 2008, at 9:26, mmalc crawford wrote: Hi Chris, On Jul 1, 2008, at 9:10 AM, Christopher Kane wrote: The more subtle and serious issue is that Sunday in the current week might be in the previous Month (so, Day Weekday), or even previous Year, so setting the Day to a negative

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Ilan Volow
Another option (which may or may not work for you) is embedding a WebKit view in your application window and using that to display web stuff. -- Ilan On Jul 1, 2008, at 11:15 AM, Barrie Green wrote: Hi all, I want to write a quick little cocoa app that fires off Safari. I started with

Struct, Object, or Dictionary?

2008-07-01 Thread Bridger Maxwell
Hey, I have been debating using one method over another for a while now, and I would like to know what the Cocoa way of doing things is. I need to group a set of data together to use as one entity. In one program I was representing a puzzle as four strings and a BOOL. My first thought would be to

[Q] Regression of setSize for NSImage?

2008-07-01 Thread JongAm Park
Hello, all. On the Leopard, I set a status bar item an icon with an eps image. Because the eps image is somewhat big, I used the NSImage's size method to retrieve the size and multiplied by 0.3 for its width and height. And setSize method is called for the NSImage. It works well on a Leopard

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Gregory Weston
Barrie Green wrote: Hi all, I want to write a quick little cocoa app that fires off Safari. ... Ideally I would like to run the app without it asking me for my password, how could I achieve that? Considering that I can think of no common purpose for launch Safari that doesn't continue

Re: Cocoa-dev Digest, Vol 5, Issue 1168

2008-07-01 Thread JArod Wen
I need to make some clearance on this problem: the biggest issue is that MovieDocument is instantiated by IB, since it is the FileOwner of the MovieDocument.nib. So the problem should be: is there a way to access a class from a method of another class when the first class is instantiated

[MEETING] Toronto Area Cocoa WebObjects Developer Group - July 8

2008-07-01 Thread Karl Moskowski
The next meeting of tacow/Toronto CocoaHeads will be held on Tuesday, July 8 at 6:30 PM at Ryerson University. First, David Leber will be leading a recap of the publicly available info from WWDC and WOWODC. Then, Brandon Walkin, who started the IndieHIG http:// www.indiehig.com/, has

Re: Struct, Object, or Dictionary?

2008-07-01 Thread James Bucanek
Bridger Maxwell mailto:[EMAIL PROTECTED] wrote (Tuesday, July 1, 2008 10:53 AM -0600): My second option in this case is to declare an object that would contain all of those data members as ivars, and the memory management would be taken care of. Class However, it doesn't seem right to make

Re: Struct, Object, or Dictionary?

2008-07-01 Thread Keary Suska
7/1/08 11:53 AM, also sprach [EMAIL PROTECTED]: I have been debating using one method over another for a while now, and I would like to know what the Cocoa way of doing things is. I need to group a set of data together to use as one entity. In one program I was representing a puzzle as four

Re: [Q] Status Bar icon and Tiger

2008-07-01 Thread Peter Ammon
On Jul 1, 2008, at 7:53 AM, JongAm Park wrote: Hello, all. Can anyone help me to figure out an issue regarding to a status menu width issue on Tiger? The project I work on is for the Tiger and the Leopard. [...] It works nicely with the Leopard, but our support team people say that it

How to make the FileOwner of a nib file accessible globally in whole project (was Re: Cocoa-dev Digest, Vol 5, Issue 1168)

2008-07-01 Thread Andy Lee
On Jul 1, 2008, at 2:07 PM, JArod Wen wrote: I need to make some clearance on this problem: the biggest issue is that MovieDocument is instantiated by IB, since it is the FileOwner of the MovieDocument.nib. So the problem should be: is there a way to access a class from a method of another

Re: Struct, Object, or Dictionary?

2008-07-01 Thread Andy Lee
On Jul 1, 2008, at 1:53 PM, Bridger Maxwell wrote: Hey, I have been debating using one method over another for a while now, and I would like to know what the Cocoa way of doing things is. I need to group a set of data together to use as one entity. In one program I was representing a

Re: NSDateComponents question

2008-07-01 Thread mmalc crawford
On Jul 1, 2008, at 10:44 AM, Chris Kane wrote: My apologies; I did do some testing and found that the resultant date was always correct. Could you elaborate on what circumstances this might not be correct? Did you try starting with a starting date of Jan 1, 2009? The Weekday would be 5,

Bindings - registering change notification for multiple keys

2008-07-01 Thread dreamcat7
Hi, I have my application's data and settings stored in 2 plist file, each containing several/many keys.* I would like to to save the changed items permanently in my data store after the user interacts with the ui. Control elements are bound to a settings NSDictionary in my data model.

Re: Struct, Object, or Dictionary?

2008-07-01 Thread Bridger Maxwell
Object, class, method, function Obviously I am not very good at this computer talk :P Anyway, thanks for all of your answers. It has really cleared some things up for me. I will be using the object approach. ___ Cocoa-dev mailing list

Re: Struct, Object, or Dictionary?

2008-07-01 Thread lbland
hi- If you have to bind your entities to anything then you might try a Core Data representation. If you have multiple entities and need to store in a list then a dictionary or class would be best as NSArray, etc. takes ids and there is no easy store for multiple structs, unless you role

Re: How to make the FileOwner of a nib file accessible globally in whole project

2008-07-01 Thread JArod Wen
I need to make some clearance on this problem: the biggest issue is that MovieDocument is instantiated by IB, since it is the FileOwner of the MovieDocument.nib. So the problem should be: is there a way to access a class from a method of another class when the first class is instantiated

Re: How to make the FileOwner of a nib file accessible globally in whole project (JArod Wen)

2008-07-01 Thread JArod Wen
I need to make some clearance on this problem: the biggest issue is that MovieDocument is instantiated by IB, since it is the FileOwner of the MovieDocument.nib. So the problem should be: is there a way to access a class from a method of another class when the first class is instantiated

Re: How to make the FileOwner of a nib file accessible globally in whole project (was Re: Cocoa-dev Digest, Vol 5, Issue 1168)

2008-07-01 Thread JArod Wen
Thanks for your fast reply. On Jul 1, 2008, at 2:36 PM, Andy Lee wrote: On Jul 1, 2008, at 2:07 PM, JArod Wen wrote: I need to make some clearance on this problem: the biggest issue is that MovieDocument is instantiated by IB, since it is the FileOwner of the MovieDocument.nib. So the

Re: How to make the FileOwner of a nib file accessible globally in whole project (JArod Wen)

2008-07-01 Thread Andy Lee
Please don't repeat a question over and over. Some questions get answered right away, some take longer, others never get answered at all. It is up to the people on the list who are volunteering their time. I replied to your second post, not because you repeated the question, but

Re: How to make the FileOwner of a nib file accessible globally in whole project (was Re: Cocoa-dev Digest, Vol 5, Issue 1168)

2008-07-01 Thread Andy Lee
On Jul 1, 2008, at 3:01 PM, JArod Wen wrote: A way I can find from my head is setting the instant variable in other classes... So all the related classes should have one instant variable like MovieDocument *movieDocument; And also the getter and setter. Is there any other way for this

PDF printing now blurry

2008-07-01 Thread John MacMullin
I have an application that under Tiger assembled print images, scaled them with NSImage, and printed a PDF to a file ([[printInfo dictionary] setObject:filePathString forKey:NSPrintSavePath];). The print images were always clear under Tiger. Under Leopard, 10.5.3, the last page of a

Re: [Q] Status Bar icon and Tiger

2008-07-01 Thread Nathan Kinsinger
On Jul 1, 2008, at 8:53 AM, JongAm Park wrote: Hello, all. Can anyone help me to figure out an issue regarding to a status menu width issue on Tiger? The project I work on is for the Tiger and the Leopard. I used this code to set an icon, which is longer horizontally than vertically,

Re: Why aren't my bindings firing?

2008-07-01 Thread Hamish Allan
On Tue, Jul 1, 2008 at 12:56 AM, Michael Ash [EMAIL PROTECTED] wrote: However, if you're curious about what Apple does, it shouldn't be too hard to find out. You know one thing that happens reliably: your model's key is set. So set up a test app, put a breakpoint on the model's setter, then

Re: Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Jonathan Hohle
The Core Foundation Ownership Policy is actually specified in terms of a naming convention similar to that for Cocoa and defined by two rules, the Create Rule and the Get Rule: http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html . I

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Clark Cox
On Tue, Jul 1, 2008 at 11:04 AM, Gregory Weston [EMAIL PROTECTED] wrote: Barrie Green wrote: Hi all, I want to write a quick little cocoa app that fires off Safari. ... Ideally I would like to run the app without it asking me for my password, how could I achieve that? Considering that

Re: [Q] Status Bar icon and Tiger

2008-07-01 Thread JongAm Park
Hello. Thanks for your comment. The problem is about scaling. So, on a leopard, the big eps image was scaled to its 30% size correctly, but on a Tiger, it doesn't. it seems to be displayed as is. (Peter Ammon, I'm sorry that I posted somewhat half-written inquiry. I hit a return key while I

Re: [Q] Status Bar icon and Tiger

2008-07-01 Thread JongAm Park
Hello. Thanks for your comment. The problem is about scaling. So, on a leopard, the big eps image was scaled to its 30% size correctly, but on a Tiger, it doesn't. it seems to be displayed as is. (Peter Ammon, I'm sorry that I posted somewhat half-written inquiry. I hit a return key while I

KVO Bug With Keypaths

2008-07-01 Thread Keary Suska
I thought I saw somewhere a bug in KVO where notifications aren't properly sent in certain situations when upper parts of the path are updated. E.g., I have a situation where is am observing a keypath relations.related.content.status.value but notifications aren't sent when related is changed (in

Re: Scaled Printing

2008-07-01 Thread John Nairn
On Jul 1, 2008, at 10:29 AM, Scott Ribe wrote: but the view always prints at 100% and thus scaling does not print correctly Yeah, you're dividing by the scaling factor, thus negating the scaling. IOW, user wants to print at 0.75, you divide by 0.75 thus scaling your own page area *up*,

Re: KVO Bug With Keypaths

2008-07-01 Thread Hamish Allan
On Tue, Jul 1, 2008 at 9:50 PM, Keary Suska [EMAIL PROTECTED] wrote: I thought I saw somewhere a bug in KVO where notifications aren't properly sent in certain situations when upper parts of the path are updated. E.g., I have a situation where is am observing a keypath

Re: [Q] Status Bar icon and Tiger

2008-07-01 Thread JongAm Park
Hello, all. I solved this problem for myself. The reason was that the Tiger behaves differently from the Leopard. On a Tiger ( MacPro 2 2.66Ghz DualCore Intel Xeon processor ), it needed a call setScalesWhenResized: . So the whole code looks like : NSSize imageSize; activeCompanyImage =

Re: [Q] Status Bar icon and Tiger

2008-07-01 Thread JongAm Park
Hello, all. I solved this problem for myself. The reason was that the Tiger behaves differently from the Leopard. On a Tiger ( MacPro 2 2.66Ghz DualCore Intel Xeon processor ), it needed a call setScalesWhenResized: . So the whole code looks like : NSSize imageSize; activeCompanyImage =

Re: KVO Bug With Keypaths

2008-07-01 Thread Keary Suska
7/1/08 3:01 PM, also sprach [EMAIL PROTECTED]: On Tue, Jul 1, 2008 at 9:50 PM, Keary Suska [EMAIL PROTECTED] wrote: I thought I saw somewhere a bug in KVO where notifications aren't properly sent in certain situations when upper parts of the path are updated. E.g., I have a situation where

[TEST] Test with an orange.com address

2008-07-01 Thread Stéphane Sudre
Test ___ 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:

Re: Scaled Printing

2008-07-01 Thread Scott Ribe
My apologies, I was thinking of auto-scaling. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Detecting a double click outside the table

2008-07-01 Thread Damien Cooke
Hi all, I have a window that has a custom NSTableView and an image cell. I have used this [tableView setDoubleAction: @selector(doubleAction:)]; to set the double action. The issue is that I have a method in the tableview that the window controller can use to determine if a double click

Re: Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Michael Ash
On Tue, Jul 1, 2008 at 1:09 PM, Kyle Sluder [EMAIL PROTECTED] wrote: There won't be any documentation regarding allocating and deallocating most objects, because, like Cocoa, Core Foundation religiously follows a memory management scheme known as the Create Rule. ... How did you create your

Re: KVO Bug With Keypaths

2008-07-01 Thread Kyle Sluder
On Tue, Jul 1, 2008 at 5:26 PM, Keary Suska [EMAIL PROTECTED] wrote: I think so. relations and content are read-only (no public setters). Notifications aren't sent for them as they are never changed throughout the lifecycle of an object. I.e., they are both dictionaries, and only their

Re: Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Kyle Sluder
On Tue, Jul 1, 2008 at 5:49 PM, Michael Ash [EMAIL PROTECTED] wrote: Since that function contains Create, you already own it. CFRetaining it will just require you to CFRelease it twice, which is pointless. That's why I asked, to make sure that if he had obtained it somehow other than the Create

Best way to handle background i/o and notify main UI thread

2008-07-01 Thread Chris Irvine
I've been doing a lot of reading about this, but I still don't feel like I have a concise answer. I'm building a small suite of applications that all will all share similar interaction with a UDP based network based peer. It will be necessary to have various background threaded activities

Cocoa Programming for Mac OS X (2nd Edition) soultons

2008-07-01 Thread jeffs87
Hi, Does anyone know where I can get the solutions for the 2nd Edition of Aaron Hillegass's book Cocoa Programming for Mac OS X? Big Nerd Ranch only has the 3rd edition solutions. thanks Jeff ___ Cocoa-dev mailing list

Re: Best way to handle background i/o and notify main UI thread

2008-07-01 Thread Douglas Davidson
On Jul 1, 2008, at 3:11 PM, Chris Irvine wrote: I've been doing a lot of reading about this, but I still don't feel like I have a concise answer. I'm building a small suite of applications that all will all share similar interaction with a UDP based network based peer. It will be

Re: class keeps track of object

2008-07-01 Thread Jean-Daniel Dupas
search for singleton pattern (in the archives and in Apple doc too). The simplest way to do it is (not thread safe): @implementation Foo + (Bar *)sharedFoo { static Foo *shardInstance = nil; if (!sharedInstance) sharedInstance = [[Foo alloc] init]; return sharedInstance; } @end Le 2

Re: class keeps track of object

2008-07-01 Thread Jonathan Hess
Han Daniel - You can use a global variable just like you would in C: static Foo *bar = nil; @implementation Foo + (id)bar { if (!bar) { bar = [[Foo alloc] init]; } return bar; } @end Thats the simple single threaded case. Things get much more interesting if you want to

Re: class keeps track of object [solved]

2008-07-01 Thread Daniel Richman
Thanks! Exactly what I was looking for. Daniel Jonathan Hess wrote: Han Daniel - You can use a global variable just like you would in C: static Foo *bar = nil; @implementation Foo + (id)bar { if (!bar) { bar = [[Foo alloc] init]; } return

Re: class keeps track of object

2008-07-01 Thread Sherm Pendley
On Tue, Jul 1, 2008 at 6:49 PM, Jonathan Hess [EMAIL PROTECTED] wrote: Han Daniel - You can use a global variable just like you would in C: Yes, but... static Foo *bar = nil; That's not a global. Static vars are file scoped. :-) In Foo.m: Foo *globalFoo = nil; In Foo.h, somewhere

Re: KVO Bug With Keypaths

2008-07-01 Thread Hamish Allan
On Tue, Jul 1, 2008 at 11:18 PM, Keary Suska [EMAIL PROTECTED] wrote: When I modify their contents, they are modified using setObject:forKey:, which I issues KVO notifications, IIRC. At least I know it does in certain situations, as rely on that behavior in a number of places. I also

Re: Best way to handle background i/o and notify main UI thread

2008-07-01 Thread Chris Irvine
On Jul 1, 2008, at 3:17 PM, Douglas Davidson wrote: On Jul 1, 2008, at 3:11 PM, Chris Irvine wrote: I've been doing a lot of reading about this, but I still don't feel like I have a concise answer. I'm building a small suite of applications that all will all share similar interaction

KVC/KVO compliance of a container adding multiple objects

2008-07-01 Thread Graham Cox
I have a container class which has a mutable array. To allow it to be KVC/KVO compliant, I'm implementing: - (void)setObjects:(NSArray*) objs; // KVC/KVO compliant - (NSArray*)objects;

Re: Regarding Iphone

2008-07-01 Thread William Squires
No, but check out Amazon.com - I believe there's a book (currently on hold awaiting the final release of iPhone OS) that covers iPhone programming; you may still be able to pre-order it. Other than that, iPhone is off limits here because of the NDA until the final (public) release,

Re: KVC/KVO compliance of a container adding multiple objects

2008-07-01 Thread mmalc Crawford
On Jul 1, 2008, at 4:33 PM, Graham Cox wrote: I also have a number of methods that allow things to be added from arrays, or indexed by an index set. Is there a way to make these KVC/ KVO compliant or would they all have to call through to one or more of these methods to ensure that?

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Kevin Elliott
On Jul 1, 2008, at 8:53 AM, Kyle Sluder wrote: On Tue, Jul 1, 2008 at 11:30 AM, Jason Coco [EMAIL PROTECTED] wrote: You could also use /usr/bin/open -- then you wouldn't have to know where safari lives. Abaddesignsayswhat? What do you think open uses anyway? ;-) With out looking at

Re: NSDateComponents question

2008-07-01 Thread Jason Wiggins
It look like what I thought was going to be something simple, has turned out to be less so and fraught with danger programatically. I was just thinking though, would it be easier just to covert the weekday value into seconds (weekday * 60 * 60 * 24) and subtract that from the current date?

Re: NSDateComponents question

2008-07-01 Thread mmalc crawford
On Jul 1, 2008, at 5:20 PM, Jason Wiggins wrote: It look like what I thought was going to be something simple, has turned out to be less so and fraught with danger programatically. I was just thinking though, would it be easier just to covert the weekday value into seconds (weekday * 60 *

Re: KVO Bug With Keypaths

2008-07-01 Thread Keary Suska
7/1/08 5:13 PM, also sprach [EMAIL PROTECTED]: So to clarify: related is a dictionary that always contains a key called content, the object for which is a dictionary that always contains a key called status, the object for which is always KVO-compliant for value? relations (the object being

Re: NSDateComponents question

2008-07-01 Thread Jason Wiggins
Thanks mmalc and Chris. Your help and wisdom is much appreciated. JJ On 02/07/2008, at 10:41 AM, mmalc crawford wrote: On Jul 1, 2008, at 5:20 PM, Jason Wiggins wrote: It look like what I thought was going to be something simple, has turned out to be less so and fraught with danger

Re: NSDateComponents question

2008-07-01 Thread Jason Wiggins
For the sake of completeness, the second line was incorrect (bracket preceding NSCalendar). It has been corrected in the following snippet: On 02/07/2008, at 10:41 AM, mmalc crawford wrote: NSDate *today = [NSDate date]; NSCalendar *gregorian = [[NSCalendar alloc]

NSScrollView responding to changes in alpha

2008-07-01 Thread John Joyce
Interestingly, NSScrollView in an NSPanel HUD window can have its background color set with alpha and transparency is easy to achieve. Inside a normal NSPanel or window, the backing of the contentView rect seems to be all that will mix with the background color alpha. Ideally, I'd like this

CALayer contents and image aspect ratio

2008-07-01 Thread Wayne Shao
Hi, I provide a CGImageRef as the layer content. When the bounds of layer is changed, the image seems to be scaled to fit the bounds. Is there an option to keep the image aspect ratio? what possible key-value can I set for the layer's style property? Thanks, -- Wayne Shao

Re: exec(uting) Safari - How (newbie)

2008-07-01 Thread Kyle Sluder
On Tue, Jul 1, 2008 at 8:17 PM, Kevin Elliott [EMAIL PROTECTED] wrote: Of course, they're both bad choices. As several people have pointed out, NSWorkspace launchApplication or openURL depending on the requirements. If it's not possible to use NSWorkspace (i.e. because you can't link against

setFirstResponder to NSTextField fails 1st time, works next

2008-07-01 Thread Moses Hall
Hi folks, Here's a problem I'm having under Tiger, developing an LSUIElement application (Input Method server -- it's the UI for IPA Palette [www.blugs.com/IPA]). I have an NSTabView, one of whose panes has a search field which is an NSTextField subclass (note that the same problem

  1   2   >