Re: Best approach to write an uninstaller for osx

2009-11-21 Thread Parimal Das
Hi I shifted from dmg install to packaged one for the following reasons- My app needs to install a firefox addon to work. This i am doing in a postinstall script in the packaged install, copying my xpi file to firefox designated place Now sending my app to trash will not delete that xpi, and i

How to change UITableView cell style dynamically

2009-11-21 Thread Tharindu Madushanka
Hi I am trying to create a table with a single cell like in Contacts Application top one. What I want is change the cell style time to time. But changing the style does not work even I call [tableview reloadData] it seems like cell style is not changing I want to switch between Default cell

Re: How to change UITableView cell style dynamically

2009-11-21 Thread Tharindu Madushanka
Hi Removing reuse identifier solved the problem so now I am creating a cell like below. It worked. UITableViewCellStyle style; if(profile.name.length 0) { style = UITableViewCellStyleSubview; } else { style = UITableViewCellStyleDefault; } UITableViewCell *cell = [[[UITableViewCell

NSDecimal chokes on very small numbers

2009-11-21 Thread Tom Bernard
Before reporting this as a bug to Apple's Bug Reporter, I would like feedback from the community. I am working in Leopard. Has this been fixed in Snow Leopard? Is there something else I am overlooking? NSDecimalPower returns an unexpected result when I raise 1e-35 to the 4th power. I understand

Re: extracting the mantissa for a NSDecimal

2009-11-21 Thread Tom Bernard
So to avoid the endian quagmire, I should create an NSDecimalNumber from my NSDecimal and add that to my dictionary. NSDecimal pi = ... // 3.1415927... NSDecimalNumber *piNSD = [NSDecimalNumber decimalNumberWithDecimal:pi]; I plan to write a pair of apps that saves NSDecimal values to

Re: How to change UITableView cell style dynamically

2009-11-21 Thread Karolis Ramanauskas
I don't see an example of how you are creating cells in your first post. But in case you were using the same string for the reuse identifier then when the cell is loaded the second time it will not switch to a different style. Because whatever cell was cashed the first time it will be reused.

Re: How to change UITableView cell style dynamically

2009-11-21 Thread Luke Hiesterman
If you have 2 different styles of cells then you should have 2 different reuse identifiers. Then when you dequeue, you ask for an available cell of the apropeiate type. Luke Sent from my iPhone. On Nov 21, 2009, at 1:55 AM, Tharindu Madushanka tharindu...@gmail.com wrote: Hi Removing

Saving data as NSData using NSUserDefaults

2009-11-21 Thread Tharindu Madushanka
Hi, I saw a method to retreive data as NSData using NSUserDefaults class, but it seems like there is no method to save NSData. no method like setData: forKey: Is it possible to save somethings as for example image as NSData in NSUserDefaults Thank you, Tharindu

Re: How to change UITableView cell style dynamically

2009-11-21 Thread Tharindu Madushanka
mm ok I will add two types of cells. But since its only a single cell table, I thought there would not be any performance issue or something doing that. On Sat, Nov 21, 2009 at 8:01 PM, Luke Hiesterman luket...@apple.com wrote: If you have 2 different styles of cells then you should have 2

Re: Saving data as NSData using NSUserDefaults

2009-11-21 Thread Fritz Anderson
On 21 Nov 2009, at 8:32 AM, Tharindu Madushanka wrote: I saw a method to retreive data as NSData using NSUserDefaults class, but it seems like there is no method to save NSData. no method like setData: forKey: Is it possible to save somethings as for example image as NSData in

Re: Saving data as NSData using NSUserDefaults

2009-11-21 Thread Tharindu Madushanka
yep got the idea now, it seems setObject: is the one to use for all the object types. But there are multiple retrieve methods to make work easier. Thanks :) On Sat, Nov 21, 2009 at 8:10 PM, Fritz Anderson fri...@manoverboard.orgwrote: On 21 Nov 2009, at 8:32 AM, Tharindu Madushanka wrote: I

Problems understanding CALayer geometry

2009-11-21 Thread Henri Häkkinen
Hello. I am deriving my own custom CALayer class for my custom NSView class but there is something I don't quite understand about the geometry. This is how I create the layer in awakeFromNib: of my custom NSView class: - (void)awakeFromNib { MyLayer *myLayer = [MyLayer layer];

Re: How to change UITableView cell style dynamically

2009-11-21 Thread Luke Hiesterman
I'm sure you could get away without doing that in this case because your table is so simple. The solution I gave you, though, will scale in case you ever need to do it on a bigger table. Luke Sent from my iPhone. On Nov 21, 2009, at 6:38 AM, Tharindu Madushanka tharindu...@gmail.com

RE: NSRunloop + shared thread

2009-11-21 Thread Colin Deasy
Hey, Thanks for the info. I'll certainly look into the CFNetwork API. I was really hoping for a nice solution to come about for the cocoa API's but I've since given up hope and started using libcurl, which is actually a really nice library to work with. Thanks for all the help Subject: Re:

Re: NSRunloop + shared thread

2009-11-21 Thread Hank Heijink (Mailinglists)
On Nov 21, 2009, at 11:39 AM, Colin Deasy wrote: Hey, Thanks for the info. I'll certainly look into the CFNetwork API. I was really hoping for a nice solution to come about for the cocoa API's but I've since given up hope and started using libcurl, which is actually a really nice

Re: NSRunloop + shared thread

2009-11-21 Thread Greg Guerin
Colin Deasy wrote: Thanks for the info. I'll certainly look into the CFNetwork API. I was really hoping for a nice solution to come about for the cocoa API's but I've since given up hope and started using libcurl, which is actually a really nice library to work with. If CocoaAsyncSocket

Re: What exactly does NSController do?

2009-11-21 Thread Quincey Morris
On Nov 20, 2009, at 14:02, Chase Meadors wrote: Thought I'd give the question another try. Any insight appreciated. A while back, I wondered about the same thing, and found two things, both relatively minor: 1. NSObjectController responds to 'commitEditing:' by committing all the editors

Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-21 Thread Quincey Morris
On Nov 20, 2009, at 21:15, Kyle Sluder wrote: On Nov 20, 2009, at 6:38 PM, Sean McBride cwat...@cam.org wrote: Quincey Morris (quinceymor...@earthlink.net) on 2009-11-20 6:34 PM said: ...the window controller could send 'commitEditing:' messages directly to text fields and other views

Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-21 Thread Kyle Sluder
On Sat, Nov 21, 2009 at 12:07 PM, Quincey Morris quinceymor...@earthlink.net wrote: It occurs to me that perhaps the reason sending 'commitEditing:' to a text field doesn't work is that you need to send it to the field editor, not the text field itself? Or something like that. That makes

Re: Problems understanding CALayer geometry

2009-11-21 Thread Matt Neuburg
On Sat, 21 Nov 2009 17:21:55 +0200, Henri H?kkinen hen...@henuxsoft.com said: Hello. I am deriving my own custom CALayer class for my custom NSView class but there is something I don't quite understand about the geometry. This is how I create the layer in awakeFromNib: of my custom NSView class:

NSTableView retain count problem

2009-11-21 Thread Shane
I have an NSTableView where the data source and delegate are assigned to an NSViewController, and in this controller I have the two data source methods. numberOfRowsInTableView tableView: objectValueForTableColumn row: This project was previously done through xcode using Tiger, and I've just now

Re: NSTableView retain count problem

2009-11-21 Thread Jens Alfke
On Nov 21, 2009, at 3:49 PM, Shane wrote: So I looked at 'records' and the retain count is always 0, yet 'records' in my other method 'createDictionary' which populates the table is always 1. There's no such thing as an object with retain count 0; the object would have been dealloc'ed the

Re: Best approach to write an uninstaller for osx

2009-11-21 Thread Jens Alfke
On Nov 21, 2009, at 12:21 AM, Parimal Das wrote: My app needs to install a firefox addon to work. This i am doing in a postinstall script in the packaged install, copying my xpi file to firefox designated place I'd call that a legitimate case for an uninstaller :) Now sending my app to

Re: NSTableView retain count problem

2009-11-21 Thread Shane
What you're seeing is an object pointer with a value of nil. (Messaging nil always returns 0 / false / nil.) So you need to look at why your instance variable 'count' has a nil value at that point. Try setting breakpoints. I've tried setting breakpoints, but it's like two separate variables

Re: NSTableView retain count problem

2009-11-21 Thread Hank Heijink (Mailinglists)
@interface DataViewController : MainViewController { … NSMutableArray *records; } - (id) init { records = [[NSMutableArray alloc] init]; } - (int) createDictionary { [records autorelease]; I'm assuming you're not using GC since you're looking at

Re: method_getNumberOfArguments counts blocks twice

2009-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 2009 à 02:25, Philip White a écrit : Hello, I apologize if this has been touched on already. Have others observed that the function method_getNumberOfArguments counts block arguments as two arguments? The corresponding method in NSMethodSignature counts them once. Similarly,

Re: NSTableView retain count problem

2009-11-21 Thread Jens Alfke
On Nov 21, 2009, at 5:07 PM, Shane wrote: I've tried setting breakpoints, but it's like two separate variables with the name 'records' exist. That would be literally true, if there were two instances of your class. Try looking at the value of 'self' in each place. (Again, examining an

[iPhone] UIButton adding glow effect for a custom button with image

2009-11-21 Thread Tharindu Madushanka
Hi I have a custom button with image as background. So when its is selected I have to add some effect on top of it to indicate that its selected. So one way of doing that could be to add another image for that perticular button state. I have tried with showsTouchWhenHighlighted property and

Re: NSTableView retain count problem

2009-11-21 Thread Shane
That would be literally true, if there were two instances of your class. Try looking at the value of 'self' in each place. (Again, examining an object's retainCount is almost never useful for anything. If you want to tell whether the pointer is pointing to an object, just look at it and

Re: NSTableView retain count problem

2009-11-21 Thread Mark Munz
Since records is a instance variable, you don't want to autorelease it. You want it to stick around until the object is destroyed. Delete the [records autorelease]; reference in createDictionary. then add (void) dealloc { [records release]; [super dealloc]; } On Sat, Nov 21, 2009 at

Re: NSTableView retain count problem

2009-11-21 Thread Shane
On Sat, Nov 21, 2009 at 11:55 PM, Mark Munz unmar...@gmail.com wrote: Since records is a instance variable, you don't want to autorelease it. You want it to stick around until the object is destroyed. Delete the [records autorelease]; reference in createDictionary. then add (void) dealloc

UITextField Cursor Color

2009-11-21 Thread Chunk 1978
textfields in the iPhone SDK default to a blue color. i would like to change this color to white. i've checked the docs, and while the following method would work for development with Mac OS X, it is (currently) not present for the iPhone: [myTextField setInsertionPointColor:[UIColor

Re: How to avoid the movie distortion ?

2009-11-21 Thread James
Hi, douglas According to your direction, the problem has been solved. Thank you very much. Thank everyone for your help. James James, In Interface Builder, did you check the Preserve Aspect Ratio checkbox for your QTMovieView? curiously, douglas

Re: Best approach to write an uninstaller for osx

2009-11-21 Thread Parimal Das
Thanks Jens Let me try the Applescript way. On Sun, Nov 22, 2009 at 6:20 AM, Jens Alfke j...@mooseyard.com wrote: On Nov 21, 2009, at 12:21 AM, Parimal Das wrote: My app needs to install a firefox addon to work. This i am doing in a postinstall script in the packaged install, copying my

Re: NSTableView retain count problem

2009-11-21 Thread Jens Alfke
On Nov 21, 2009, at 9:08 PM, Shane wrote: Yep, thanks. The address of self within each of my methods has a different address value. Not sure why, but, that's something to go on. When a method is called, 'self' refers to the object that received the message*. What you're seeing is that you