Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-05-05 Thread Marco Masser
On 28.04.2010, at 12:45, Marco Masser wrote: On 21.04.2010, at 05:47, Adam R. Maxwell wrote: On Apr 19, 2010, at 8:56 AM, Marco Masser wrote: I'm trying to implement a logging facility for an app that should behave quite the same as OS X's Console.app in terms of displaying the log

Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-28 Thread Marco Masser
On 21.04.2010, at 05:47, Adam R. Maxwell wrote: On Apr 19, 2010, at 8:56 AM, Marco Masser wrote: I'm trying to implement a logging facility for an app that should behave quite the same as OS X's Console.app in terms of displaying the log, i.e. an NSTableView with varying row heights. I

Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-20 Thread Marco Masser
Hi, I'm trying to implement a logging facility for an app that should behave quite the same as OS X's Console.app in terms of displaying the log, i.e. an NSTableView with varying row heights. I got it working so far, but there are major drawing glitches when resizing the window or scrolling

Re: Memory Leaks in CocoaEcho Sample

2008-10-23 Thread Marco Masser
Then the bug is somewhere in your changes. The only thing you should do is remove the retain calls. If you also remove the release calls, you will still have the memory leaks. Here's what openStreams should look like: - (void)openStreams { [inputStream setDelegate:self]; [outputStream

Re: Get text width outside a view

2008-10-22 Thread Marco Masser
I'm trying to calculate the width of a text Cocoa: NSAttributedString(AppKitAdditions) implements a method named - size which gives you the size as if the string was drawn with the attributes set. Cocoa Touch: NSString(UIStringDrawing) has some methods starting with - sizeWithFont...

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Marco Masser
I'm just building my own application based on the CocoaEcho sample from Apple. But the CocoaEcho Client is full of memory leaks. These leaks occur, when you select and deselect a CocoaEchoServer some times by clicking on them and again next to them Leaked Objects are: SCNetworkReachability

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Marco Masser
P.S.: I just tested NSGradient's -getColor:location:atIndex: method (the only one I could find that returns an object by reference) and here too, the first parameter (an NSColor **) has a retain count of 1 and is not autoreleased. How do you know that it isn't autoreleased? I don't know

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Marco Masser
Sorry about any confusion that I may have caused! The color I got from the NSGradient's -getColor:location:atIndex: actually was autoreleased, but the NSGradient was not. Therefore, the color always had an retain count of 1. Sorry about that. If you are trying to find a leak, then use

Re: NSOutlineView developer example

2008-09-04 Thread Marco Masser
so far so good. But when I change the initWithPath to initWithPath:@/Volumes/MyDisk/path/to/any/directory, as Ben said, i want the same behaviour like with the / only, but a tree from my path there. But this does not happen. Instead, i get a single row with the last path component with

Circular NSSlider: How to get the same behaviour as in Quartz Composer?

2008-09-04 Thread Marco Masser
Hi! In Quartz Composer, published input ports of type index or number have a text field and a circular NSSlider in the viewer's parameter panel. This NSSlider behaves exactly like I would like mine to behave, but I can't figure out how to do that. What I'm getting: One full rotation

Re: Preferred Wrapper for TCP Sockets Over Local Network?

2008-08-16 Thread Marco Masser
I would like to be able to use an SSL certificate, but, beyond that, my needs aren't exotic. Ease-of-use and reliability would be a big plus. I've also considered a Ruby class that would handle the TCP messaging and pass responses back to the Cocoa-based app. Any suggestions? Maybe

Re: Why does Core Data retain an object when one of that object's attributes is changed?

2008-08-14 Thread Marco Masser
Two words. Un Do. But of course. Thanks. I don't know how I could not figure that out, considering that I am disabling enabling the undo manager and grouping actions together in other parts of my app already. For future reference:

Re: Dumb Q

2008-08-06 Thread Marco Masser
I want to make a simple filter that takes the output of ls -la and reformats it to appear more like the MS-DOS directory listing. So, I would do something like ls -la | mydosfilter and get a directory listing with the filename first, the # bytes second, then the timestamp (leaving out

Re: Core Data Backup on App Start

2008-07-24 Thread Marco Masser
I have a boolean set for my preferences to check whether the user wants to backup the database at each start. My only question is how should I do it? I already log whether they want it or not, so I have got that far. Should I read the contents of my backup file? How could I find that

Re: Weak link usage? @property?

2008-07-22 Thread Marco Masser
So what's the correct form of weak linking to avoid retain cycles? Please be aware that weak has a different meaning depending on the context (GC vs non-GC). Docs: Note: In memory management, a nonretained object reference is known as a weak reference, which is something altogether

Re: Binding TableColumn Programatically

2008-07-22 Thread Marco Masser
but in the above added tableColumn data is not populated and an opening brace is shown in each row of that column. To me, this sounds like some data is being read and displayed in the table, but it's not quite what you want. If you do an NSLog(@%@, someArray), the -description method will

Re: StopWatch Application Help

2008-07-20 Thread Marco Masser
I'm trying to make a stopwatch application, and I'm having trouble getting the Timer to fire, and then having the Text field being updated. Here's the code: The essential part is missing: the method in which you are updating your text field. - (IBAction)startWatch:(id)sender {

Re: StopWatch Application Help

2008-07-20 Thread Marco Masser
Thanks. That solved many issues. However, I still have another question. How about if I wanted the Timer to start at from 0, and then go to 1, 2, 3, etc..., not from January 1st like - timeIntervalSinceReferenceDate does? I tried doing timeIntervalSinceDate:, but it wouldn't work, and

Re: NSTimer, and NSTimeInterval help?

2008-07-19 Thread Marco Masser
I'm planning on making a stopwatch where the timer fires and then the text field updates by each second. I read online that I should use NSTimeInterval for this, as well as NSDate, and NSTimer. My main question is, how do you use NSTimeInterval? NSTimeInterval is just a typedef for

Re: NSTimer, and NSTimeInterval help?

2008-07-19 Thread Marco Masser
Should I also use NSRunLoop? Whether you have to do something with run loops depends on what exactly you want to do. Maybe the default behaviour you get by using one of the -scheduledTimer... methods is already what you need. Take a look at the docs for NSTimer and NSRunLoop:

Re: Cocoa : Drag/ drop from a table view onto a NSTextfield

2008-07-13 Thread Marco Masser
1. I have a text field and a table view in 2 different windows. I drag and drop a row from the table view to the textfield. Now, after drop, i would want to have a database transaction. I would want to validate the text that i have dropped onto the text field, and save the text that i have

Re: Adding a new type of NSButton

2008-06-25 Thread Marco Masser
Once it is pushed it stays pushed - pushing it again does not revert it back to unpushed state. You could simply hook up an appropriate kind of a standard NSButton to an IBAction that disables the button. That way, you can't click it anymore and it stays pushed. If you don't want it to be

Re: NSPanel should not close on command-W

2008-06-21 Thread Marco Masser
I just added a panel to my program. I do not want that the panel closes on command-W. I did setBecomesKeyOnlyIfNeeded:YES. So It does not close if there is a document window. But if the last one is closed (with keyboard: command-W) also the panel closes. I'm taking a stab in the dark here,

Re: Read PSD-Layers with NSImage

2008-06-16 Thread Marco Masser
[...] any methods which read PSD-Layers. OS X reads psd's natively, so i'm curious where that functions/methods are. [...] I dropped Boris a mail about that directly, but for completeness' sake: QuickTime seems to be the way to go: GraphicsImportSetImageIndex(). A quick Google code

Re: QCView loadCompositionFromFile

2008-06-02 Thread Marco Masser
I'm trying to load a composition into a QCView using the loadCompositionFromFile. I was obtaining the path from a NSOpenPanel but loadCompositionFromFile was returning NO. I tried passing in a hard coded path as a parameter, getting the same result NO.I'm sure the paths are right as I