Re: programatically updating UI for NSArrayContoller/NSTableView combo

2010-01-12 Thread Russell Gray
Thanks for taking the time to look at my code guys, I ended up taking mmalc's advice, and rewrote the datasource sans arrayController/bindings. it took me less than 2 hours! Russell On 11/01/2010, at 4:16 AM, mmalc Crawford wrote: > > On Jan 10, 2010, at 4:57 am, Quincey Morris wrote: > >>

Re: Table object not selected on launch

2010-01-12 Thread Philip Vallone
Hi, I have a similar app that requires the same affect. What I did was create a boolean or valve that indicates if the cell can be selected. In my iphone app, this can be done in the didSelectRowAtIndexPath Method. Something like this: if (indexPath.row > getCurrent) {

widget plugin crashed when i use thread

2010-01-12 Thread Sam Tseng
hi, i would like to implement a widget plugin to detect iTunes current artist and current album call back to widget. i ran my widget plugin in dashcode without crashing. however, i deployed the widget into dashboard, it crashed all the time. following is part of my codes, could any one give me hin

appController class in InterfaceBuilder

2010-01-12 Thread Jonathan Chacón
Hello everybody I'm a blind user. I knew a method to design interfaces using interfaceBuilder by blind developers. The problem is to define outlets, actions an connections in interfaceBuilder. I can add outlets to an object but I can set the controller for the window in interfaceBuilder. Does a

Re: widget plugin crashed when i use thread

2010-01-12 Thread Sam Tseng
sorry, i have another question about "WebScriptObject callWebScriptMethod" : i used **[webScriptObject callWebScriptMethod:@"_updateInfo" withArguments:args];** to call javascript _updateInfo function. it can be called with correct parameters. however, it complains document.getElementById("f_name"

Re: A password strength checker

2010-01-12 Thread Jim Turner
Code is available at: http://code.google.com/p/nukethemfromorbit/source/browse/#svn/trunk/PasswordStrength It's just the method for determining the strength, any UI accouterments is an exercise left up to the reader... although I'll probably make my stuff available once I have it cleaned up. If an

Almost! to the end

2010-01-12 Thread John Love
Thanks to many, many folk, I am at the very end of my project .. calculating an Excel spreadsheet, cell by cell .. with the calculations done in a background thread .. using either +detachNewThreadSelector and/or NSPorts with NSPortMessages, or even a NSOperationQueue. Tried all 3 approaches ju

Re: What's the right way to make the last (or only) table column fill the width of an NSTableView?

2010-01-12 Thread Charles Jenkins
No, I wasn't aware of that, and I certainly don't find mention of it in the documentation for NSTableView or NSTableColumn. But tonight when I get home, I will try it! On 2010-01-11 23:53, Kyle Sluder wrote: On Mon, Jan 11, 2010 at 10:58 AM, Charles Jenkins wrote: The ZIP Inspector progr

Re: What's the right way to make the last (or only) table column fill the width of an NSTableView?

2010-01-12 Thread Corbin Dunn
On Jan 12, 2010, at 8:00 AM, Charles Jenkins wrote: No, I wasn't aware of that, and I certainly don't find mention of it in the documentation for NSTableView or NSTableColumn. But tonight when I get home, I will try it! Please log documentation bugs (or use the documentation feedback for

Re: NSURLConnection POST issues

2010-01-12 Thread Gordon Henriksen
On 2010-01-09, at 22:31, Damien Cooke wrote: > [appendedData appendData:[[[NSString > stringWithFormat:@"ProdBuild=%@",[self productBuild]] > stringByAddingPercentEscapesUsingEncoding: > NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding > allowLossyConversion:YES]]; As an as

Re: prepareSavePanel - save as or save to?

2010-01-12 Thread Mike Abdullah
There's nothing convenient built in. My solution is to add an ivar along the lines of "lastSavePanelOperation". Override like so: - (void)runModalSavePanelForSaveOperation:(NSSaveOperationType)saveOperation delegate:(id)delegate didSaveS

Re: Drawing A Mutable String

2010-01-12 Thread Michael Craig
Well, I feel dumb. Your (Andy's) mention of setNeedsDisplay: caught my eye, and I realized soon after that the button whose method causes invalidStack to be YES never tells the view the redraw. I still don't entirely understand why the text didn't get drawn when the view was subsequently redrawn (b

Re: NSExtraMIData?

2010-01-12 Thread Sean McBride
On 1/12/10 3:58 PM, Graham Cox said: >> The static analyzer is very good at what it does. Are you remembering >> to Build and Analyze? > > >I sure am - that's what's such a pain, my app passes with no issues but >I get these occasional reports from the field, but very unrepeatably. Are you using

NSFileHandle weirdness on 10.5 ...

2010-01-12 Thread Heizer, Charles
Hello, I'm hoping someone can help me out here. I'm trying to use IPC (Unix domain socket AF_UNIX) to pass data between two applications. I have a console application which is sending data to the socket path and a Cocoa GUI app which is reading it using NSFileHandle. The problem I'm seeing is o

Re: NSExtraMIData?

2010-01-12 Thread Sean McBride
On 1/11/10 8:10 PM, Greg Parker said: >Most likely, you over-released some other object and then an >NSExtraMIData was allocated at the same address. When you later try to >use the dead over-released object, the message is sent to the >NSExtraMIData object. Greg, Is there any way to prevent futu

(void *)contextInfo

2010-01-12 Thread Rainer Standke
I am trying to get some contextinfo across while a sheet is displayed. Here is the code that displays the sheet: NSArray *theContextInfo = [[NSArray alloc] init]; theContextInfo = [NSArray arrayWithObject:objTBD]; [NSApp beginSheet: alertWindow modalF

Re: (void *)contextInfo

2010-01-12 Thread Seth Willits
On Jan 12, 2010, at 11:51 AM, Rainer Standke wrote: > NSArray *theContextInfo = [[NSArray alloc] init]; > theContextInfo = [NSArray arrayWithObject:objTBD]; Well that's a leak already... The alloc/init is a waste. > [NSApp beginSheet: alertWindow > modalForWindow: [self wi

Re: (void *)contextInfo

2010-01-12 Thread Sherm Pendley
On Tue, Jan 12, 2010 at 2:51 PM, Rainer Standke wrote: > > Here is the code that displays the sheet: > > NSArray *theContextInfo = [[NSArray alloc] init]; This creates a new array that you are responsible for releasing when you're finished with it. >        theContextInfo = [NSArray arrayWithObj

Re: (void *)contextInfo

2010-01-12 Thread Nick Zitzmann
On Jan 12, 2010, at 12:51 PM, Rainer Standke wrote: > The contextinfo's class is logged as NSConcreteMutableData. How can I get > back to the array? Why is contextinfo considered to be of class void in the > signature? > > What am I missing? (Another newbie thing I suspect...) If you're using

Re: (void *)contextInfo

2010-01-12 Thread Hank Heijink (Mailinglists)
On Jan 12, 2010, at 2:51 PM, Rainer Standke wrote: > I am trying to get some contextinfo across while a sheet is displayed. > > Here is the code that displays the sheet: > > NSArray *theContextInfo = [[NSArray alloc] init]; > theContextInfo = [NSArray arrayWithObject:objTBD]; You're leak

Snapshotting hidden UIViews

2010-01-12 Thread Michael Gardner
I'm trying to create a "snapshot" UIImage from a UITextView that's inside a larger, hidden UIView. renderInContext: works fine for visible UIView layers, but I can't get consistent results for hidden views. I read somewhere (can't recall the source, but it wasn't authoritative) that this is exp

Re: (void *)contextInfo

2010-01-12 Thread Markus Spoettl
On Jan 12, 2010, at 8:51 PM, Rainer Standke wrote: > Here is the code that displays the sheet: > > NSArray *theContextInfo = [[NSArray alloc] init]; > theContextInfo = [NSArray arrayWithObject:objTBD]; > > > [NSApp beginSheet: alertWindow > modalForWindow: [selfw

Re: (void *)contextInfo

2010-01-12 Thread Sean McBride
On 1/12/10 3:04 PM, Sherm Pendley said: >Additionally, I'd recommend making theContextInfo into an instance >variable, rather than passing it through the contextInfo. You can then >write (or @synthesize) an accessor method that encapsulates all of the >relevant memory management into one place, wh

how do you set the value of a UIPickerView programatically? [solved]

2010-01-12 Thread Paul Archibald
First, sorry about my last post with the "RE:Contents of ..." title. My bad. Anyhow, I figured out what was wrong. Seems you need to call [self.view addSubview:picker] to "hook up" the picker to the view controller. I am doing that in my viewDidLoad method. Regards, Paul ___

Re: how do you set the value of a UIPickerView programatically?

2010-01-12 Thread Bertil Holmberg
This should work but would make most sense in viewDidAppear if the user should be able to enjoy the animation. > [picker selectRow:indexOfCurrentValue inComponent:0 animated:YES]; You have set the Pickers delegate? Regards, Bertil___ Cocoa-dev

Re: how do you set the value of a UIPickerView programatically? [solved]

2010-01-12 Thread David Duncan
On Jan 12, 2010, at 12:26 PM, Paul Archibald wrote: > Anyhow, I figured out what was wrong. Seems you need to call [self.view > addSubview:picker] to "hook up" the picker to the view controller. I am doing > that in my viewDidLoad method. If the picker is already a subview of the view controll

Re: NSExtraMIData?

2010-01-12 Thread Mike Abdullah
Turn on NSZombieEnabled. On 12 Jan 2010, at 18:51, Sean McBride wrote: > On 1/11/10 8:10 PM, Greg Parker said: > >> Most likely, you over-released some other object and then an >> NSExtraMIData was allocated at the same address. When you later try to >> use the dead over-released object, the mes

Re: Table object not selected on launch

2010-01-12 Thread Jenny M
Hi Phillip, Hmm, I don't think your solution will work for me. I don't have a didSelectRowAtIndexPath method anywhere in my code. I'm not building an iPhone app, so, I think I can use IB and my components a bit differently. Is there any method anywhere that deselects, either in the table cell or

Re: NSExtraMIData?

2010-01-12 Thread Sean McBride
I guess when dealing with Obj-C objects, NSZombieEnabled=YES together with NSDeallocateZombies=NO does #2 and sorta does #3. But, as I said, I was wondering if there is a way to extend this to all allocations (ie non-objects). Additionally, NSZombieEnabled does nothing under GC, and I'd be intere

Re: (void *)contextInfo

2010-01-12 Thread Rainer Standke
Thanks, everyone, for your help. Rainer On Jan 12, 2010, at 12:19 , Markus Spoettl wrote: On Jan 12, 2010, at 8:51 PM, Rainer Standke wrote: Here is the code that displays the sheet: NSArray *theContextInfo = [[NSArray alloc] init]; theContextInfo = [NSArray arrayWithObject:objTBD];

Re: Table object not selected on launch

2010-01-12 Thread Jenny M
Thanks to a hint from Laurent and a point to the right part of NSArrayController's documentation, I have a solution. I placed this line of code in AppDelegate's awakeFromNib: - [myArrayController setSelectionIndexes:[NSIndexSet indexSet]]; - and UN-checked the "Avoid Empty Selection" chec

Re: NSExtraMIData?

2010-01-12 Thread Greg Parker
On Jan 12, 2010, at 1:52 PM, Sean McBride wrote: > I guess when dealing with Obj-C objects, NSZombieEnabled=YES together > with NSDeallocateZombies=NO does #2 and sorta does #3. > > But, as I said, I was wondering if there is a way to extend this to all > allocations (ie non-objects). Additionall

Re: how do you set the value of a UIPickerView programatically? [solved]

2010-01-12 Thread Paul Archibald
Ahh, now I see it, you are correct. I had been alloc/init'ing some other UI elements that were not created in IB, and this got that treatment, too, so the picker was double-allocated. I need to more careful copy/pasting my own code. On Jan 12, 2010, at 12:53 PM, David Duncan wrote: On Ja

Re: (void *)contextInfo

2010-01-12 Thread Roland King
Nick Zitzmann wrote: If you're using GC, and the pointer's address is being re-assigned, then it probably got finalized behind your app's back, and so you can emulate retain/release in this case by using the disable/enable methods of NSGarbageCollector. I didn't understand that bit. "dis

Re: (void *)contextInfo

2010-01-12 Thread Nick Zitzmann
On Jan 12, 2010, at 5:47 PM, Roland King wrote: > I didn't understand that bit. "disable/enable methods of NSGarbageCollector", > that seems like a very heavy-handed way to stop a pointer from being > collected, just shutting GC off. I didn't mean shutting GC off entirely. I meant disabling co

Re: (void *)contextInfo

2010-01-12 Thread Roland King
ah I see you mean the disableColectorForPointer: and enableCollectorForPointer: methods, sorry I read enable/disable and went to look at those methods Nick Zitzmann wrote: On Jan 12, 2010, at 5:47 PM, Roland King wrote: I didn't understand that bit. "disable/enable methods of NSGarbageColle

Search multiple / all properties in single NSPredicate statement

2010-01-12 Thread Mike Chambers
I am using NSPredicate to filter Mutable Arrays of objects. This works great. However, I have a need to filter on multi object properties in the Array. Basically, a full text search of the object properties. I know I can do this by creating a compound predicate for each field, but I wanted to chec

Managed Object with Getter

2010-01-12 Thread Richard Somers
A property declaration attribute with the getter shown below does not work for a NSManagedObject subclass. @property (nonatomic, retain, getter=isSelected) NSNumber *selected; It produces error "unrecognized selector sent to instance". What did I do wrong? --Richard

Gray Scope Buttons in UISearchBar

2010-01-12 Thread Gerriet M. Denkmann
I have an iPhone app which has a UISearchBar with Scope Buttons. But when I change the colour of the UISearchBar (e.g. to Black Opaque) the scope buttons still are displayed in the default gray. How can I change the color of the scope buttons to be the same (or similar) as the UISearchBar? A re

AppController dealloc is never called. Why?

2010-01-12 Thread Alexander Bokovikov
Hi, All, Perhaps my question is stupid, but this is my first Cocoa project, so I'll try to ask. I've noticed that my main window controller (usually named AppController) is never freed. I don't know where it is allocated, but suppose it happens somewhere within NSApplication. All other wi

Re: AppController dealloc is never called. Why?

2010-01-12 Thread Nick Zitzmann
On Jan 12, 2010, at 9:55 PM, Alexander Bokovikov wrote: > On the other hand, I'm getting BAD_ACCESS exception, if I insert [self > release] within applicationWillTerminate delegate method of my AppController. > So, what is the correct way to free AppController? Don't worry about it. When the t

Re: Drawing A Mutable String

2010-01-12 Thread Andy Lee
On Jan 12, 2010, at 1:29 PM, Michael Craig wrote: > Well, I feel dumb. Your (Andy's) mention of setNeedsDisplay: caught my eye, > and I realized soon after that the button whose method causes invalidStack to > be YES never tells the view the redraw. I still don't entirely understand why > the te