ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Ben Golding
I am a bit stumped. I have an array controller which I have hooked up to a pop-up button and that works quite well. The members of the array are NSStrings but I would like to reformat them when they're displayed by the pop-up button. Seems fairly straightforward, I thought I'd just write a

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Citizen
On 19 Apr 2011, at 08:41, Ben Golding wrote: I am a bit stumped. I have an array controller which I have hooked up to a pop-up button and that works quite well. The members of the array are NSStrings but I would like to reformat them when they're displayed by the pop-up button. Seems

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Quincey Morris
On Apr 19, 2011, at 00:41, Ben Golding wrote: I am a bit stumped. I have an array controller which I have hooked up to a pop-up button and that works quite well. The members of the array are NSStrings but I would like to reformat them when they're displayed by the pop-up button. Seems

Re: A very customized window

2011-04-19 Thread eveningnick eveningnick
Thanks a lot for detailed response! ___ 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

Does not allow to Uninstall the application when it is running.

2011-04-19 Thread kirankumar
Hi All, I have one application for this i developed uninstall application when i run uninstall utility it completely uninstalling successfull upto here it is fine. But when i open the application also the uninstall utility is running completely successfull its a wrong process . if

Re: CALayer: Animation using actions property

2011-04-19 Thread Bhatnagar, Arvin
I fixed my own issue. It has to do with the timer. In short when using a timer to animate a layer I was using scheduledTimerWithTimeInterval versus timerWithTimeInterval. When I use timerWithTimeInterval I then set the Fire Date and add the timer to three modes: (NSRunLoopCommonModes,

Re: updating a table without interrupting user editing

2011-04-19 Thread Jerry Krinock
On 2011 Apr 18, at 20:32, Scott Ribe wrote: Suppose a user is editing a cell in a table, and I would like to call reloadData in order to reflect updates that have arrived asynchronously. What would I need to do in order to preserve the user's editing state, including current selected cell

Re: Does not allow to Uninstall the application when it is running.

2011-04-19 Thread Michael Babin
On Apr 19, 2011, at 7:09 AM, kirankumar wrote: I have one application for this i developed uninstall application when i run uninstall utility it completely uninstalling successfull upto here it is fine. But when i open the application also the uninstall utility is running completely

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Ben Golding
On 19/04/2011, at 18:19, Quincey Morris wrote: On Apr 19, 2011, at 00:41, Ben Golding wrote: I am a bit stumped. I have an array controller which I have hooked up to a pop-up button and that works quite well. The members of the array are NSStrings but I would like to reformat them when

Re: Find network mounted DVD's

2011-04-19 Thread Michael Dautermann
On Apr 18, 2011, at 10:35 PM, P Teeson wrote: In an app I am working on I have the below code to detect physical DVDs attached to the computer. But I have not had success in figuring out how to find LAN mounted DVD's Can someone please point me to the correct documentation or suggest a

NSTableView willDisplayCell: called on hover

2011-04-19 Thread Joshua Garnham
I've been doing some custom drawing in the tableView:willDisplayCell:forTableColumn:row: and from this realized that if you hover over a row in the table view for about 3 seconds then it will call willDisplayCell: again. What's even more odd is that if I close the window and reopen it and

Re: Find network mounted DVD's

2011-04-19 Thread P Teeson
Thanks for your suggestion. I did look at all the sample projects and know about that approach. But it does seem somewhat inelegant. Am I missing something available using IOKit? On 2011-04-19, at 9:36 AM, Michael Dautermann wrote: On Apr 18, 2011, at 10:35 PM, P Teeson wrote: In an app I am

Re: NSTableView willDisplayCell: called on hover

2011-04-19 Thread Kyle Sluder
On Apr 19, 2011, at 7:35 AM, Joshua Garnham joshua.garn...@yahoo.co.uk wrote: So my question really is, why does willDisplayCell: get called after a 3 sec hover, is this a bug? and is there anyway around it? It probably gets called to draw the tooltip expansion cell. If there is a bug here,

Re: Find network mounted DVD's

2011-04-19 Thread Michael Dautermann
On Apr 19, 2011, at 10:52 AM, P Teeson wrote: Thanks for your suggestion. I did look at all the sample projects and know about that approach. But it does seem somewhat inelegant. Am I missing something available using IOKit? The code you had in your original post looked just as

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Kyle Sluder
On Apr 19, 2011, at 6:20 AM, Ben Golding b...@object-craft.com.au wrote: Sure, I'm using content to bind to an array controller bound to an array of pop-up button titles and selected index (though I'm picking up the selected object using [[arrayControlled selectedObjects]

Re: NSTableView willDisplayCell: called on hover

2011-04-19 Thread Joshua Garnham
Normally my code doesn't care when or how often willDisplayCell: is called and is in fact called more often than in a normal table view as my code highlights the cell that the mouse is over. The odd thing is on this occasion the background which I draw for the highlighted cell actually draws

Re: CALayer: Animation using actions property

2011-04-19 Thread David Duncan
On Apr 18, 2011, at 7:49 PM, Bhatnagar, Arvin wrote: This is probably a simple question for someone other than I. I have a very simple CALayer which is a simple plain layer with a white background. I then create a CABasicAnimation and add it to the actions property to animate the

Re: CALayer: Animation using actions property

2011-04-19 Thread Bhatnagar, Arvin
Thanks David, I am going to try that suggestion right now. On 4/19/11 11:59 AM, David Duncan david.dun...@apple.com wrote: On Apr 18, 2011, at 7:49 PM, Bhatnagar, Arvin wrote: This is probably a simple question for someone other than I. I have a very simple CALayer which is a simple plain

Re: CALayer: Animation using actions property

2011-04-19 Thread Bhatnagar, Arvin
Ok that worked if I were animating just one layer on its own. However, I am animating three separate layers in sequence to one another. I know we can group multiple animations for one layer (CAGroupAnimation). Other than using a timer, is there an alternative to coordinating the animation of

Re: CALayer: Animation using actions property

2011-04-19 Thread David Duncan
On Apr 19, 2011, at 9:26 AM, Bhatnagar, Arvin wrote: Ok that worked if I were animating just one layer on its own. However, I am animating three separate layers in sequence to one another. I know we can group multiple animations for one layer (CAGroupAnimation). Other than using a timer,

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Quincey Morris
On Apr 19, 2011, at 06:20, Ben Golding wrote: What I'd found was that the documentation doesn't indicate what the ValueTransformer indicated is passed. It seems to be a controller object, not the pop-up button item's title which is the only thing that seems to make sense in the context.

Re: NSTableView willDisplayCell: called on hover

2011-04-19 Thread Corbin Dunn
Hi Josh, Be sure to not draw outside the cell bounds passed to you in the drawXXRect: method on the cell. corbin On Apr 19, 2011, at 8:56 AM, Joshua Garnham wrote: Normally my code doesn't care when or how often willDisplayCell: is called and is in fact called more often than in a normal

UIView/NSView doesn't display changing data in real time

2011-04-19 Thread Frederick C. Lee
Greetings: Simple scenario: background thread is computing data to be displayed in real time within the main thread. Data: dynamic/variable data that is converted into a NSString type within a background thread, displayed within a UILabel (or NSLabel) on the main thread. My own environment:

warning: cast from pointer to integer of different size

2011-04-19 Thread Jon Sigman
Basic question: Just for debugging purposes, I'm trying to print out the address of a pointer to a struct, but I can't figure out the proper way to do it (ie, satisfy the compiler warnings). OSX 10.6.7, Xcode 3.2.6 dispatch_source_t our_gcd_source; . . . printf(gcd_source:

Re: Find network mounted DVD's

2011-04-19 Thread P Teeson
Thank you for your thoughts. On 2011-04-19, at 11:08 AM, Michael Dautermann wrote: On Apr 19, 2011, at 10:52 AM, P Teeson wrote: Thanks for your suggestion. I did look at all the sample projects and know about that approach. But it does seem somewhat inelegant. Am I missing something

Re: warning: cast from pointer to integer of different size

2011-04-19 Thread David Duncan
%p On Apr 19, 2011, at 10:50 AM, Jon Sigman wrote: Basic question: Just for debugging purposes, I'm trying to print out the address of a pointer to a struct, but I can't figure out the proper way to do it (ie, satisfy the compiler warnings). OSX 10.6.7, Xcode 3.2.6 dispatch_source_t

Re: warning: cast from pointer to integer of different size

2011-04-19 Thread Jon Sigman
Thanks, David. I do recall that now. Need more coffee... From: David Duncan david.dun...@apple.com To: Jon Sigman rf_...@yahoo.com Cc: cocoa-dev@lists.apple.com Sent: Tue, April 19, 2011 11:01:40 AM Subject: Re: warning: cast from pointer to integer of different

Re: UIView/NSView doesn't display changing data in real time

2011-04-19 Thread Hank Heijink (Mailinglists)
On Apr 19, 2011, at 1:51 PM, Frederick C. Lee wrote: Greetings: Simple scenario: background thread is computing data to be displayed in real time within the main thread. Data: dynamic/variable data that is converted into a NSString type within a background thread, displayed within a

Re: UIView/NSView doesn't display changing data in real time

2011-04-19 Thread Steve Christensen
Is your call to -setNeedsDisplay being done on the main thread or from your background thread. I seem to recall that you get ignored if the call is not made on the main thread, so you'd need to use one of the -performSelectorOnMainThread:... methods. On Apr 19, 2011, at 10:51 AM, Frederick C.

How call upper layer function

2011-04-19 Thread Rodrigo Zanatta Silva
I think this is simple, but i am have no idea. I create a upper class: #import downClass.h @interface MyUpperClass : NSObject and in than I create downClass *test = [[downClass alloc] init]. Than in my downClass is just a think like @interface downClass: NSObject They are not Inheritance, so

Re: How call upper layer function

2011-04-19 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/19/11 1:07 PM, Rodrigo Zanatta Silva wrote: I think this is simple, but i am have no idea. I create a upper class: #import downClass.h @interface MyUpperClass : NSObject and in than I create downClass *test = [[downClass alloc] init].

Re: Find network mounted DVD's

2011-04-19 Thread Lee Ann Rucker
You can spot an Apple Remote Disc by looking for kIOPropertyPhysicalInterconnectLocationKey = Network kIOPropertyProductNameKey = Disc Image On Apr 19, 2011, at 8:08 AM, Michael Dautermann wrote: On Apr 19, 2011, at 10:52 AM, P Teeson wrote: Thanks for your suggestion. I did look at

Re: How call upper layer function

2011-04-19 Thread Rodrigo Zanatta Silva
Lol, sorry for making your life hard :P let's write better. (Will be a problem in your computer with this font in e-mail? ) //This is LevelUp.h #import LeveDown.h @interface LevelUp : NSObject { } -(void) init; -(void)wantCallThisFunction @end //This is LevelUp.m @implement LevelUp -(void)

NSArrayController image in column

2011-04-19 Thread Todd Heberlein
I want to have an NSTableView controlled by an NSArrayController using an NSArray data source. In one of the columns I want to display one of several images. The choice of image will be based on an integer value in one of the fields of the array. What is the best or most recommended way to do

Re: NSArrayController image in column

2011-04-19 Thread Dave DeLong
You could use a custom NSValueTransformer. Subclass NSValueTransformer and have the -transformValue accept one of the objects from your NSArray, and then uses that object to return the appropriate NSImage. Then when you're setting up your bindings, simply type in the name of your

Re: How call upper layer function

2011-04-19 Thread Michael Dautermann
On Apr 19, 2011, at 4:50 PM, Rodrigo Zanatta Silva wrote: Lol, sorry for making your life hard :P let's write better. (Will be a problem in your computer with this font in e-mail? ) I don't believe fonts/styles make it through onto the mailing list. At least I didn't see any special font

Re: NSArrayController image in column

2011-04-19 Thread Quincey Morris
On Apr 19, 2011, at 14:26, Todd Heberlein wrote: I want to have an NSTableView controlled by an NSArrayController using an NSArray data source. In one of the columns I want to display one of several images. The choice of image will be based on an integer value in one of the fields of the

Re: NSArrayController image in column

2011-04-19 Thread Dave DeLong
On Apr 19, 2011, at 3:06 PM, Quincey Morris wrote: On Apr 19, 2011, at 14:26, Todd Heberlein wrote: ... Another alternative (and a slightly better one, I'd suggest, since it's more direct) is to provide the NSImage* directly via a data source. It works fine to use a data source for some

Re: How call upper layer function

2011-04-19 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (Sorry, putting back on list after accidental private reply.) On 4/19/11 1:50 PM, Rodrigo Zanatta Silva wrote: Lol, sorry for making your life hard :P let's write better. (Will be a problem in your computer with this font in e-mail? ) Works

Re: How call upper layer function

2011-04-19 Thread Quincey Morris
On Apr 19, 2011, at 15:03, Michael Dautermann wrote: How is LevelUp instantiated? Is it part of the XIB that also contains LevelDown? If so, you could declare IBOutlet id levelUpObject in your LevelDown view and connect it to LevelUp. If LevelUp and LevelDown are not part of the

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Ben Golding
On 20/04/2011, at 01:09, Kyle Sluder wrote: On Apr 19, 2011, at 6:20 AM, Ben Golding b...@object-craft.com.au wrote: Sure, I'm using content to bind to an array controller bound to an array of pop-up button titles and selected index (though I'm picking up the selected object using

Re: renaming directories and moving files into them (NSFileManager)

2011-04-19 Thread Scott Anguish
I’ve since abandoned this approach. * Did you see my previous question? It looked like your logic would result in directories xxx-APPL, xxx-APPL-APPL, xxx-APPL-APPL-APPL, etc. -- or was I mistaken? If there is code elsewhere that is resetting shootPath to not have the APPL suffix, could

Re: NSArrayController image in column

2011-04-19 Thread Todd Heberlein
On Apr 19, 2011, at 3:09 PM, Dave DeLong wrote: Or just add a method on your data object that vends the appropriate image based on its own properties, and then just bind to that method name as the Model Key Path. (this is much simpler than the value transformer) For an experiment I have

Re: NSArrayController image in column

2011-04-19 Thread Quincey Morris
On Apr 19, 2011, at 20:57, Todd Heberlein wrote: Both work, but for some reason the circle images using the transformer don't quite look right, like they are duller or something. Maybe a reduced opacity. But I am returning a pointer to the same image. Weird. Any idea why a column with a

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Ken Thomases
On Apr 19, 2011, at 8:46 PM, Ben Golding wrote: I should have been more specific. What I have looks like: popupButton.content -(Transformer)- [arrayController].arrangedObjects popupButton.selectedIndex -- [arrayController].selectionIndex I have also tried: popupButton.contentValues