viewDidUnload while view is still onscreen

2010-02-05 Thread Charles Burnstagger
The viewDidUnload: method for one of my iPhone app's views gets called even when that view and all its subviews are still onscreen. (I assume in response to the didReceiveMemoryWarning: message). Since the view and all of its subviews are still needed at that point (they are onscreen), how shou

Re: creating an NSSearchField subclass like Safari

2010-02-05 Thread Matthew Lindfield Seager
On Saturday, February 6, 2010, Neil Allain wrote: > - search menu opens when the user enters text that has possible matches > (rather than just when the button is clicked) > - search menu will update the matches while the user continues to type Since no one more qualified has replied yet I'll ch

Re: using a tableview delegate

2010-02-05 Thread Michael Thon
On Feb 5, 2010, at 10:52 PM, Graham Cox wrote: > > On 06/02/2010, at 1:38 AM, Michael Thon wrote: > >> I guess it must come from NSTableView. > > > A guess isn't a lot to go on. Set a break point on objc_exception_throw and > find out? Your reply prompted me to check Stop on Objective-C Exc

Re: Memory Problems

2010-02-05 Thread Adam R. Maxwell
On Feb 5, 2010, at 5:49 PM, Greg Robertson wrote: > I am trying to parse a large CSV (5MB) file using some code I found here: > http://www.macresearch.org/cocoa-scientists-part-xxvi-parsing-csv-data > > but I am getting what I think is an out of memory error part way through, the > error is: >

Re: Memory Problems

2010-02-05 Thread Jens Alfke
On Feb 5, 2010, at 5:49 PM, Greg Robertson wrote: > I'm fairly certain I do not have a memory leak it is just that the NSString > is very large. Is there anyway to increase the memory allocated or clean up > the code to reduce its memory usage? Use an NSAutoreleasePool (check the docs) inside

Memory Problems

2010-02-05 Thread Greg Robertson
I am trying to parse a large CSV (5MB) file using some code I found here: http://www.macresearch.org/cocoa-scientists-part-xxvi-parsing-csv-data but I am getting what I think is an out of memory error part way through, the error is: DataImport(1324,0xa09f3500) malloc: *** mmap(size=16777216) fai

Re: Versioning / increasing build number

2010-02-05 Thread Stefan Wolfrum
thanks a lot for both replies!! I don't know which approach to follow though. I'm currently not using a versioning system so maybe Jonathan's method is sufficient. However, I like Gwynne's method, too... *sigh* But at least: problem solved! Thanks and sorry: I'll spend more time with Google nex

Re: NSScrollView & its width

2010-02-05 Thread Knut Lorenzen
Am 05.02.2010 um 17:41 schrieb Ross Carter: >> I've tried setting the documentView's frame width to the width of the >> largest picture. That sort of works, but as soon as the window (or the view) >> is resized, everything snaps back to the undesired state. > > Try using setMinSize: on the NST

Re: NSScrollView & its width

2010-02-05 Thread Knut Lorenzen
Am 05.02.2010 um 01:10 schrieb Mark Sanvitale: <...> > (I repeat, this is only a somewhat educated stab-in-the-dark, i.e. I have > used NSTextContainer's setWidthTracksTextView method. More informed people > should still be encouraged to reply.) Thanks for your thoughts, Mark. Settings setW

Re: Versioning / increasing build number

2010-02-05 Thread Gwynne Raskind
On Feb 5, 2010, at 1:56 PM, jonat...@mugginsoft.com wrote: >> 2) Right now the file doesn't get built new every time I build my >> application. So the number isn't increasing yet. How can this be achieved? > I use the following in a script phase to get a perpetually increasing build > number. >

Re: logic problem. adding sine wave pattern to dynamic float

2010-02-05 Thread Kyle Sluder
On Fri, Feb 5, 2010 at 1:55 PM, Graham Cox wrote: > Vibrato is Frequency Modulation. The general formula for that is: We've been over these details on the coreaudio-api list very recently, in response to Chunk's post there. Interested parties might consider reading that thread, rather than rehash

Re: logic problem. adding sine wave pattern to dynamic float

2010-02-05 Thread Graham Cox
On 06/02/2010, at 1:02 AM, Chunk 1978 wrote: > help would be greatly appreciated. Vibrato is Frequency Modulation. The general formula for that is: y(t) = A * sin( 2 * π * fc * t + I * sin( 2 * π * fm * t)) Where fc is the 'carrier' or signal being modulated and fm is the modulation. A is

Re: using a tableview delegate

2010-02-05 Thread Graham Cox
On 06/02/2010, at 1:38 AM, Michael Thon wrote: > I guess it must come from NSTableView. A guess isn't a lot to go on. Set a break point on objc_exception_throw and find out? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Mixing TableView Bindings

2010-02-05 Thread Joe
On Feb 5, 2010, at 9:52 AM, cocoa-dev-requ...@lists.apple.com wrote: > >> I have a NSTableView with a column of checkboxes. I have the checkbox value >> bound to an NSInteger instance in a class which is in an array bound as the >> content to an array controller. > > The checkbox cell should

Re: does result of LSSharedFileListInsertItemURL() need to be released on return if GC is enabled ?

2010-02-05 Thread Dave Carpeneto
Nick Zitzmann wrote: On Feb 5, 2010, at 11:34 AM, Dave Carpeneto wrote: ... do I need to follow this advice if I enable garbage collection ? I would have thought that this was not needed, but the 'has to be' wording above kinda worries me.

Re: Debugging (apparently) random retain loop bug (NSArrayController)

2010-02-05 Thread Keith Blount
Hi, Graham - I think your solution fixed it, thanks! I finally caught a situation in which it always crashed: when a document window gets closed in my app, it automatically saves any unsaved data. This can take a second or two for large projects, but if as it was saving I immediately went to th

Re: Cocoa text via Quartz CGLayer

2010-02-05 Thread David Duncan
On Feb 5, 2010, at 7:46 AM, Sander Stoks wrote: > I want to draw rotated text, and I found out that the regular Cocoa Text > drawing in that case looks surprisingly bad. I posted about this before, and > got the suggestion of drawing to an offscreen bitmap instead, and rotating > that. That w

SourceView example

2010-02-05 Thread Trygve Inda
Does anyone have a more basic equivalent of Apple's SourceView example? It is a lot of code and is overkill. I am trying to implement a source/outline view like the Finder/iTunes etc, but this example has me digging through piles of useless complexity. Thanks, Trygve __

Re: does result of LSSharedFileListInsertItemURL() need to be released on return if GC is enabled ?

2010-02-05 Thread Nick Zitzmann
On Feb 5, 2010, at 11:34 AM, Dave Carpeneto wrote: > ... do I need to follow this advice if I enable garbage collection ? I would > have thought that this was not needed, but the 'has to be' wording above > kinda worries me.

Re: Versioning / increasing build number

2010-02-05 Thread jonat...@mugginsoft.com
On 5 Feb 2010, at 10:40, Stefan Wolfrum wrote: > > 2) Right now the file doesn't get built new every time I build my > application. So the number isn't increasing yet. How can this be achieved? > I use the following in a script phase to get a perpetually increasing build number. #!/bin/bash #

does result of LSSharedFileListInsertItemURL() need to be released on return if GC is enabled ?

2010-02-05 Thread Dave Carpeneto
Hi all - the LaunchServices/LSSharedFileList.h file states: /* * LSSharedFileListInsertItemURL() ... * Result: *Reference to new item. Has to be released with CFRelease when the *item is not needed anymore. * ... do I need to follow this advice if I enable garbage collection ? I woul

Re: Versioning / increasing build number

2010-02-05 Thread Stefan Wolfrum
Okay, found & read Chris Hanson's blog article from 2005: http://chanson.livejournal.com/125568.html I totally agree with the guy who wrote the first comment! So, looks like agvtool is the wrong path to follow if I want an integer build number that just increases everytime I hit cmd-R or cmd-Y o

Re: Debugging (apparently) random retain loop bug (NSArrayController)

2010-02-05 Thread Matt Neuburg
On Fri, 5 Feb 2010 12:11:18 +1100, Graham Cox said: > >Unfortunately it is a bugger to track down 'who is retaining me' and as far as I know there isn't much to help out with that. Why not use Instruments? You can record reference counts, and then every retain / release for every object can be ex

Re: logic problem. adding sine wave pattern to dynamic float

2010-02-05 Thread Jens Alfke
On Feb 5, 2010, at 6:02 AM, Chunk 1978 wrote: > however, if you look at those numbers they are not much of a sine > wave. the reason, as far as i can see, is that self.pitch is adding > itself along with the sine wave increments. Right. You have to remember the base pitch and add the sin value

Re: Extract ID Value Into UILabel.

2010-02-05 Thread Jens Alfke
On Feb 4, 2010, at 11:44 PM, Philip Juel Borges wrote: > This code, HTMLverseLabel.text = [webView > stringByEvaluatingJavaScriptFromString:@"document.title"]; extracts the title > of any HTML file that is loaded in the UIWebView into a UILabel . So title > becomes a general pointer that is o

Re: Mixing TableView Bindings

2010-02-05 Thread Matt Neuburg
On Wed, 3 Feb 2010 08:32:53 -0700, Joe said: >Hello, > >I have a NSTableView with a column of checkboxes. I have the checkbox value bound to an NSInteger instance in a class which is in an array bound as the content to an array controller. When the program starts the column is filled with 16 rows

Re: NSScrollView & its width

2010-02-05 Thread Ross Carter
> I've tried setting the documentView's frame width to the width of the largest > picture. That sort of works, but as soon as the window (or the view) is > resized, everything snaps back to the undesired state. Try using setMinSize: on the NSTextView.

Cocoa text via Quartz CGLayer

2010-02-05 Thread Sander Stoks
Hello all, I noticed an interesting thing when using Cocoa Text via an intermediate Quartz CGLayer. I want to draw rotated text, and I found out that the regular Cocoa Text drawing in that case looks surprisingly bad. I posted about this before, and got the suggestion of drawing to an offscre

creating an NSSearchField subclass like Safari

2010-02-05 Thread Neil Allain
I'm looking to create an NSSearchField that behaves like the one in safari. Primarily I want the following: - search menu includes search matches (Suggestions) as well as recent searches - search menu opens when the user enters text that has possible matches (rather than just when the button is

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Stefan Wolfrum
Problem solved! :-) Just built my main menu from the ground up new. Now it's there on 10.5, too & I'm happy! :-) Sorry for bothering you and thanks to those who helped! :-) Have a nice #FollowFriday & weekend, Stefan. Am 05.02.2010 um 14:41 schrieb Dave Keck: >> still seeking the answer for t

Re: using a tableview delegate

2010-02-05 Thread Michael Thon
On Feb 5, 2010, at 12:13 PM, Graham Cox wrote: > > On 05/02/2010, at 9:55 PM, Michael Thon wrote: > >> Instead of putting my delegate methods in the window controller, should I >> instead subclass NSArrayController and put the delegate methods in there? >> Doesn't make sense to me to make a

logic problem. adding sine wave pattern to dynamic float

2010-02-05 Thread Chunk 1978
this is mostly a logic problem, so i apologize for my question not being cocoa specific. i'm attempting to add my own continuous pitch variation effect (vibrato) by assigning my sound's pitch to the path of a sine wave. this is my callback method, which is repeating every 1/30 of a second. - (voi

Re: pdfkit - changing background color

2010-02-05 Thread Duke Normandin
On Fri, 5 Feb 2010, Antonio Nunes wrote: > On 4 Feb 2010, at 18:50, Duke Normandin wrote: > > > is there a way to allow for the customization of the background color > > while viewing a pdf document using pdfkit? > > Yes. Read the documentation on PDFView's "drawPage:" method. It makes it very >

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Dave Keck
> still seeking the answer for the strange menu behaviour ... Standard debug tactics apply: start with an empty project and gradually transform it to your full project until the problem presents itself (or vice-versa, of course.) ___ Cocoa-dev mailing l

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Stefan Wolfrum
So far I just found out that the 2nd line (udName = (null)) has nothing to do with the problem. It's just an NSLog message I print out to test one of my pointers (something with NSUserDefaults). still seeking the answer for the strange menu behaviour ... :-/ Am 05.02.2010 um 10:49 schrieb Stefa

Re: Mixing TableView Bindings

2010-02-05 Thread Jerry Krinock
On 2010 Feb 03, at 07:32, Joe wrote: > I have a NSTableView with a column of checkboxes. I have the checkbox value > bound to an NSInteger instance in a class which is in an array bound as the > content to an array controller. The checkbox cell should not be bound to anything. (Note: It's a c

Re: using a tableview delegate

2010-02-05 Thread Graham Cox
On 05/02/2010, at 9:55 PM, Michael Thon wrote: > Instead of putting my delegate methods in the window controller, should I > instead subclass NSArrayController and put the delegate methods in there? > Doesn't make sense to me to make a subclass just to add delegate methods. No, it can be an

Re: using a tableview delegate

2010-02-05 Thread Jack Carbaugh
your controller, whether its a window controller or an array controller can be the delegate ... you either have to set it in IB or use tableViewObject setDelegate. since you are using an arraycontroller to drive the table, i'd recommend placing it there. On Feb 5, 2010, at 5:55 AM, Michael

using a tableview delegate

2010-02-05 Thread Michael Thon
I have bound an NSTableView to an array controller which is set to entity mode to fetch data from the managed object context. I would like override a method in the table view delegate protocol to control how data are displayed in the cell. When I set the table view's delegate to the window con

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Stefan Wolfrum
Thanks, Matt. That's odd, however, because I did not make any calls to SetMenuItemHierarchicalMenu at all by myself. It sure was called by the framework but I don't know how I managed to provide an invalid parameter ... :-( I'll look into it more deeply. Thanks for the hint to MacErrors.h! Am

Versioning / increasing build number

2010-02-05 Thread Stefan Wolfrum
A question about versioning. Information seems a bit sparse on this according to a few Google/cocoa-dev archives/ADC/Apple Discussions searches. I want to have a consecutive build number (an integer counting up each new build) displayed in my application (in an NSTextField, About dialog). Now I

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Matt Gough
On 5 Feb 2010, at 09:49:19, Stefan Wolfrum wrote: > Feb 5 10:45:52 Tigger Twunes[74359]: SetMenuItemHierarchicalMenu() failed > with error -50 That is paramErr (in MacErrors.h). Basically you passed an invalid parameter into SetMenuItemHierarchicalMenu Matt Gough_

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Stefan Wolfrum
Oh! Very interesting! Thanks for the reminder! The system.log has two entries regarding this problem: Feb 5 10:45:52 Tigger Twunes[74359]: SetMenuItemHierarchicalMenu() failed with error -50 Feb 5 10:45:52 Tigger Twunes[74359]: udName = (null) So what does THIS tell me? What is error -50? Goog

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Mike Abdullah
When in doubt, check the console log. On 5 Feb 2010, at 09:01, Stefan Wolfrum wrote: > Thanks, Graham, for the quick reply! :-) > > However, I checked the setting in IB and it was already set to 10.5. > Plus, I don't get any warnings from IB. > > *clueless* > Stefan. > > Am 05.02.2010 um 09:47

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Stefan Wolfrum
Thanks, Graham, for the quick reply! :-) However, I checked the setting in IB and it was already set to 10.5. Plus, I don't get any warnings from IB. *clueless* Stefan. Am 05.02.2010 um 09:47 schrieb Graham Cox: > > On 05/02/2010, at 7:27 PM, Stefan Wolfrum wrote: > >> strange behaviour of my

Re: Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Graham Cox
On 05/02/2010, at 7:27 PM, Stefan Wolfrum wrote: > strange behaviour of my application. I wrote it on my 10.6.2 machine with the > latest Xcode and with target 10.5. > Runs perfectly on my 10.6 machines but on my 10.5.8 machine the main menu is > missing! > Just the Apple logo is there but even

Main menu missing in 10.5. There in 10.6

2010-02-05 Thread Stefan Wolfrum
Hi all, strange behaviour of my application. I wrote it on my 10.6.2 machine with the latest Xcode and with target 10.5. Runs perfectly on my 10.6 machines but on my 10.5.8 machine the main menu is missing! Just the Apple logo is there but even the application menu (nam of my application in

Re: NSOutlineView parentobject

2010-02-05 Thread Graham Cox
On 05/02/2010, at 5:21 PM, Poonam Virupaxi Shigihalli wrote: > My team member banupriya, working with me in the same project , she had > posted the query since she got a reply from the list saying the query is on > hold . > so i posted it on her behalf. > > sorry for inconvenience. Neverthe