Re: is this badly written code?

2008-04-14 Thread Adam Leonard
Another approach if you are targeting 10.5 is to use the new dot syntax since the methods you call should be accessors. (Note that this all assumes that the accessors that use the dot syntax are declared and defined as returning specific types; i.e., mainWindowController returns an NSWindow

Re: NSDateFormatter giving different results in different programs

2008-04-14 Thread Derrick Bass
Well, setting the NSDateFormatter to 10.0 style fixed it. Why it is that one program is using 10.4 style and the other 10.0 style by default is still something of a mystery to me, but it's fixed! Thanks! Derrick On Apr 14, 2008, at 10:09 AM, Nick Zitzmann wrote: On Apr 13, 2008, at 11:21

NSAllocateCollectable() questions

2008-04-14 Thread Brendan Younger
Hi all, This is a re-post since I didn't receive any response on Sunday. I've been writing a library that uses NSAllocateCollectable() quite a bit and I have a few questions about proper usage. - Copying data if I am copying to a malloc'd block, I can use memmove() regardless of whether th

Re: Subclassing NSArrayController

2008-04-14 Thread Scott Anguish
On Apr 14, 2008, at 11:53 PM, antikraft clover wrote: A very newbie-ish question: If I am subclassing NSArrayController to provide and update an array of objects, which methods do I need to implement ? you may want to provide more information, or re-check the docs. it shouldn't be necessary

[Moderator] Re: "hooking" into another app

2008-04-14 Thread Scott Anguish
None of this is relevant to this discussion or Cocoa. Nor was your earlier response. On Apr 14, 2008, at 11:04 PM, Matt Burnett wrote: You reply couldnt be more fanboi-ish. If that wasnt enuf you have a documented history of being a apple fanboi Either you're confusing this with another

Re: is this badly written code?

2008-04-14 Thread Ferhat Ayaz
On Apr 15, 2008, at 4:53 AM, Adam Gerson wrote: In cocoa its very tempting to write a single line of code like: NSManagedObject *selectedTreeObject = [self delegate] mainWindowController] treeController] selectedObjects] objectAtIndex:0]; If you have to embed a lot of messages, you shoul

Re: Subclassing NSArrayController

2008-04-14 Thread Michael Vannorsdel
Whichever ones you want to modify their behavior. If you don't implement a method it will use the superclass's implementation. On Apr 14, 2008, at 9:53 PM, antikraft clover wrote: A very newbie-ish question: If I am subclassing NSArrayController to provide and update an array of objects, w

Subclassing NSArrayController

2008-04-14 Thread antikraft clover
A very newbie-ish question: If I am subclassing NSArrayController to provide and update an array of objects, which methods do I need to implement ? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: is this badly written code?

2008-04-14 Thread Michael Ash
On Mon, Apr 14, 2008 at 10:53 PM, Adam Gerson <[EMAIL PROTECTED]> wrote: > In cocoa its very tempting to write a single line of code like: > NSManagedObject *selectedTreeObject = [self delegate] > mainWindowController] treeController] selectedObjects] > objectAtIndex:0]; > > or to flush it

Re: is this badly written code?

2008-04-14 Thread John Stiles
Actually, that code isn't smaller, it just replaces "] " with "." in a couple of places :) As to whether it does anything special to avoid problems with nil objects, I have no idea... Matt Burnett wrote: Have you thought of using KVC? It makes that code alot smaller, and (im 99% sure) it deal

Re: is this badly written code?

2008-04-14 Thread Matt Burnett
Have you thought of using KVC? It makes that code alot smaller, and (im 99% sure) it deals with things like if treeController returned nil instead of a NSArray. NSManagedObject *selectedTreeObject = [self valueForKeyPath :@"delegate .mainWindowController.treeController.selectedObjects.las

Re: is this badly written code?

2008-04-14 Thread Michael Vannorsdel
I don't think there's anything wrong combining messages into a chain when you only need one variable from it. With the well-worded method names common with Cocoa it's not too hard to see what the chain is doing. Sometimes having a bunch of placeholder variables on each line can look more

Re: is this badly written code?

2008-04-14 Thread John Stiles
The chained approach is tempting since it's short and convenient, so if the code is not prone to failure, I'd say go for it. If you expect that you might need to see intermediate values in the debugger or there are weird edge cases where something might return nil, I'd break it out into multip

Re: "hooking" into another app

2008-04-14 Thread Matt Burnett
You reply couldnt be more fanboi-ish. If that wasnt enuf you have a documented history of being a apple fanboi (http://projects.info-pull.com/moab/hallofshame/line-noise_offended-pimpdouche.txt ) Not once was it suggested that the OS isn't open to this sort of attack. You yourself said

is this badly written code?

2008-04-14 Thread Adam Gerson
In cocoa its very tempting to write a single line of code like: NSManagedObject *selectedTreeObject = [self delegate] mainWindowController] treeController] selectedObjects] objectAtIndex:0]; or to flush it out in to individual lines: NSWindowController *mainWindow = [[self delegate] mainWindo

Re: Basic Core Animation question

2008-04-14 Thread Michael Vannorsdel
In your initWithFrame: method you need to retain the layer object or the autorelease pool may deallocate it. Also, where do you set the layer to a view to be displayed? On Apr 14, 2008, at 6:26 PM, Greg Sabo wrote: I think I'm doing those things, see below: //Setting object as delegate f

Re: warning: Image scaling is not supported on Mac OS X versions prior to 10.5.

2008-04-14 Thread Markus Spoettl
On Apr 14, 2008, at 9:09 AM, Nathan Vander Wilt wrote: This means your NIB/XIB has a deployment target not equal to "10.5.x", but you have some sort of button or other view whose "Scaling" setting is not "None". If you go into Interface Builder, and go to your file's Info window, it will sho

Cannot Remove Observer Error

2008-04-14 Thread Thaddeus Cooper
Starting earlier today, I started getting the following error in my software. 2008-04-14 17:59:41.535 WineCellar[4928:10b] Cannot remove an observer for the key path "wineType.name" from , most likely because the value for the key "wineType" has changed without an appropriate KVO notific

Re: "hooking" into another app

2008-04-14 Thread I. Savant
On Apr 14, 2008, at 8:27 PM, Matt Burnett wrote: The OS is all ready wide open to this sort of attack. Criticizing the OP for asking for this feature illustrates the false sense of security Mac users have simply because there isnt a spyware problem... yet. Apple allows you to hook IOHIKeyboa

Re: "hooking" into another app

2008-04-14 Thread Matt Burnett
The OS is all ready wide open to this sort of attack. Criticizing the OP for asking for this feature illustrates the false sense of security Mac users have simply because there isnt a spyware problem... yet. Apple allows you to hook IOHIKeyboard's _keyboardEventTarget. On Apr 14, 2008, at 2

Re: Basic Core Animation question

2008-04-14 Thread Greg Sabo
I think I'm doing those things, see below: //Setting object as delegate for CALayer - (id) initWithFrame:(NSRect) frame { if (self = [super initWithFrame: frame]) { animateLayer = [CALayer layer]; [animateLayer setDelegate:self]; } return self; } //drawing the view and

Re: Basic Core Animation question

2008-04-14 Thread Greg Sabo
Thanks for the tip, I've made that function simpler (displaying a red circle): - (void)drawLayer:(CALayer *)theLayer inContext:(CGContextRef)theContext { CGRect theRect = CGRectMake(0.5, 0.5, 1, 1); CGContextSetRGBFillColor(theContext, 1, 0, 1, 1); CGContextFillEllipseInRect(t

Forced Refreshing of WebKit

2008-04-14 Thread John Joyce
On Apr 14, 2008, at 2:02 PM, [EMAIL PROTECTED] wrote: Forced Refreshing of WebKit To force refresh a WebKit view, do the same thing web developers do: JavaScript...? or - reload: example from webview docs: - (IBAction)reload:(id)sender ___ Cocoa

Re: "hooking" into another app

2008-04-14 Thread Don Arnel
Thank you, Bill This is exactly what I was looking for! On Apr 14, 2008, at 5:39 PM, Bill Cheeseman wrote: Use the Accessibility API. It's designed to do exactly this. It's a C API, not Cocoa or Objective-C, but you can use it in a Cocoa application. __

Re: NSMatrix Content Binding

2008-04-14 Thread Seth Willits
On Apr 14, 2008, at 8:07 AM, Keary Suska wrote: Is there a way to do what I want to do? If changing your array to an array of dictionaries is not acceptable, you could use a custom NSValueTransformer. An array of dictionaries wouldn't work though. Since it'd use the entire dictionary as

Memory leak when re-alloc Methods

2008-04-14 Thread marioegt
Hi and sorry for my bad english. I have a nasty leak problem when i realloc several methods of the main class of my app. I have a button that initiate a series of methods of my Main Model Class for initialize and display sprites. In a NSView, when i alloc the class for the first time every

Re: Window moved when dock appears.

2008-04-14 Thread Mohsan Khan
Thanks, this does the trick! - (void)setFrame: (NSRect)frameRect display: (BOOL)flag { #pragma unused( frameRect, flag ) [super setFrame: myRect display: YES]; } On må 14 apr 2008, at 05.00, Seth Willits wrote: On Apr 13, 2008, at 10:56 AM, Mohsan K

NSMenuItem view bug with status bar menu

2008-04-14 Thread Kimo
I believe I have found a bug with a menu item view when used in the status bar menu. Here's how to recreate the bug. Assume the app MyApp is active and has a status bar menu, and one of the menu items has a view: 1. Bring another app to the front (such as Safari), and access the MyApp status

Re: "hooking" into another app

2008-04-14 Thread Bill Cheeseman
on 2008-04-14 8:30 AM, Don Arnel at [EMAIL PROTECTED] wrote: > I am attempting to write a Cocoa app that I would > like to have "hook" into a text chat window from another app so that I > can log the incoming messages. The other app does not belong to my app. > > If anyone could point me to some

Re: "hooking" into another app

2008-04-14 Thread Kyle Sluder
On Mon, Apr 14, 2008 at 5:12 PM, Don Arnel <[EMAIL PROTECTED]> wrote: > I've only been working with a Mac running Leopard now for about 5 weeks and > am not familiar with AppleScript or the Script Editor. I ran the Script > Editor and dragged the iChat.app (since you said that app had lots of > ha

Re: "hooking" into another app

2008-04-14 Thread Don Arnel
Hi, Chris I've only been working with a Mac running Leopard now for about 5 weeks and am not familiar with AppleScript or the Script Editor. I ran the Script Editor and dragged the iChat.app (since you said that app had lots of handlers) file into it, but what am I looking for? I saw no s

Custom NSWindow and NSWindowDidResignKeyNotification AND NSWindowDidResignMainNotification

2008-04-14 Thread vance
I am dynamically (at runtime) creating an NSWindow instance with the following code: pullDownWindow = [[NSWindow alloc] initWithContentRect:[view bounds] styleMask: NSBorderlessWindowMask|NSTexturedBackgroundWindowMask backing:NSBackingS

Re: how should I go about downloading files

2008-04-14 Thread John Stiles
Laimonas Simutis wrote: On Fri, Apr 11, 2008 at 6:01 PM, Scott Anguish <[EMAIL PROTECTED]> wrote: On Apr 10, 2008, at 9:04 PM, Laimonas Simutis wrote: Hey, This is my first cocoa projects so I am kind of finding my way around the framework. The question I have is maybe more related t

Re: how should I go about downloading files

2008-04-14 Thread Laimonas Simutis
On Fri, Apr 11, 2008 at 6:01 PM, Scott Anguish <[EMAIL PROTECTED]> wrote: > > On Apr 10, 2008, at 9:04 PM, Laimonas Simutis wrote: > > > Hey, > > > > This is my first cocoa projects so I am kind of finding my way around > > the framework. The question I have is maybe more related to the design > >

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread David Duncan
On Apr 14, 2008, at 12:46 PM, Carter R. Harrison wrote: I'm getting the reference to the context by using: CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; in my view's initWithFrame: method. Which isn't guaranteed to be anything in particular (and could in fact

Re: NSString value mangled in NSDictionary with Garbage Collection

2008-04-14 Thread Mike R. Manzano
Can we see the rest of the code that is currently represented as comments in your example? On Apr 10, 2008, at 3:44 AM, Jason Kravitz wrote: I created a while loop where I am reading through a text file and pulling out certain words based on RegEx criteria. I want to add these words as a c

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Carter R. Harrison
Hi David, I'm getting the reference to the context by using: CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; in my view's initWithFrame: method. Based upon what you said, how would you recommend I draw to a CGLayer prior to the first invocation of drawRect: (at

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread David Duncan
On Apr 14, 2008, at 11:56 AM, Carter R. Harrison wrote: cgback is a CGLayerRef instance variable that I setup when the view is inited. I use the following line: cgback = CGLayerCreateWithContext(context, CGSizeMake([self bounds].size.width, [self bounds].size.height), NULL); It's my unde

Re: "hooking" into another app

2008-04-14 Thread Scott Ribe
> Sorry if that came across as having attitude, but I was a little > miffed at being accused of having intentions to steal passwords or > account information by writing a key logger. Nobody was accusing *you* of wanting to do that, just pointing out that you were asking for an OS feature which wou

Re: Basic Core Animation question

2008-04-14 Thread David Duncan
On Apr 13, 2008, at 12:01 AM, Greg Sabo wrote: Ah! It compiled. Thank you very much! And thanks to Michael for putting together the sample project. Now to get the CALayer to draw a path. Most of the documentation I've seen suggest to do this with a delegate function, is that correct? Here

Re: NSCompositeSourceOver equivalent in Quartz 2D?

2008-04-14 Thread David Duncan
On Apr 13, 2008, at 1:43 PM, Carter R. Harrison wrote: I'm trying to do some drawing in Quartz 2D. I'm trying to set the blending mode of my CGContextRef to the equivalent of NSCompositeSourceOver from NSGraphicsContext. It doesn't look like there is such a blending mode for a CGContext.

Re: Running a "Choose Template" Sheet

2008-04-14 Thread Kip Nicol
Thanks Sean! This is very helpful. Calling [self performSelector:@selector(showCustomSheet:) withObject: [aController window] afterDelay:0.0f] within windowControllerDidLoadNib: seems like a bit of a hack but I'll try it out. Thanks again. Kip On Apr 13, 2008, at 9:33 PM, Sean Murphy wro

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Carter R. Harrison
cgback is a CGLayerRef instance variable that I setup when the view is inited. I use the following line: cgback = CGLayerCreateWithContext(context, CGSizeMake([self bounds].size.width, [self bounds].size.height), NULL); It's my understanding that I do not need to retain cgback with CFRet

Forced Refreshing of WebKit

2008-04-14 Thread KJ Walker
I have a product that uses a WebView to display HTML to the user. At times, due to activities spawned along with updating the HTML data to the WebView, response times can be a few seconds. It would be a better user experience to see the updated view displayed before other activities are f

Re: "hooking" into another app

2008-04-14 Thread I. Savant
> They are in the process of doing just that, I think you'll find. It's just > that, rather than removing them instantly, they've been deprecated and > replaced with an alternative and more secure mechanism (Input Servers, if I > remember rightly). In some future version of Mac OS X, I think you

Re: Subclassing NSScroller

2008-04-14 Thread Jonathan Dann
On 14 Apr 2008, at 02:12, Chris Hanson wrote: On Apr 13, 2008, at 3:13 PM, [EMAIL PROTECTED] wrote: I believe this is a typo in the documentation. The method you want to override is actually spelled -drawArrow:highlightParts: In

Re: "hooking" into another app

2008-04-14 Thread I. Savant
On Mon, Apr 14, 2008 at 12:56 PM, Don Arnel <[EMAIL PROTECTED]> wrote: > Sorry if that came across as having attitude, but I was a little miffed at > being accused of having intentions to steal passwords or account information > by writing a key logger. I see no 'accusation' in this thread. Chil

Re: "hooking" into another app

2008-04-14 Thread Alastair Houghton
On 14 Apr 2008, at 18:01, Chilton Webb wrote: On the topic of Input Managers, it would be fine with me if Apple did away with this blatant security hole altogether. I can think of zero real reasons to have it around still, which couldn't be addressed via more secure means, or by the individua

Re: NSDateFormatter giving different results in different programs

2008-04-14 Thread Nick Zitzmann
On Apr 13, 2008, at 11:21 PM, Derrick Bass wrote: In one program that links to this framework, the date is getting parsed correctly. But in another, the very same string is coming back as "1969-12-31 16:00:00 -0800"! Using - [getObjectValue:forString:range:error:] gives the same results

Re: "hooking" into another app

2008-04-14 Thread Don Arnel
Sorry if that came across as having attitude, but I was a little miffed at being accused of having intentions to steal passwords or account information by writing a key logger. Anyway, thanks for giving me a starting point to research. - Don On Apr 14, 2008, at 10:40 AM, I. Savant wrote: O

Re: "hooking" into another app

2008-04-14 Thread Christopher Nebel
On Apr 14, 2008, at 8:24 AM, Oliver Quas wrote: Am 14.04.2008 um 16:58 schrieb Florian Soenens: on 4/14/08 8:26 AM, [EMAIL PROTECTED] purportedly said: Re-read my message. If it was unclear, what I want to do is be able to log (record) text being written to a chat window from another

Re: "hooking" into another app

2008-04-14 Thread Chilton Webb
Hi Don, On Monday, April 14, 2008, at 09:27AM, "Don Arnel" <[EMAIL PROTECTED]> wrote: >No...no...NO! > >Re-read my message. If it was unclear, what I want to do is be able to >log (record) text being written to a chat window from another app. NOT >log key strokes. For example, how could I prog

Re: NSTableView memory usage

2008-04-14 Thread John Stiles
I think Instruments could do a better job of telling you what's going wrong than we could. FWIW, the table view doesn't even know the contents of most of your 1500 rows. It asks for them from the data source as it needs them, and probably only knows the values of the currently visible cells.

Re: warning: Image scaling is not supported on Mac OS X versions prior to 10.5.

2008-04-14 Thread Nathan Vander Wilt
On Apr 14, 2008, at 6:12 AM, yang younker wrote: /* com.apple.ibtool.document.notices */ /* com.apple.ibtool.document.warnings */ /Users/younker/Developer/Example1/English.lproj/MainMenu.xib:460: warning: Image scaling is not supported on Mac OS X versions prior to 10.5. /Users/younker/Develop

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Nathan Vander Wilt
On Apr 13, 2008, at 7:15 AM, Carter R. Harrison wrote: CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; CGContextDrawLayerInRect(context, CGRectMake([self frame].origin.x, [self frame].origin.y, [self frame].size.width, [self frame].size.height), cgback); cgback is

Re: Using Properties at Outlets

2008-04-14 Thread Randall Meadows
On Apr 13, 2008, at 10:46 PM, Steve Sheets wrote: Has anyone had any problems with creating Properties with Objective- C 2.0 that are also Outlets? I been using this inside my code, and I want to be sure there is no problems with this. I create fairly standard (readonly) and (readwrite, cop

Re: "hooking" into another app

2008-04-14 Thread Oliver Quas
Under the premise that your Chat-Client supports AppleScript, why not use the ScriptingBridge? Just my 2 cents. Oliver Am 14.04.2008 um 16:58 schrieb Florian Soenens: Maybe if the log is written to a file, you can read in that file. But that won't be "real-time" logging of course. Regards,

Re: NSTableView memory usage

2008-04-14 Thread j o a r
On Apr 14, 2008, at 3:15 AM, Valentin Dan wrote: At 1500 rows, “ps –A -u” reports it uses 39.0% memory (there is 1GB of memory on this Mac). After the panel containing the NSTableView is closed, the app uses 1.8% (just as before opening it). The panel in question doesn’t have anything else

Re: NSMatrix Content Binding

2008-04-14 Thread Keary Suska
on 4/13/08 8:57 PM, [EMAIL PROTECTED] purportedly said: > I have a matrix of radio buttons that I'm trying to bind-ify. The two > options in the matrix should shown with the titles: > > Mac OS Extended > Mac OS Extended Journaled > > The *values* of these two items should be: > > HFS+ > Journal

Re: Menu items vs modal sessions

2008-04-14 Thread Kyle Sluder
On Mon, Apr 14, 2008 at 10:28 AM, Pierre Bernard <[EMAIL PROTECTED]> wrote: > This is probably due to the fact that I am using bindings to bind menu > items to controller actions. I guess one gets the free behavior only when > using target/action connections on the first responder. Just for kicks

Re: NSMatrix Content Binding

2008-04-14 Thread Keary Suska
on 4/13/08 8:57 PM, [EMAIL PROTECTED] purportedly said: > I have a matrix of radio buttons that I'm trying to bind-ify. The two > options in the matrix should shown with the titles: > > Mac OS Extended > Mac OS Extended Journaled > > The *values* of these two items should be: > > HFS+ > Journal

Re: Why should we set ivars to nil in dealloc?

2008-04-14 Thread j o a r
On Apr 14, 2008, at 5:29 AM, Tony Becker wrote: In -awakeFromNib:, I use a instantiate and use a iVar. In dealloc, I release it. However, under the covers, I DON'T call [super -awakeFrommNib:], because my parent didn't awake from his .nib. But, in dealloc, I call [super dealloc], so my par

Re: loading the universal bundle

2008-04-14 Thread Gregory Weston
I need to run the Automator action "Ask for Photos" from System/Library/Automator/Ask for Photos.action on Mac OSX.4 Tiger.I did not find much supporting document using Objective-c. I added following codes for running the action. NSDictionary *dict=[NSDictionary infoDictionary]; aAct=[[AMBun

Re: "hooking" into another app

2008-04-14 Thread Florian Soenens
Maybe if the log is written to a file, you can read in that file. But that won't be "real-time" logging of course. Regards, Flor. On 14 Apr 2008, at 16:49, Keary Suska wrote: on 4/14/08 8:26 AM, [EMAIL PROTECTED] purportedly said: Re-read my message. If it was unclear, what I want to do is be

Re: "hooking" into another app

2008-04-14 Thread Keary Suska
on 4/14/08 8:26 AM, [EMAIL PROTECTED] purportedly said: > Re-read my message. If it was unclear, what I want to do is be able to > log (record) text being written to a chat window from another app. NOT > log key strokes. For example, how could I progmatically record an AIM > chat conversation fro

Re: "hooking" into another app

2008-04-14 Thread I. Savant
On Mon, Apr 14, 2008 at 10:26 AM, Don Arnel <[EMAIL PROTECTED]> wrote: > No...no...NO! Alright. Now how about we take a few deep breaths, switch to decaf, and try our social interaction again. This time without the attitude, please. > Re-read my message. If it was unclear, what I want to do is

Re: HUD-style panel controls?

2008-04-14 Thread douglas a. welton
Jacob, You may want to look at applying one or more of the numerous filters available to you when you make your controls layer backed. I did this with most of the controls in my HUD for an image editing application and it works just fine. "Color Monochrome" is your friend! Using filters

Re: Menu items vs modal sessions

2008-04-14 Thread Pierre Bernard
Thanks for the insights Keary. I did indeed expect to get some of the behavior for free, but didn't. This is probably due to the fact that I am using bindings to bind menu items to controller actions. I guess one gets the free behavior only when using target/action connections on the first r

Re: "hooking" into another app

2008-04-14 Thread Don Arnel
No...no...NO! Re-read my message. If it was unclear, what I want to do is be able to log (record) text being written to a chat window from another app. NOT log key strokes. For example, how could I progmatically record an AIM chat conversation from my app? On Apr 14, 2008, at 10:00 AM, T

[job posting] Senior OSX C++ Developer for Contract

2008-04-14 Thread Paul Wilkinson
Soma Engineering is looking to hire a seasoned OSX engineer on contract basis. The project involves porting a middleware audio product from Windows to OSX. The product is an audio system for video games. Required qualifications are (1) At least 5 years C++ professional development experience; (2)

Re: "hooking" into another app

2008-04-14 Thread I. Savant
> > I want to write an app that I'd like to have "hook" into a text box in > > Safari and log your IDs, passwords, and bank account status. > > Well, password fields are "special" and are 'resistant' to key > logging, but you don't have to 'hook into' any apps to log the rest. > You don't ev

Re: "hooking" into another app

2008-04-14 Thread I. Savant
On Mon, Apr 14, 2008 at 10:00 AM, Thomas Davie <[EMAIL PROTECTED]> wrote: > Someone may correct me if I'm wrong, but that sounds a lot like something > that has been very very deliberately left out of any API... See the many discussions regarding input managers. > I want to write an app that I

Re: A question about Tabviews and tabview items

2008-04-14 Thread Development
Thank you very much for the suggestion. This looks to me to be the best approach to use so I will forgo the very complex subclassing of NSTabView I had begun in favor of this. On Apr 14, 2008, at 1:49 AM, Francisco Tolmasky wrote: Take a look at drawLabel:inRect and sizeOfLabel: in NSTabVi

Re: A question about Tabviews and tabview items

2008-04-14 Thread Development
You and one other both made this suggestion to me and examining it, it is certainly the easiest and most logical way to go. Which is probably why it did not occur to me. Thank you very much for your suggestion, I think this is the approach I will use. On Apr 13, 2008, at 9:26 PM, Sean Murph

loading the universal bundle

2008-04-14 Thread anoop.varughese
Hi All, I need to run the Automator action "Ask for Photos" from System/Library/Automator/Ask for Photos.action on Mac OSX.4 Tiger.I did not find much supporting document using Objective-c. I added following codes for running the action. NSDictionary *dict=[NSDictionary infoDictionary]; aAct=[

Re: "hooking" into another app

2008-04-14 Thread Thomas Davie
Someone may correct me if I'm wrong, but that sounds a lot like something that has been very very deliberately left out of any API... I want to write an app that I'd like to have "hook" into a text box in Safari and log your IDs, passwords, and bank account status. Thanks Bob On 14 Apr 20

mouseMoved: behaving correctly when application isn't frontmost

2008-04-14 Thread Mattias Arrelid
Hi all, Our application it setup to forward all mouse moved events to our content view, regardless if our application is the frontmost one. Now, we have some areas of the content view that are to be highlighted when the mouse hovers over them. This works ok (with work, I mean it looks acceptable)

warning: Image scaling is not supported on Mac OS X versions prior to 10.5.

2008-04-14 Thread yang younker
Hi, All, I had made a simple login dialog by interface builder, but when I built this xib file in xcode, I got the following errors CompileXIB /Users/younker/Developer/Example1/English.lproj/MainMenu.xib cd /Users/younker/Developer/Example1 /Developer/usr/bin/ibtool --errors --warnings -

Re: To write to a file

2008-04-14 Thread Jean-Daniel Dupas
Le 14 avr. 08 à 14:13, Nick Rogers a écrit : Hi, I have to write some data to file in sequence. what methods can I use? NSFileManager has method for creating a file but not for writing to file. Thanks, Nick NSFileHandle or NSOutputStream. You can also use -[NSData writeToFile:...] and

"hooking" into another app

2008-04-14 Thread Don Arnel
Hi all, I've only been developing using Xcode for about 5 weeks now (long-time Windows programmer). I am attempting to write a Cocoa app that I would like to have "hook" into a text chat window from another app so that I can log the incoming messages. The other app does not belong to my app

Re: Why should we set ivars to nil in dealloc?

2008-04-14 Thread Tony Becker
OK. My $0.02 To answer the original question... We live in an Object world, where we like to re-use things. So, for example, I have an object hierarchy of view controllers. In -awakeFromNib:, I use a instantiate and use a iVar. In dealloc, I release it. However, under

Re: To write to a file

2008-04-14 Thread Knud Hinnerk Möller
Hi, check e.g. NSData's writeToFile: methods. Other classes, such as NSString, have similar methods. Cheers, Knud Am 14.04.2008 um 13:13 schrieb Nick Rogers: Hi, I have to write some data to file in sequence. what methods can I use? NSFileManager has method for creating a file but not for

Re: Running a "Choose Template" Sheet

2008-04-14 Thread Alex Curylo
On 14-Apr-08, at 2:01 AM, [EMAIL PROTECTED] wrote: I've researched it a bit and found an app that subclasses NSDocumentController and overrides openUntitledDocumentAndDisplay:error: method and runs the sheet there. Is this the correct place to be running the sheet? Thanks! Well, I've got somet

To write to a file

2008-04-14 Thread Nick Rogers
Hi, I have to write some data to file in sequence. what methods can I use? NSFileManager has method for creating a file but not for writing to file. Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: ld: total output size exceeds 2GB (2033MB)

2008-04-14 Thread Alastair Houghton
On 14 Apr 2008, at 20:35, younker yang wrote: This is my first post on this mailing list, I checked out cogx from SVN, and change the project settings to be xcode 3.1 compatible, but when I build the WMA.framework, I got the following error, It seems there is some error on link configuration

ld: total output size exceeds 2GB (2033MB)

2008-04-14 Thread younker yang
Hi, All, This is my first post on this mailing list, I checked out cogx from SVN, and change the project settings to be xcode 3.1 compatible, but when I build the WMA.framework, I got the following error, It seems there is some error on link configuration. Can anyone help me to solve this issue?

NSTableView memory usage

2008-04-14 Thread Valentin Dan
Hi, I have a NSTableView object with 3 columns and an average of 30 characters per cell. At 1500 rows, “ps –A -u” reports it uses 39.0% memory (there is 1GB of memory on this Mac). After the panel containing the NSTableView is closed, the app uses 1.8% (just as before opening it). The p

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

2008-04-14 Thread Julian James
Hi, Sounds good to me if it means I save money! How does it work when I go on holiday, as I will in May for 2 weeks or when I'm between contracts and have no income? Julian On Monday, April 14, 2008, at 10:01AM, <[EMAIL PROTECTED]> wrote: >Send Cocoa-dev mailing list submissions to > c

Re: Accessing Directory.app shared contacts

2008-04-14 Thread Alexander Hartner
You could always use ABxLDAP (http://www.addressbookserver.com) to transfer contacts from you standard OS X Address Book to an LDAP directory. It uses the iSync API and runs in the back-ground. Have fun Alex > On Sat, Apr 12, 2008 at 11:02 AM, Tito Ciuro <[EMAIL PROTECTED]> wrote: >> The data is

Re: Window moved when dock appears.

2008-04-14 Thread Uli Kusterer
Am 13.04.2008 um 19:56 schrieb Mohsan Khan: I have a window (NSBorderlessWindowMask), this window gets pushed away when my Dock appears from being hidden. How can I bypass this behaviour for my window? I think you should override: - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(N

Re: Window moved when dock appears.

2008-04-14 Thread Kyle Sluder
On Sun, Apr 13, 2008 at 1:56 PM, Mohsan Khan <[EMAIL PROTECTED]> wrote: > How can I bypass this behaviour for my window? First, unless your window does not need to be clickable or visible at all, don't do this. Pro Tools doesn't move when the dock pref is changed, and it annoys the hell out of m

RE: A question about Tabviews and tabview items

2008-04-14 Thread Francisco Tolmasky
Take a look at drawLabel:inRect and sizeOfLabel: in NSTabViewItem If however, you want do something more complex, consider putting the tabview in borderless mode, making your own UI around it, and just calling selectTabViewItem: appropriately. Francisco ___

Re: Plugin Information

2008-04-14 Thread Uli Kusterer
Am 14.04.2008 um 08:30 schrieb Rick Langschultz: My application uses plugins from a support folder in /Library/ Application Support/AppName/Plugins/. The application searches this folder for all the plugins and loads them. But here is my dilemma: i want to put the plugin class name as the bun

Re: Plugin Information

2008-04-14 Thread Kyle Sluder
On Mon, Apr 14, 2008 at 2:30 AM, Rick Langschultz <[EMAIL PROTECTED]> wrote: > My code uses NSString *bundlePath, and NSBundle *bundle. I want to have > something like *bundlePathA, *bundlePathB, etc; and *bundleA, *bundleB, > *bundleC. Is there a simple way that I can do this? What exactly are y

Re: Accessing Directory.app shared contacts

2008-04-14 Thread Kyle Sluder
On Sat, Apr 12, 2008 at 11:02 AM, Tito Ciuro <[EMAIL PROTECTED]> wrote: > The data is stored in the OpenDirectory respository. Shared Contacts are > stored under 'People'. You'll probably need to use the Directory Services > API to manipulate the data. That's what I feared. Unfortunately the sche