A problem with PopupButtonCell --- submenu selection not available

2010-07-05 Thread Motti Shneor
Hello everyone. I need to programmatically place a Popup-Menu (Pulldown) on an arbitrary place in my custom view, and collect user selection. I have done this by creating a category for the NSMenu object - like this // This category adds a generic popup-menu capability to NSMenu. @interface

Re: A problem with PopupButtonCell --- submenu selection not available

2010-07-05 Thread Ron Fleckner
On 05/07/2010, at 9:32 PM, Motti Shneor wrote: This works nicely until the menu has submenus. If a user selects an item that belongs to a submenu --- then resultIndex = [popUpButtonCell indexOfSelectedItem]; returns -1 (unknown) result = [popUpButtonCell selectedItem]; returns nil!

Run application before Login starts?

2010-07-05 Thread kirankumar
Hi All, How to run a application before login starts (ie, before when we enter username and password). For example , Mouse And Keyboard starts before login ,like that i need to start my application to work my devices before login. Is ther any script or placing a plist in /Library/Preferences

Re: A problem with PopupButtonCell --- submenu selection not available

2010-07-05 Thread Graham Cox
On 05/07/2010, at 9:32 PM, Motti Shneor wrote: resultIndex = [popUpButtonCell indexOfSelectedItem]; returns -1 (unknown) result = [popUpButtonCell selectedItem]; returns nil! How can I resolve this thing? I MUST have popup menus with sub-menus! Is there a hidden member or method that will

GKSession and WLAN

2010-07-05 Thread Alexander Spohr
Hi list, Is GKSession capable of connecting local devices without bluetooth - just using WLAN? The docs say no: A GKSession object provides the ability to discover and connect to nearby iPhones using Bluetooth. No word on WLAN. I have two devices (iPod iPhone) running iOS4 in my WLAN. I

Re: A problem with PopupButtonCell --- submenu selection not available

2010-07-05 Thread Motti Shneor
Hello Graham, and thanks a million. That's exactly where i stand. I don't have a control, only a cell, and I can hardly use the [NSMenu popUpContextMenu] because its visual appearance is different than the desired PopUpButtonCell. My whole situation is 100% programmatic, no IB or NIB or XIB

[iPhone] Terminating iPhone App programatically

2010-07-05 Thread Tharindu Madushanka
Hi, If I use following code to exit my application in some certain conditions, depending on user inputs, will Apple reject the app ? [[UIApplication sharedApplication] terminateWithSuccess]; If so are there any other means to successfully terminate the app programatically ? Thanks and Kind

Prevent large offset when warping mouse cursor

2010-07-05 Thread Tron Thomas
I implemented the following custom view derived from NSView: #import WarpCursorView.h @interface WarpCursorView () - (CGPoint)centerOnScreen; @end @implementation WarpCursorView - (void)drawRect:(NSRect)dirtyRect { } - (void)mouseMoved:(NSEvent*)event { NSWindow* window = self.window;

Re: [iPhone] Terminating iPhone App programatically

2010-07-05 Thread Dave DeLong
Apple strongly discourages programmatically quitting your application. That's what the home button is for. http://developer.apple.com/iphone/library/qa/qa2008/qa1561.html Dave Sent from my iPhone On Jul 5, 2010, at 10:08 AM, Tharindu Madushanka tharindu...@gmail.com wrote: Hi, If I use

Re: [iPhone] Terminating iPhone App programatically

2010-07-05 Thread Tharindu Madushanka
Hi, But is it okay to quit app programatically after showing an alert to user about application exit situation ? After reading the link I get the idea that we could use this feature sometimes. And also could I use [[UIApplication sharedApplication] terminateWithSuccess] ? Tharindu.

Re: [iPhone] Terminating iPhone App programatically

2010-07-05 Thread Roland King
That is not a public API (I had to google even to find it - if it's not in the official documentation, and it's not, it's not public, you can't use it and it can't be discussed here). If you did use that your application would most definitely be rejected. If you showed a dialog box and then

Re: [iPhone] Terminating iPhone App programatically

2010-07-05 Thread Tharindu Madushanka
Hi, Ah Ok. I got the point. Thanks :) So we should not look to exit the app using code. Tharindu. ___ 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

[iPhone] Detecting FaceTime capability

2010-07-05 Thread Dave DeLong
Hi everyone, I'm working on an app that depends on the presence of FaceTime functionality in order to be useful. Currently, FaceTime is only present on the iPhone 4, but we are strongly discouraged from tying app functionality to device models. The overwhelming recommended way to do this is

Re: Run application before Login starts?

2010-07-05 Thread Greg Guerin
kirankumar wrote: How to run a application before login starts (ie, before when we enter username and password). http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: [iPhone] Detecting FaceTime capability

2010-07-05 Thread Kyle Sluder
On Jul 5, 2010, at 10:51 AM, Dave DeLong davedel...@me.com wrote: Hi everyone, I'm working on an app that depends on the presence of FaceTime functionality in order to be useful. Currently, FaceTime is only present on the iPhone 4, but we are strongly discouraged from tying app

Re: [iPhone] Detecting FaceTime capability

2010-07-05 Thread Dave DeLong
I'm not looking to interact with FaceTime; I just need to know that the device can handle it. Dave On Jul 5, 2010, at 12:52 PM, Kyle Sluder wrote: On Jul 5, 2010, at 10:51 AM, Dave DeLong davedel...@me.com wrote: Hi everyone, I'm working on an app that depends on the presence of

Hiding NSButtonCell

2010-07-05 Thread Rainer Standke
Hello, I have an outline view with a column with an NSButtonCell in it. I want to make that button invisible and inactive for all outline rows. Here is my code for the ouline view's delegate: - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell

UITableView.layer renderInContext: after setContentOffset ?

2010-07-05 Thread Chaitanya Pandit
Hi, List I'm trying to create an image out of a UITableView using the layer's renderInContext Method, however my problem is that i have to create an image of the specific portion of the tableView So i call setContentOffset and then try to generate the image, however this doesn't work and I get

CoreData Problems

2010-07-05 Thread Gordon Apple
We're doing our first iPad (simulator only at this time) CoreData project and having a multitude of problems. We have a sectioned table in one of our tabs. The CD stack is created in the appDelegate's didFinishLaunchingWithOptions by using: self.fetchedResultsController.delegate = self; This

Re: how to set custom icon folder to invisible?

2010-07-05 Thread Sean McBride
On Thu, 1 Jul 2010 10:12:34 -0700, Kyle Sluder said: How can I change the code so that the Icon? file is invisible? The file is named Icon\r. It doesn't begin with a dot, therefore ls will find it. That can't be changed. Note that it will be invisible to the average user though, because the

Re: how to set custom icon folder to invisible?

2010-07-05 Thread Kyle Sluder
On Mon, Jul 5, 2010 at 1:02 PM, Sean McBride s...@rogue-research.com wrote: Note that it will be invisible to the average user though, because the Finder and NSOpenPanel won't show Icon\r files. The filename isn't what controls the hiddenness of the file. It's the hidden flag (man chflags for

Re. CoreData Problems

2010-07-05 Thread Gordon Apple
Addendum. Sorry -- should have included this. After the pre-load, I do another performFetch on the frc to make sure it gets everything in the database. Also, there are no error conditions, failed attempts, or console messages showing up anywhere.

Re: KVO question

2010-07-05 Thread Sean McBride
On Thu, 1 Jul 2010 10:30:39 -0700, Rainer Standke said: I have a core data app where I don't necessarily know when managed objects go away, as in: become faults, will be deleted etc.. You know they become faults when willTurnIntoFault is invoked. You'll know they'll be deleted when

Re: Core Data : Save As : Object temporarily missing in fetch results

2010-07-05 Thread Sean McBride
On Thu, 1 Jul 2010 15:38:35 -0700, Jerry Krinock said: I'm debugging a problem with Save As in a Core Data document, and I'm not sure if the following is part of the main show, or a sideshow. A document contains only one object in a given entity. I've written a little debugger method which

Re: Custom bundle icon

2010-07-05 Thread Sean McBride
On Fri, 2 Jul 2010 15:49:19 +0200, Jean-Daniel Dupas said: Just an aesthetic question. I've implemented an API for cocoa plugins in my app, and the plugins use a custom extension, ftplugin. These plugins show up as folders in the finder, even though I've set the app icon to an icns file. Is

Re: UITableView.layer renderInContext: after setContentOffset ?

2010-07-05 Thread David Duncan
The table view lays out views to provide it's content, so it is likely that your content isn't in position at that point. The best advice in general is to not use renderInContext: for anything that isn't destined to be put immediately back on screen. Even in that case, there are pitfalls as

Re: Run application before Login starts?

2010-07-05 Thread John Joyce
On Jul 5, 2010, at 7:16 AM, kirankumar wrote: Hi All, How to run a application before login starts (ie, before when we enter username and password). For example , Mouse And Keyboard starts before login ,like that i need to start my application to work my devices before login. Is ther

Re: A problem with PopupButtonCell --- submenu selection not available

2010-07-05 Thread Graham Cox
On 06/07/2010, at 12:31 AM, Motti Shneor wrote: One catch though... In my situation, the menus, sub-menus and items are prepared in advance, somewhere-else-in-the-code, where I don't yet know the target and action. These are only available for me when I'm actually activating the menu.

Re: Hiding NSButtonCell

2010-07-05 Thread Graham Cox
On 06/07/2010, at 4:56 AM, Rainer Standke wrote: setEnabled works on single cells, and as expected: the outline row's button is grayed out. Oddly, setTransparent affects all cells in the column, i.e. the button appears in no row, not even the ones that have no children. That's

NSTableView: programatically changing sorted column

2010-07-05 Thread Graham Cox
I want to programatically change the column on which items are sorted in NSTableView. When I call -setHighlightedTableColumn:, it does change the highlighted column, but annoyingly, nothing is done with the table's sort descriptors. I can't see any API for triggering a proper update to the

Re: NSTableView: programatically changing sorted column

2010-07-05 Thread Kyle Sluder
On Mon, Jul 5, 2010 at 6:50 PM, Graham Cox graham@bigpond.com wrote: Note that I want to do this for good reason: I have two alternative views of some data, a table view and an icon view. The icon view is sorted to match the table view, so I rely on the table's sort descriptors for both

Re: NSTableView: programatically changing sorted column

2010-07-05 Thread Graham Cox
On 06/07/2010, at 12:02 PM, Kyle Sluder wrote: Have you tried making a canonical sortDescriptors property on an appropriate controller (probably a window controller or view controller) and binding both the table view and icon view's sortDescriptors to this property? This seems more

Re: Custom bundle icon

2010-07-05 Thread John Johnson
You should do as Jean-Daniel says, but also, you should set the 'bundle bit' of your .ftplugin files. The system only knows to show .ftplugin folders as flat files if it can find your UTI somewhere. If the user has your app, then that's fine, but if not then he'll still see a folder.

Re: NSTableView: programatically changing sorted column

2010-07-05 Thread Scott Anguish
are you implementing the delegate method? - (void)tableView:(NSTableView *)tableView sortDescriptorsDidChange:(NSArray *)oldDescriptors { // the sort descriptors are specified in Interface Builder for the lastName column and the relationship column // the both specify the

Re: NSTableView: programatically changing sorted column

2010-07-05 Thread Kyle Sluder
On Mon, Jul 5, 2010 at 7:36 PM, Graham Cox graham@bigpond.com wrote: I was hoping to avoid it because if I do that I have to duplicate the work that NSTableView does to maintain its list of sort descriptors. Since NSTableView already manages this list, it's easy to use. I would argue

Re: Custom bundle icon

2010-07-05 Thread Kyle Sluder
On Mon, Jul 5, 2010 at 8:01 PM, John Johnson johntothejohn...@gmail.com wrote: Thanks for the info on the bundle bit. So can I set the UTI on the plugin itself, or must I set it on the main app? I mean, I understand that setting it on the main app will work, but will  setting it on just the

Re: NSTableView: programatically changing sorted column

2010-07-05 Thread Graham Cox
Hi Scott, Yes I'm implementing the delegate method. Sorting is working just fine: when I click the column headers sort descriptors are updated, the delegate is informed, the controller does its thing with the data and all is well. The issue is when I try to accomplish this programatically

Re: NSTableView: programatically changing sorted column

2010-07-05 Thread Graham Cox
On 06/07/2010, at 1:28 PM, Kyle Sluder wrote: I would argue that's less of a concern than inverting the responsibilities of your controller and view layers. If the sort descriptors in use is a concept that exists outside of the table view, it really doesn't make sense to make the table view

Re: Custom bundle icon

2010-07-05 Thread John Johnson
You can't set a UTI on something. You provide a UTI declaration in your Info.plist, consisting of a set of attributes that define what it means for a file to conform to a UTI, and Launch Services uses that to match files against when it tries to determine their UTI. So, no, by definition you

Re: Run application before Login starts?

2010-07-05 Thread kirankumar
Thanks to all for spending time on my issue, No,my app doesn't require any authentication and authorization. Why this is necessary, actually My keyboard and mouse is connected to my Device ,this device is connected in LAN. Through the Lan i need to connect keyboard and mouse for that i develope