Re: nib loading / displaying question.

2008-12-13 Thread aaron smith
Ah, yeah that was it. And I had the "release when closed" box checked in IB, which was causing it to crash. Unchecked that and we're all good. Thanks Rob, sorry for the newb question. On Sat, Dec 13, 2008 at 11:53 PM, Rob Rix wrote: > It sounds like you're looking for [aboutPanel makeKeyAndOrder

Re: Trying To Understand Bindings

2008-12-13 Thread Ashley Clark
On Dec 13, 2008, at 12:19 AM, Bridger Maxwell wrote: Just when I thought I had bindings down I have a custom view subclass (sineWaveView) that the user interacts with to change a property (connectedContact). I would like to bind this to a value (selectedShortRangeContact) in a dictionar

Re: Trying To Understand Bindings

2008-12-13 Thread Ken Thomases
On Dec 13, 2008, at 12:19 AM, Bridger Maxwell wrote: I have a custom view subclass (sineWaveView) that the user interacts with to change a property (connectedContact). I would like to bind this to a value (selectedShortRangeContact) in a dictionary (database) in another object (databaseClie

Re: Trying To Understand Bindings

2008-12-13 Thread Ken Thomases
On Dec 13, 2008, at 1:40 AM, Bridger Maxwell wrote: Woops, I posted some wrong code which might confuse the issue. This is the real code that binds the view to the dictionary, but only sends notifications from the view to the dictionary (and not the other way around). [databaseClient bind:@"da

Re: Trying To Understand Bindings

2008-12-13 Thread Quincey Morris
On Dec 12, 2008, at 22:19, Bridger Maxwell wrote: I have a custom view subclass (sineWaveView) that the user interacts with to change a property (connectedContact). I would like to bind this to a value (selectedShortRangeContact) in a dictionary (database) in another object (databaseClient)

Re: Programmatically constructing list of variable arguments?

2008-12-13 Thread Gustavo Pizano
Hi, I tried to encode the CAlayer, but when decoding, all the info of the layer its lost. dunno what happened, the other info of the object it's good. G On 13.12.2008, at 6:19, Michael Ash wrote: On Fri, Dec 12, 2008 at 12:02 PM, Jonathan del Strother wrote: On Fri, Dec 12, 2008 at 4:42 PM,

Re: Programmatically constructing list of variable arguments? [Bad Post last one]

2008-12-13 Thread Gustavo Pizano
Forget the last post I made on this thread. G On 13.12.2008, at 11:00, Gustavo Pizano wrote: Hi, I tried to encode the CAlayer, but when decoding, all the info of the layer its lost. dunno what happened, the other info of the object it's good. G On 13.12.2008, at 6:19, Michael Ash wrote:

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-13 Thread Gustavo Pizano
Hi, I tried to encode the CAlayer, but when decoding, all the info of the layer its lost. dunno what happened, the other info of the object it's good. G On 13.12.2008, at 6:16, Michael Ash wrote: On Fri, Dec 12, 2008 at 3:43 PM, Gustavo Pizano wrote: Hello. I want to send the following an

Re: open package installer in bundle resources directory not working

2008-12-13 Thread Mark Allan
Dennis, You need to set the launch path of the executable within your NSTask - currently you're passing /usr/bin/open as an argument to nothing. There are two ways to do this: firstly, using the same logic you've got below, you can have the launch path be a shell and pass /usr/bin/ open a

Re: open package installer in bundle resources directory not working

2008-12-13 Thread Mark Allan
An easier way may be to get NSWorkspace to do the work for you using the "openFile:" message. http://tinyurl.com/NSWorkspace Mark On 13 Dec 2008, at 11:01, Mark Allan wrote: Dennis, You need to set the launch path of the executable within your NSTask - currently you're passing /usr/bin/op

Re: How to create blunt Edges for a NSWindow

2008-12-13 Thread Andrew Farmer
On 11 Dec 08, at 08:09, Arjun SM wrote: Hi, I am a novice in cocoa and i have created a simple app which has only one window. I wanted to display a bottom bar that has blunt edges at the corners of the window. (Ex Finder windows bottom bar) We answered the exact same question a few days a

Main menu crash when migrating to Leopard

2008-12-13 Thread Klaus Backert
Being about to migrate a Cocoa document-based application of mine, which is under development, from Mac OS X 10.4.11 and Xcode 2.5 to Mac OS X 10.5.5 and Xcode 3.1.2 (on a PowerPC G5) the application crashes in the phase of – I think – setting up and displaying the main menu. This didn't ha

Re: How to handle document scaling in an NSRulerView Client?

2008-12-13 Thread Carlos Eduardo Mello
On Dec 13, 2008, at 3:17AM, Dave Fernandes wrote: Not sure if I'm missing your point, but you can always call registerUnitWithName again with the new conversion factor after changing the view scale. With the same unit name? That's weird. Given the method name, and the fact that it's a

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-13 Thread Thomas Clement
On Dec 12, 2008, at 11:28 PM, David Duncan wrote: On Dec 12, 2008, at 12:50 PM, Thomas Clement wrote: The image was 14340 x 14173 (8-bit RGB with no alpha). Also I got these messages in the console: kernel[0]: (default pager): [KERNEL]: no space in available paging segments malloc: *** mma

Rotating a CALayer more than once is not working

2008-12-13 Thread Gustavo Pizano
Hello. I want to rotate a CALayer by 90 degrees each time I click on it. but the first attempt I tried i rotated the layer just once, and then I click on it again and nothing happened. this is the code. -(void)mouseDown:(NSEvent *)event { [event retain]; [mouseDownEvent re

Re: Looking for info on creating Plugins/Modules

2008-12-13 Thread Tom Jones
This is great, thanks! I think you even covered follow up questions, now it's off to read the Apple documentation. Thanks again, tom On Dec 12, 2008, at 1:05 AM, Chris Hanson wrote: On Dec 12, 2008, at 12:16 AM, Kyle Sluder wrote: On Fri, Dec 12, 2008 at 2:58 AM, Tom Jones wrote: I'm h

Re: How to handle document scaling in an NSRulerView Client?

2008-12-13 Thread Dave Fernandes
I can't say whether Apple designed it this way, but it's been working for me to call registerUnitWithName with the conversion factor and then [theRuler setMeasurementUnits:measurementName] immediately after changing the measurement units. This works even if you have multiple views using the

How to use NSString with CommonCrypto HMAC correctly?

2008-12-13 Thread Alex Reynolds
I am trying to use the HMAC SHA-1 components of Apple's CommonCrypto library with NSStrings, and I am running into some difficulty. I have the following method: - (NSString *) hmacSha1:(NSString *)key data:(NSString *)data { unsigned char digest[CC_SHA1_DIGEST_LENGTH] = {0};

__NSGetTransformedIdealAdvances crash

2008-12-13 Thread Mark Alldritt
Hello All, I'm experiencing an extremely intermittent crash, and I'm not able to figure out what I'm doing to cause it. I have not been able to work up a test case for it. It just seems to happen, and when it happens it happens a few times (1-3) in a row and then simply stops happening.

Re: How to use NSString with CommonCrypto HMAC correctly?

2008-12-13 Thread Chris Ridd
On 13 Dec 2008, at 16:01, Alex Reynolds wrote: I am trying to use the HMAC SHA-1 components of Apple's CommonCrypto library with NSStrings, and I am running into some difficulty. I have the following method: - (NSString *) hmacSha1:(NSString *)key data:(NSString *)data { unsi

Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread John Love
I do not understand why this code completes with the specified application not being active .. when it really is? I really need your help. BOOL AppActive = NO; NSWorkspace *workSpace; NSArray *runningAppDictionaries; NSDictionary *aDictionary;

setNeedsDisplay Equivalent for NSMenuItem?

2008-12-13 Thread Chunk 1978
i've noticed in some menu bar apps like Google's GMail Notifier, the time since last email check will display when changed while the menu is open. how can i emulate this behavior in my own NSMenuItem that changes every 30 seconds (it shows a timer)? currently it will change the setTitle of the NSM

Re: Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread Jean-Daniel Dupas
Le 13 déc. 08 à 18:14, John Love a écrit : I do not understand why this code completes with the specified application not being active .. when it really is? I really need your help. BOOL AppActive = NO; NSWorkspace *workSpace; NSArray *runningAppDicti

Re: Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread jmunson
Specifically, in his case, wouldn't it be: aDictionary valueForKey:@"NSApplicationName"] isEqualToString: @"MyApplication" ? Quoting Jean-Daniel Dupas : Le 13 déc. 08 à 18:14, John Love a écrit : I do not understand why this code completes with the specified application not being acti

Re: setNeedsDisplay Equivalent for NSMenuItem?

2008-12-13 Thread Ashley Clark
On Dec 13, 2008, at 11:18 AM, Chunk 1978 wrote: i've noticed in some menu bar apps like Google's GMail Notifier, the time since last email check will display when changed while the menu is open. how can i emulate this behavior in my own NSMenuItem that changes every 30 seconds (it shows a timer)

Re: Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread Jean-Daniel Dupas
Yes, you can use this variant in this case, but the result will be the same. Quote from isEqualToString: documentation «When you know both objects are strings, this method is a faster way to check equality than isEqual:» Le 13 déc. 08 à 18:41, jmun...@his.com a écrit : Specifically, in

Cancel CGEvent

2008-12-13 Thread sheen mac
Hi All, Is it possible to cancel CGEvent for mouse at CGEventTrapCallBack ?. Could suggest some link info?. Thanks In Advance, Sheen ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: Cancel CGEvent

2008-12-13 Thread Jean-Daniel Dupas
Le 13 déc. 08 à 19:19, sheen mac a écrit : Hi All, Is it possible to cancel CGEvent for mouse at CGEventTrapCallBack ?. Could suggest some link info?. Thanks In Advance, Sheen From the CGEventTapCallBack reference: If the event tap is an active filter, your callback function should ret

How to make a CALayer dont get blur when rotating.

2008-12-13 Thread Gustavo Pizano
Hello well finally I manage to rotate the CALayer each time I click on it. what I did was the following: -(void)mouseDown:(NSEvent *)event { [event retain]; [mouseDownEvent release]; mouseDownEvent = event; NSPoint p2 = [event locationInWindow]; NSPoint

Distributed Objects with Garbage Collection (on PPC)

2008-12-13 Thread Bridger Maxwell
Hey, I am working on a networking system that uses distributed objects. This is a large collaboration between students, and I thought garbage collection would be perfect for new Cocoa programmers, so we wouldn't have to deal with memory management quite yet. The network will be a mix of Intel and

Re: Rotating a CALayer more than once is not working

2008-12-13 Thread Steve Bird
On Dec 13, 2008, at 9:50 AM, Gustavo Pizano wrote: Hello. I want to rotate a CALayer by 90 degrees each time I click on it. but the first attempt I tried i rotated the layer just once, and then I click on it again and nothing happened. You are not TRANSFORMING each time. You are setting

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-13 Thread Bill Bumgarner
On Dec 13, 2008, at 11:26 AM, Bridger Maxwell wrote: Everything seems to work on Intel, it is on PPC that we have the problems. When we first make the connection to the server, we can message the remote object just fine. It is when we try to message the distant object at later times that we

Re: Rotating a CALayer more than once is not working [Solved: now contents of the layer not being rotated]

2008-12-13 Thread Gustavo Pizano
Aha... I was making that mistake. Thanks for the advice, but now I have another problem, and its that the layer its rotating good, but the contents of the layer stay untouched, I dunno if I explain myself, I see the layer rotating, but then if I want to drag the layer with the new positi

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-13 Thread John Pannell
Hi Bridger- I had precisely the same issue some months ago, and wrote to this list. I did get a response off-list from an Apple engineer that mentioned that this was a known problem and there was no workaround at present. Not sure if things have changed since then (although perhaps they

NSFilenamesPboardType for copy/paste and not just drag drop

2008-12-13 Thread Cocoa Dummy
Hello, I am attempting to implement a Copy from my application for files on a remote server that are displayed in a listview. This is an ftp type client. I cannot seem to implement these file copies from my app to where you can paste them in finder, though similar attempts work for drag/drop.

how to get exeption dates in iCal

2008-12-13 Thread Ankur Diyora
Hello all, I am retrieving event of iCal using calcalendar store.Now for recurrence rule how to get exeption dates. Thank you. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Key-bindings Dictionary Location

2008-12-13 Thread Dong Feng
Seems a lot Apple documents say that a key-bindings dictionary should be located either 1) /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict, or 2) ~/Library/KeyBindings/StandardKeyBinding.dict. However, the dictionary used by Xcode has different filename for case 2, an

Re: open package installer in bundle resources directory not working

2008-12-13 Thread Kyle Sluder
Mark, there are a few things wrong with your advice. 1) Don't invoke a shell unless you need to. Doing so introduces far too many variables to be useful for the simple purpose of launching another executable. 2) The first argument to a program needs to be the name of the program. For example, wh

[JOB] P/T iPhone Game Developer, NYC

2008-12-13 Thread Beau Gould
This is a part time, on-site opportunity in New York City (contract) which has the possibility of turning into a full time job provided both parties are interested. My client is an award-winning, cross-media game developer and they are looking for a talented iPhone Developer to join the team.

Drawing NSTextFieldCell subclass in table view

2008-12-13 Thread Andre Masse
Hi, I want to display a cell like mail's message count in a table view but with a fixed size and centered on both axes. I've created a NSTextFieldCell subclass and its doing fine except that it draws in the first row only, which could mean I'm drawing at the wrong coordinates. Obviously,

Re: Live updating NSPredicateEditorRowTemplate?

2008-12-13 Thread Guy Umbright
To close this out... I figured it out to as good as I think it gets. The key is to call NSRuleEditor::setCriteria with nil arrays. The nil arrays force it to go to its data source (which for NSPredicateEditor is the row templates) to refill. It does reset the row to the initial value, b

Re: open package installer in bundle resources directory not working

2008-12-13 Thread Iceberg-Dev
On Dec 13, 2008, at 12:46 PM, Kyle Sluder wrote: 3) Why all this trouble of launching executables? There's a reason Launch Services is a public framework; use that. Don't use -[NSWorkspace openFile:], because that's not guaranteed to open the package in Installer.app. Instead, use LSOpenURLs

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-13 Thread Michael Ash
On Sat, Dec 13, 2008 at 5:02 AM, Gustavo Pizano wrote: > Hi, I tried to encode the CAlayer, but when decoding, all the info of the > layer its lost. > dunno what happened, the other info of the object it's good. Could be that CALayer doesn't support NSCoding very well. This would be kind of stran

Re: setNeedsDisplay Equivalent for NSMenuItem?

2008-12-13 Thread Michael Ash
On Sat, Dec 13, 2008 at 12:18 PM, Chunk 1978 wrote: > i've noticed in some menu bar apps like Google's GMail Notifier, the > time since last email check will display when changed while the menu > is open. how can i emulate this behavior in my own NSMenuItem that > changes every 30 seconds (it show

Re: Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread Michael Ash
On Sat, Dec 13, 2008 at 12:14 PM, John Love wrote: >if ([aDictionary valueForKey:@"NSApplicationName"] == @"My > Application") { In addition to what the others have said, you should be checking the bundle ID if at all possible, not the name. A bundle ID is (intended to be) a uniqu

Re: Drawing NSTextFieldCell subclass in table view

2008-12-13 Thread Iceberg-Dev
On Dec 13, 2008, at 11:11 PM, Andre Masse wrote: Hi, I want to display a cell like mail's message count in a table view but with a fixed size and centered on both axes. I've created a NSTextFieldCell subclass and its doing fine except that it draws in the first row only, which could mean

Re: Drawing NSTextFieldCell subclass in table view

2008-12-13 Thread Patrick Mau
On 13.12.2008, at 23:11, Andre Masse wrote: Hi, I want to display a cell like mail's message count in a table view but with a fixed size and centered on both axes. I've created a NSTextFieldCell subclass and its doing fine except that it draws in the first row only, which could mean I'm

constraining autoresizing of a splitview subview

2008-12-13 Thread christophe mckeon gonzalez de leon
hi, i have a splitview containing two vertical subviews. i'd like the user to be able to resize the the views at will via. the divider, but when the splitview is resized due to a window resize for instance, i want only one of the subviews to be autoresized in the horizontal direction, while both a

Re: constraining autoresizing of a splitview subview

2008-12-13 Thread Kevin Gessner
http://www.omnigroup.com/mailman/archive/macosx-dev/2004-March/051353.html HTH, -- Kevin Kevin Gessner http://kevingessner.com ke...@kevingessner.com On Dec 13, 2008, at 7:39 PM, christophe mckeon gonzalez de leon wrote: hi, i have a splitview containing two vertical subviews. i'd like t

Re: constraining autoresizing of a splitview subview

2008-12-13 Thread Patrick Mau
Hi Christophe The code below should be implemented in your NSSplitView's delegate. The 'sender' argument is your splitView. It will pick the first two subviews and adjust the width of the right subview (index 1). The height will be adjusted to your splitview's frame. I hope it's useful, Patrick

Re: Drawing NSTextFieldCell subclass in table view

2008-12-13 Thread Andre Masse
Right on Patrick! Thanks a lot, Andre Masse On Dec 13, 2008, at 19:26, Patrick Mau wrote: Hi Andre It seems you are not using the cellFrame.origin.y when you create your new frame. CGFloat y = cellFrame.origin.y + cellFrame.size.height/2.0 - 10.0; NSRect frame = NSMakeRect

Re: Drawing NSTextFieldCell subclass in table view

2008-12-13 Thread Andre Masse
Although this was not the cause in this particular problem, it will help with another issue I have in an another class. Thanks for the info, Andre Masse On Dec 13, 2008, at 19:03, Iceberg-Dev wrote: NSTextFieldCell is flipped. This has an impact on the y value. It might be the cause of

context menu item sample from apple code samples still valid?

2008-12-13 Thread aaron smith
Does anyone know if this is still a valid sample? (http://developer.apple.com/samplecode/SampleCMPlugIn/index.html) It's from 06, so it would seem old. Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

NSTask with ssh-agent

2008-12-13 Thread James W. Walker
I'm using NSTask to run Mercurial, which internally uses ssh to communicate with a server. It works when there is no pass phrase on the private key, but what if there is one? I've heard that Leopard has a built-in ssh-agent that integrates with the Keychain, but I don't understand how to

Re: constraining autoresizing of a splitview subview

2008-12-13 Thread christophe mckeon gonzalez de leon
wow that was fast! thanks guys ___ 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 Subscr

Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-13 Thread Debajit Adhikary
When you create an iPhone app, in the AppDelegate, why is the UIWindow created locally within -applicationDidFinishLaunching and not declared as an ivar? The functionality does not seem to change either way. I'd like to know how one approach is better than the other. What I presume is that the win

override hide on deactivate?

2008-12-13 Thread Chunk 1978
i'm trying to override the hide on deactivate method but it's not working. i have unchecked "Hides On Deactivate" for my window in IB. -=-=-=-=- - (BOOL)hidesOnDeactivate { NSBeep(); return NO; } -=-=-=-=- i know that if i didn't want the window to hide on deact

Rather than NSWorkspaceDidUnmountNotification?

2008-12-13 Thread Nor
Is there any way to get any notifications rather than " NSWorkspaceDidUnmountNotification" ? I mean I want to get something faster than that, as soon as the connection was cut. The notification comes to my application after Finder shows a dialog and has user to press some button like disconnect on

Re: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-13 Thread Debajit Adhikary
I meant to ask what the tradeoffs are between declaring the UIWindow object as an instance variable in the AppDelegate vs. as a local object in -applicationDidFinishLaunching: The specific example I'd mentioned was from Erica Sadun's book, and looking at Apple's sample code, and the code that XCod

Re: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-13 Thread Luke Hiesterman
Generally speaking you will do well for yourself to follow Apple's example over Erica's. I haven't actually read her book but I've had several examples come to my attention of where she doesn't do things in the best way. Erica is a talented hacker but please get in the habit of following

Programatically creating windows

2008-12-13 Thread Development
I am creating a window more or less from scratch in my main controller. The following is the code and all referred to objects are defined in the xib file save mainWindow which i am obviously creating. mainWindow = [[NSWindow alloc]initWithContentRect:[mainProto frame] styleMask:NSBorderless

first responder stopped working

2008-12-13 Thread John Nairn
My application frequently recreates a window which involves deleting all the subviews and adding new ones (while keeping the window open). It used to work, but now when it reloads, it fails to accept the one view I designate to the be the first view. After the window is recreated I perform

NSTimer EXC_BAD_ACCESS

2008-12-13 Thread Daniel Luis dos Santos
Hello, I have a NSTimer that is created every time I press a button. It then calls the update function successively until some amount of time passes. When I press the button again I get a EXC_BAD_ACCESS on the timer's initialization : NSTimer *timer = [NSTimer scheduledTimerWithTimeInterva

Re: Programatically creating windows

2008-12-13 Thread Michael Babin
On Dec 13, 2008, at 10:40 PM, Development wrote: I am creating a window more or less from scratch in my main controller. The following is the code and all referred to objects are defined in the xib file save mainWindow which i am obviously creating. mainWindow = [[NSWindow alloc]initWithCo

Re: override hide on deactivate?

2008-12-13 Thread Graham Cox
On 14 Dec 2008, at 1:59 pm, Chunk 1978 wrote: i'm attempting to hide some views inside the window (by setting their alpha to 0.0 ) Wouldn't calling -setHidden:YES be a better plan? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

nib loading / displaying question.

2008-12-13 Thread aaron smith
hey all, really quick question. I'm messing around with loading nib's from the main bundle. It's pretty basic. -I've got a custom nib called "About" that shows when you select the "About XXX" from the main menu. -I have an AppController file (extends NSObject), that has an action -(IBAction)showA

Re: nib loading / displaying question.

2008-12-13 Thread Rob Rix
It sounds like you’re looking for [aboutPanel makeKeyAndOrderFront: self];. Rob On 14-Dec-08, at 2:38 AM, aaron smith wrote: hey all, really quick question. I'm messing around with loading nib's from the main bundle. It's pretty basic. -I've got a custom nib called "About" that shows when