Re: Getting mouse moved events on overlay windows

2008-07-01 Thread Owen Yamauchi
You need to override -acceptsMouseMovedEvents to return YES in the window that needs them. Owen ___ Cocoa-dev mailing list (Cocoa-

Re: Getting mouse moved events on overlay windows

2008-07-01 Thread Shripada Hebbar
Markus, If your app is Leopard only, you better checkout: NSTrackingArea at: http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjec ts/chapter_7_section_4.html#//apple_ref/doc/uid/1060i-CH8- DontLinkElementID_30 NSTrackingArea has methods to t

Re:Getting mouse moved events on overlay windows

2008-07-01 Thread Shripada Hebbar
If your app is Leopard only, you better take a look into NSTrackingArea at: http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjec ts/chapter_7_section_4.html#//apple_ref/doc/uid/1060i-CH8-DontLinkElementID_30 -Shripada > Hi Markus, > > I ran into exact

Re: Getting mouse moved events on overlay windows

2008-07-01 Thread Markus Spoettl
On Jul 1, 2008, at 3:54 PM, Brett Powley wrote: If you get any further, I'd be keen to hear what you find out. As a matter of fact, I seem to have found something that is much simpler than overlaying: Add a subview to the WebView that doesn't clear its content before drawing. When I firs

Re: class keeps track of object

2008-07-01 Thread Shripada Hebbar
Daniel You are trying to create a singleton object in cocoa and there is a good documentation on this at: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_10.html -Shripada > > Thanks! Exactly what I was looking for. > > Daniel > > >

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

2008-07-01 Thread Jason Coco
What env pollution? I agree that exec* isn't really the way to go, but that's what the OP was using... I just suggested that /usr/bin/open is a better option than hard-coding the path to some arbitrary application. It's also a lot easier to use than the LaunchServices API... although if I w

Re: Getting mouse moved events on overlay windows

2008-07-01 Thread Markus Spoettl
On Jul 1, 2008, at 3:54 PM, Brett Powley wrote: I ran into exactly the same problem; my view was in a transparent, borderless, and nonactivating panel. It didn't get mouse moved events, and tracking rectangles didn't work either. (My problem was that I wanted to change the cursor when it w

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 occurs

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 agai

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 _

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 s

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

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 progr

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

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

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

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 t

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

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: Best way to handle background i/o and notify main UI thread

2008-07-01 Thread Jean-Daniel Dupas
Le 2 juil. 08 à 01:24, Chris Irvine a écrit : 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

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 with

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 m

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

Re: Getting mouse moved events on overlay windows

2008-07-01 Thread Brett Powley
Hi Markus, I ran into exactly the same problem; my view was in a transparent, borderless, and nonactivating panel. It didn't get mouse moved events, and tracking rectangles didn't work either. (My problem was that I wanted to change the cursor when it was inside my view, but it never wo

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

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

class keeps track of object

2008-07-01 Thread Daniel Richman
Hi All, I have created a class (call it Foo) that there will be one and only one instance of (call it Bar). I need some way to have Foo keep a pointer to Bar, so when another object asks for the pointer to Bar, Foo will be able to return the pointer. Presumably this can be done, as NSNotific

Re: KVO Bug With Keypaths

2008-07-01 Thread Keary Suska
7/1/08 3:57 PM, also sprach [EMAIL PROTECTED]: > 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 obje

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 necessary

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 (Cocoa-dev@lists.apple.com)

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 t

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 C

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

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 h

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 lis

[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: http://lists.ap

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 situa

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

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

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 > "relations.relat

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*, th

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

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

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

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 >

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

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

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 multip

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 pur

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 because

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 probl

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 fro

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 fro

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 y

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 (Cocoa-dev@list

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

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 puzz

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 c

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 d

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 fou

Re: Struct, Object, or Dictionary?

2008-07-01 Thread James Bucanek
Bridger Maxwell 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

[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 www.indiehig.com/>, has volunteered t

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 fro

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 w

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

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 r

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 s

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 val

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 the

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 thi

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

Re: Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread mmalc crawford
On Jul 1, 2008, at 10:09 AM, Kyle Sluder 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. The Core Foundation Ownership Policy is actually sp

Re: Flowcharts in Cocoa

2008-07-01 Thread Angus Hardie
On 1 Jul 2008, at 04:23, Matt Orr wrote: Hi guys! I am very new to Cocoa, but not new to UNIX development. GUI programming is new to me, and I am tackling it heavily ;) I have a little assignment at work to create a simple application which charts a bunch of processes, much like OmniGraf

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 h

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", strerro

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 n

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- http://bil

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 Message-ID: <[EMAIL PROTECTED]> C

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

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 th

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 t

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

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 h

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

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

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 mouse

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 ke

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 i

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 forRequest:(NSStri

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

2008-07-01 Thread Marcelo Alves
Why not use [NSWorkspace launchApplication:] method? 2008/7/1 Barrie Green <[EMAIL PROTECTED]>: > Hi all, > > I want to

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 fir

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

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

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 text

  1   2   >