Re: Observing with GC

2008-02-27 Thread Chris Suter
On 27/02/2008, at 5:59 PM, Antonio Nunes wrote: On Feb 26, 2008, at 11:42 AM, Chris Suter wrote: On a side note, it doesn't look like you have to call removeObserver: for notifications registered with NSNotificationCenter. The garbage collection docs state: "For example, a notification c

Re: NSTextField and NSTextAttachment

2008-02-27 Thread Ben Lachman
I'd say the field editor is the problem. NSCell provides setAttributedStringValue: and I assume stores and displays that value as well as reacting to clicks when not editing. Once you begin editing the firstResponder is set to the field editor and your textfield becomes its delegate, so f

Tracking the movement of a CAScrollLayer

2008-02-27 Thread Colin Cornaby
I would like to track the movement of a CAScrollLayer. On a basic level, it's pretty simple. One could add an observer to the bounds key of the scroll layer and receive notifications of when it moves. However, what I want to do is a bit more complicated. I have another layer who's content i

Re: Observing with GC

2008-02-27 Thread Antonio Nunes
On Feb 26, 2008, at 11:42 AM, Chris Suter wrote: On a side note, it doesn't look like you have to call removeObserver: for notifications registered with NSNotificationCenter. The garbage collection docs state: "For example, a notification center should not form strong relationships to reg

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-27 Thread Seth Willits
On Feb 26, 2008, at 3:13 PM, John Stiles wrote: Trying to simulate the drawing behavior of NSCell seems error-prone to me. Since I don't have access to the original code, it would be hard to match its behavior. I'd much rather inherit as much as I can and only customize around the edges.

Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Hi list, I need to load a (multipage) pdf and convert every page to jpg and save to disk. i don't understand why this simple code is not working: PDFDocument *pdfDocument = [[PDFDocument alloc] initWithURL:inputurl]; PDFPage *currentPage = [pdfDocument pageAtIndex:i]; NSImage *image = [[NSIma

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 10:32 AM, Florian Soenens wrote: i don't understand why this simple code is not working: PDFDocument *pdfDocument = [[PDFDocument alloc] initWithURL:inputurl]; PDFPage *currentPage = [pdfDocument pageAtIndex:i]; NSImage *image = [[NSImage alloc] initWithData:[currentPage d

NSComboBoxCell will not select

2008-02-27 Thread Ivan C Myrvold
I have problem with making a NSComboBoxCell keep the value selected. Here is what I am doing: I have an NSOutlineView, where the last column (Change To) is binded to an NSTreeController (Value TreeController.arrangedObjects.c). Some of the values in this column can have two or more values in

Re: NSStringFromClass versus className ?

2008-02-27 Thread Mike Abdullah
Right, clearly you should use that for testing a class. But, what if you want to record the classname so you can instantiate another one or similar later? Mike. On 20 Feb 2008, at 23:37, Kyle Sluder wrote: On Wed, Feb 20, 2008 at 1:23 PM, Mike Abdullah <[EMAIL PROTECTED]> wrote: With this

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Hi Antonio, my pdf document gets created. The index is also valid. The source pdf does display correctly in Preview and i'm using Leopard. Here's my output: 2008-02-27 13:42:14.710 ThumbNailFixedWidthLine[26446:10b] _NXCreateWindow: error setting window property (1002) 2008-02-27 13:42:14.910

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 1:45 PM, Florian Soenens wrote: The source pdf does display correctly in Preview and i'm using Leopard. Here's my output: 2008-02-27 13:42:14.710 ThumbNailFixedWidthLine[26446:10b] _NXCreateWindow: error setting window property (1002) 2008-02-27 13:42:14.910 ThumbNailFix

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Sorry to bother again, i mixed two pieces of code, here's my error output: 2008-02-27 14:35:04.055 ThumbNailFixedWidthLine[28467:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow' 2008-02-27 14:35:04.056 ThumbN

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 2:13 PM, Florian Soenens wrote: thanks for the quick responses, here's what i noticed: if i comment these tree line (the actual drawing), i do not get an error. //[image lockFocus]; //[pdf_rep drawAtPoint:NSMakePoint(0.0,0.0)]; //[image unlockFocus]; So, it must have to

Re: NSComboBoxCell will not select

2008-02-27 Thread Ivan C Myrvold
I found out at last that I had to set my class to be a data source, and implement outlineView:setObjectValue:forTableColumn:byItem: I still uses binding to bind the values of the cells, but it looks like I in addition to that have to implement this method, to get it working. If not anyone ha

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
After googling my error output i discovered a tread about this issue and this is how it get's solved: I need to add this line in the beginning of my main() function: [NSApplication sharedApplication]; Why is this needed as we are talking about a command line utility?? On 27 Feb 2008, at 14:37,

Custom cell with Bindings having strange prints in NSTableView

2008-02-27 Thread Miguel Coxo
Hello, i have a binding setup in IB like this: http://mt15.quickshareit.com/share/picture1f06b0.png where the cellData is a function in the class CPDownload: - (id) cellData { return self; } Then there is the CPDownloadQueue that has a NSArray with CPDownloads, and updates them like this: self

Setting iTunes album art with ScriptingBridge

2008-02-27 Thread Dave Verwer
I am trying to set album art for an iTunesTrack obtained using ScriptingBridge and really getting nowhere with it. I have cobbled the following code together from various sources and code examples on the web: http://pastie.caboo.se/158088 Note that in the code sample, "file" is an NSString conta

Re: Custom cell with Bindings having strange prints in NSTableView

2008-02-27 Thread Miguel Coxo
I have found the reason for the strange print: [super drawInteriorWithFrame: cellFrame inView: controlView]; was left there from a previous version, i still have the random crashes ... On Wed, Feb 27, 2008 at 1:55 PM, Miguel Coxo <[EMAIL PROTECTED]> wrote: > Hello, i have a binding setup in IB l

Re: Can CoreData return only unique results of an attribute

2008-02-27 Thread Jim Correia
On Feb 26, 2008, at 7:34 PM, Adam Gerson wrote: Thanks for the example. What I am looking for is slightly diferent. Lets say I have a entity called FavoriteWebsites with the attributes name and url. The current contents of the object are Name | URL

Re: NSInvocation question

2008-02-27 Thread Hank Heijink
On Feb 25, 2008, at 6:03 PM, Chris Suter wrote: Why don't you just do something like I suggested in my previous e- mail: For every callback you have, write a method on MyDocument: For example: - (void)doStartTrial { [self startTrial:trial]; // Store trial as an instance variable of MyDo

Re: Animated button

2008-02-27 Thread douglas a. welton
On Feb 26, 2008, at 1:49 PM, I. Savant wrote: I'd suggest core animation as the easiest route but i'm sort of partial. For my own enlightenment, can you outline generally how this would be accomplished with Core Animation? I'm very interested. The Core Animation Programming guide has some

Scaled CATextLayer

2008-02-27 Thread Kristof Van Landschoot
Hello, When using a CATextLayer the text seems to be rendered first, and then scaled up to the scale of the layer. This gives very unsharp text at higher scaling levels. Is there a way to make sure the text remains sharp? I can not seem to find any hints in the documentation. I've got similar

Re: Animated button

2008-02-27 Thread I. Savant
> The Core Animation Programming guide has some sample code that might > be of value: > >

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-27 Thread John Stiles
Right, agreed. Ken's idea was that I would implement my own -drawInteriorWithFrame:inView:, which is what I was saying I didn't want to do. Seth Willits wrote: On Feb 26, 2008, at 3:13 PM, John Stiles wrote: Trying to simulate the drawing behavior of NSCell seems error-prone to me. Since I

QTMovieView and glView crash

2008-02-27 Thread Lorenzo
Hi, I can quite load a QT movie on a QTMovieView with setMovie: and play it. This works well unless I simultaneously refresh an openGL view at 60 FPS. The 2 views are on 2 different windows of my Cocoa application, built on 10.4 SDK. So if I don't call the [glView drawRect:rect]; the QT movie play

Apple Help question

2008-02-27 Thread z
I have problems trying to implement Apple Help. All I get is an empty help window without a title. My index.html file is: Yellow Help Book This is my Help My Info.plist includes: CFBundleHelpBookFolder Yellow Help

Missing Core Animation Callbacks or Observing or whatever

2008-02-27 Thread Manfred Schwind
Core Animation is great. But I am missing something: I want to get called if something specific happens at the presentation layer. I want to get "informed" about the state of the animation. An example: When "flipping" a layer by rotating around the y axis, I want to know when the layer pass

Re: Help with PDFPage to NSImage

2008-02-27 Thread Nick Zitzmann
On Feb 27, 2008, at 6:52 AM, Florian Soenens wrote: After googling my error output i discovered a tread about this issue and this is how it get's solved: I need to add this line in the beginning of my main() function: [NSApplication sharedApplication]; Why is this needed as we are talking a

Re: Can CoreData return only unique results of an attribute

2008-02-27 Thread Adam P Jenkins
Maybe the @distinctUnionOfObjects KVC operator can help. I'm not sure you can use it if your ArrayController is bound directly to a ManagedObjectContext, but if you had another entity with a favoriteWebsites relationship, then you could access all of the unique URLs from that relationship

Recent Archives

2008-02-27 Thread Bobby Cronkhite
Hello, I seem to be unable to locate the archives or Cocoa lists from the last year. I need help understanding garbage collection. Even though I've read the Apple documentation several times I don't seem to be able to get rid of a great many memory leaks coming from the Foundation when using the

Re: Recent Archives

2008-02-27 Thread Adam P Jenkins
On Feb 27, 2008, at 12:56 PM, Bobby Cronkhite wrote: Hello, I seem to be unable to locate the archives or Cocoa lists from the last year. I need help understanding garbage collection. http://lists.apple.com/archives/Cocoa-dev/ ___ Cocoa-dev ma

iChat Theatre

2008-02-27 Thread Mark Alldritt
Hi Folks, I've been trying to get a simple demo app running that uses iChat Theatre (InstantMessage.framework) as described in this web page without any success: http://developer.apple.com/leopard/overview/imframework.html Here's the code: // // MyController.m // iChatDemo // // Crea

Re: Apple Help question

2008-02-27 Thread Jerry Krinock
Try the suggestions listed in here http://www.cocoabuilder.com/archive/message/cocoa/2006/4/8/160578 and then let us know if you're still having trouble. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Charting API?

2008-02-27 Thread Chris Schmitt
I want to add some simple bar graphs and pie charts to my project. Is there an apple api for charting or do you need to use a 3rd party product? Thanks In Advance ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin req

Re: Recent Archives

2008-02-27 Thread I. Savant
> I seem to be unable to locate the archives or Cocoa lists from the last > year. I need help understanding garbage collection. The archives are in the same place you subscribed to the list itself: www.lists.apple.com ... there's also cocoabuilder.com ... similarly, typing "cocoa-dev archive

Re: Recent Archives

2008-02-27 Thread I. Savant
On Wed, Feb 27, 2008 at 2:14 PM, I. Savant <[EMAIL PROTECTED]> wrote: > similarly, typing "cocoa-dev archives" produces relevant links. Sorry, that was unclear: I meant typing ... into google. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: Setting iTunes album art with ScriptingBridge

2008-02-27 Thread Bill Monk
On Feb 27, 2008, Dave Verwe wrote: // Add to iTunes iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier: @"com.apple.iTunes"]; iTunesTrack *track = [iTunes add: [NSArray arrayWithObject: [NSURL fileURLWithPath: file]] to: nil]; // Convert to PICT NSData *tiffData = [

Re: Recent Archives

2008-02-27 Thread Bobby Cronkhite
Thanks, I was trying to use the search box and the most recent items being returned were from March of 2007. I see now you can click on the year and go back through the threads. Bobby On 2/27/08 11:14 AM, "I. Savant" <[EMAIL PROTECTED]> wrote: >> I seem to be unable to locate the archives or C

Re: Charting API? (Chris Schmitt)

2008-02-27 Thread David Hoerl
I send Chris a post I made last year on this subject, and the woeful lack of options for us developers (you can search on "Re: Objective C Graphing Packages" in the scitech list). The bottom line: - nothing from Apple - no licensable distributable library from anyone - a few open source good-st

Draging multimple NSWindows simultaneously

2008-02-27 Thread Jorge Luis Chavez Herrera
Hello everyone! I'm trying to figure out a way to make an NSPanel to follow a NSWindow while it is being dragged. The two notifications sent to an NSWindow delegate are only good for knowing if the window is about to move or the window has moved. (NSWindowDidMoveNotification , NSWindowWillMove

Re: Draging multimple NSWindows simultaneously

2008-02-27 Thread John Stiles
You don't need delegates for this. Look into child windows. Jorge Luis Chavez Herrera wrote: Hello everyone! I'm trying to figure out a way to make an NSPanel to follow a NSWindow while it is being dragged. The two notifications sent to an NSWindow delegate are only good for knowing if the wi

Re: Cocoa-dev Digest, Vol 5, Issue 306

2008-02-27 Thread Mario Gajardo Tassara
Thanks John i will try the Quartz direct drawing approach. El 26-02-2008, a las 19:12, [EMAIL PROTECTED] escribió: On Feb 17, 2008, at 5:52 AM, Mario Gajardo Tassara wrote: Hi, im trying to displaying encrypted pdf formated images in cocoa. this is my code to load these images, but nothing i

complex views in a tableview

2008-02-27 Thread Sean McBride
Hi all, I'm looking to put some "complex" content into a tableview, specifically a few controls not directly supported by IB. I've discovered joar's great "Subview-TableView" example and it seems to be the best approach, but I wanted to check with others because it's 4 years old. I'm targeting

Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread Hank Heijink
Hi list, I have a window with a custom view that occupies the entire window, so the little resize corner in the lower right is within the bounds of the view. I noticed that when I draw into the window from the main thread (i.e. the usual way) that resize corner is redrawn when the view is

Re: complex views in a tableview

2008-02-27 Thread j o a r
On Feb 27, 2008, at 9:30 PM, Sean McBride wrote: I've discovered joar's great "Subview-TableView" example and it seems to be the best approach, but I wanted to check with others because it's 4 years old. I'm targeting 10.5.2 or later. Thanks! On 10.5 and later I would recommend NSCollec

programmatically placing GUIs

2008-02-27 Thread Daniel Child
I am trying to place and size segmented controls programmatically on a window controlled by a subclass of NSWindowController. What I'm getting, however, is simply the window as it was initially drawn in IB. I think the problem has to do with loading the window properly and more specifically

Re: Charting API? (Chris Schmitt)

2008-02-27 Thread Barry Wark
Just a little more info... I believe the DataGraph framework (http://www.visualdatatools.com/DataGraph/index.html) is licensable for use in commercial apps. We've had good success with it, though the API takes a bit of getting used to. You might also want to check out Drew McCormack's tutorials on

Re: Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread Hank Heijink
On Feb 27, 2008, at 2:40 PM, Hank Heijink wrote: - (void)updateView { if (useSecondaryThread) { if ([view lockFocusIfCanDraw]) { [view drawFromSecondaryThread:view.bounds]; [[view window] flushWindow];

Re: Event Logging

2008-02-27 Thread Barry Wark
If you're using OS X 10.4 or later, you may want to check out the Apple System Logger facility (a great series of posts on ASL start at http://boredzo.org/blog/archives/2008-01-19/next-week-apple-system-logger). It's not too hard to write your own Objective-C/#define wrapper around ASL to get much

Re: iChat Theatre

2008-02-27 Thread j o a r
On Feb 27, 2008, at 7:47 PM, Mark Alldritt wrote: I never receive IMAVManagerStateChangedNotification notifications when I try and share my application file through the iChat app. My demo project is based on the Cocoa Application template, so there is no notion of a document. Can anyone

Re: iChat Theatre

2008-02-27 Thread Chilton Webb
Hi Mark, On Feb 27, 2008, at 12:47 PM, Mark Alldritt wrote: Can anyone tell me what I might be doing wrong? It took me awhile to make this work in my app, so perhaps I can save you some blood. Sweat and tears I can't help you with. While your app is running, if you drag it onto an active

Re: complex views in a tableview

2008-02-27 Thread Sean McBride
On 2/27/08 10:09 PM, j o a r said: >On 10.5 and later I would recommend NSCollectionView, or alternatively >NSRuleEditor/NSPredicateEditor, depending on what you're trying to >solve. My SubViewTableView was always a hack looking for a proper >solution - And with 10.5 we have that. I haven't used

multiplex serial port data

2008-02-27 Thread Howard Shere
I need to write something that multiplexes data from a serial port device file (/dev file) so that multiple applications can share the data on that port. All of the apps need to be able to read and write to the port. Can anyone recommend the right path to write this thing? Can it be wri

Re: programmatically placing GUIs

2008-02-27 Thread Quincey Morris
On Feb 27, 2008, at 15:21, Daniel Child wrote: In IB, targets / outlets are set as normal. The window delegate is set to File's Owner (the window controller) so that I can call - windowWillLoad to resize all the GUIs prior to loading. Is there anything else I could be missing? 'windowWi

Re: Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread Kyle Sluder
On Wed, Feb 27, 2008 at 2:40 PM, Hank Heijink <[EMAIL PROTECTED]> wrote: > I have a window with a custom view that occupies the entire window, so > the little resize corner in the lower right is within the bounds of > the view. I noticed that when I draw into the window from the main > thread (

Re: Charting API?

2008-02-27 Thread Kyle Sluder
On Wed, Feb 27, 2008 at 2:14 PM, Chris Schmitt <[EMAIL PROTECTED]> wrote: > I want to add some simple bar graphs and pie charts to my project. Is > there an apple api for charting or do you need to use a 3rd party > product? Apple's framework is private. I've been toying with SM2DGraphView, it

Re: Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread j o a r
On Feb 28, 2008, at 12:54 AM, Kyle Sluder wrote: Do not use AppKit from any thread other than your main thread. It is not thread-safe. ...besides the things that are explicitly documented to be thread safe:

Table views with different NSArrayControllers sharing the same data object...

2008-02-27 Thread Keith Blount
Hi, I'm in the process of putting together a small list view based on an NSTableView. It's pretty simple - just a table of data using an NSArrayController, with a data object that provides the array. However, in my app it is possible that the view may appear in a split view with a copy of i

Re: [Workaround] NSShadow changes on 10.5.2?

2008-02-27 Thread Ricky Sharp
On Feb 15, 2008, at 3:27 PM, Ricky Sharp wrote: And this is why I'm really hoping they address the bug I filed (to revert drawing behavior to what it was, yet add an API that developers can choose to set if they want to in order to get new behavior). Nobody should have to attempt to fudge

Re: Charting API? (Chris Schmitt)

2008-02-27 Thread Wade Tregaskis
Apple has the makings of such a framework already - its called GraphKit. If you want GraphKit to become available as a supported Cocoa framework PLEASE enter an enhancement bug - you can reference the same bug my request was dupped to: 3320659 [its low number tells you its a long standing

Re: Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread Chris Suter
On 28/02/2008, at 10:54 AM, Kyle Sluder wrote: On Wed, Feb 27, 2008 at 2:40 PM, Hank Heijink <[EMAIL PROTECTED]> wrote: I have a window with a custom view that occupies the entire window, so the little resize corner in the lower right is within the bounds of the view. I noticed that when I

Re: Table views with different NSArrayControllers sharing the same data object...

2008-02-27 Thread Adam P Jenkins
If the content array is itself a property of another object, and the object containing the array property has indexed accessors for the array property, then observers of the array property will be notified of objects being added, removed or replaced in the array in addition to the whole arr

Endless Hang on Saving a Core Data Document

2008-02-27 Thread Andrew Merenbach
Hi, all, I made a discovery today: a program of mine, which has multiple document types, freezes upon saving for a second time after changes have been made (following a first save). I tried interrupting using GDB, and I also tried using Spin Control. Below is (what I think is relevant) f

Re: Endless Hang on Saving a Core Data Document (addendum)

2008-02-27 Thread Andrew Merenbach
As an important note, I decided to try changing from an SQLite store to an XML store. No more crashing! I'd really like to use SQLite, though, in this program. I have no clue where to look for info on SQLite compatibility with particular types of data, though, if that is indeed the issue.

Dropping into One of Several Columns

2008-02-27 Thread Mike Rossetti
I've got an NSTableView with multiple text column and I'd like to be able to control where a drop of some text goes based on in which column the user is making the drop. Since the validateDrop: member function of the table's data source does not provide a 'proposed column', I'm going to gue

Re: Charting API?

2008-02-27 Thread Herr Thomas Bartelmess
Google Offers an Chart API, you could include it with Webkit. But i think thats not that what you searched. Am 27.02.2008 um 20:14 schrieb Chris Schmitt: I want to add some simple bar graphs and pie charts to my project. Is there an apple api for charting or do you need to use a 3rd party

Re: Charting API?

2008-02-27 Thread Graham
There's also Narrative: https://sourceforge.net/projects/narrative/ I don't know if it's any good but it's Cocoa. S.O.S. On 28/02/2008, at 6:14 AM, Chris Schmitt wrote: I want to add some simple bar graphs and pie charts to my project. Is there an apple api for charting or do you

Re: programmatically placing GUIs

2008-02-27 Thread Ken Worley
On Feb 27, 2008, at 2:25 PM, Daniel Child wrote: I am trying to place and size segmented controls programmatically on a window controlled by a subclass of NSWindowController. What I'm getting, however, is simply the window as it was initially drawn in IB. I think the problem has to do with

Other application's window resize

2008-02-27 Thread Apparao Mulpuri
Hi List, I am planning to develop a sample application, which will do following things: 1. It should provide "Spaces" (introduced in Leopard) functionality. 2. Once the user drops any window on a particular space, that window should be automatically resize according to the destination sp

Re: NSStringFromClass versus className ?

2008-02-27 Thread Kyle Sluder
On Wed, Feb 27, 2008 at 7:17 AM, Mike Abdullah <[EMAIL PROTECTED]> wrote: > Right, clearly you should use that for testing a class. But, what if > you want to record the classname so you can instantiate another one or > similar later? The comment wasn't really directed at you, it was kind of an