Re: CoreData Property access compiles, but fails at runtime

2008-07-20 Thread Ben Trumbull
You probably should be using @synthesize instead For modeled Core Data properties, @dynamic is better. - Ben ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

re: Autosaving in an NSPersistentDocument

2008-07-20 Thread Ben Trumbull
Rick, There's a difference in NSDocument parlance between "save", "save as", "save to", and "auto save". None of those things are "saves automatically, after a timer or notification" You can easily implement "saves automatically". Apps like iCal simply save at the end of the event, pigg

Re: Outline View not retaining objects it uses. Why?

2008-07-20 Thread Ken Thomases
On Jul 19, 2008, at 7:52 PM, Paul Sargent wrote: While you're right I would return different objects if I was called twice, I'm not. As I understand it the Outline View will only ask for objects when it knows the data has changed (e.g. after a reloadData or reloadItem call) at which point i

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-20 Thread Ken Thomases
On Jul 18, 2008, at 11:53 PM, Rick Mann wrote: I realize after all this, it's not really the Dot Syntax I need. I need to know how a property name (starts with lower-case letter) is transliterated into the getter/setter names. The dot syntax uses the getter and setting specified for the pro

Re: drawRect infinite loop -- argh!

2008-07-20 Thread Andy Lee
On Jul 19, 2008, at 11:51 PM, Brian Hughes wrote: How do I track down the cause of an infinite loop in my drawRect method. Have you tried putting a breakpoint in it? Are there any other custom views in your view hierarchy, and if so, what do *their* -drawRect: methods look like? One possib

can't find NSDefaultRunLoopMode in 10.4.x

2008-07-20 Thread Matt Connolly
I'm writing a preference pane which uses a timer added to the current run loop in the mode NSDefaultRunLoopMode. It seems that 10.4.x systems can't find this symbol with a dyld link error at load time, and the preference pane fails to load on 10.4.x systems. Works fine on 10.5.x. My prefp

Re: can't find NSDefaultRunLoopMode in 10.4.x

2008-07-20 Thread Stephen J. Butler
On Sun, Jul 20, 2008 at 3:58 AM, Matt Connolly <[EMAIL PROTECTED]> wrote: > I'm writing a preference pane which uses a timer added to the current run > loop in the mode NSDefaultRunLoopMode. > > It seems that 10.4.x systems can't find this symbol with a dyld link error > at load time, and the prefe

Re: Outline View not retaining objects it uses. Why?

2008-07-20 Thread Paul Sargent
On 20 Jul 2008, at 09:02, Ken Thomases wrote: On Jul 19, 2008, at 7:52 PM, Paul Sargent wrote: While you're right I would return different objects if I was called twice, I'm not. As I understand it the Outline View will only ask for objects when it knows the data has changed (e.g. after a

Re: Outline View not retaining objects it uses. Why?

2008-07-20 Thread ajb . lists
On Jul 20, 2008, at 5:25 AM, Paul Sargent wrote: wasn't really expecting the view to keep a cache at all. I was expecting it to request the item each time it wanted information about it (in which case an returning an autoreleased object seemed reasonable). It may not have been your inte

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-20 Thread Jean-Daniel Dupas
Le 20 juil. 08 à 10:33, Ken Thomases a écrit : On Jul 18, 2008, at 11:53 PM, Rick Mann wrote: I realize after all this, it's not really the Dot Syntax I need. I need to know how a property name (starts with lower-case letter) is transliterated into the getter/setter names. The dot syntax

NSDocument's isDocumentEdited

2008-07-20 Thread John Love
Within MyDocument's isDocumentEdited I have code to determine whether MyDocument is edited and return the BOOLean flag accordingly. I then discovered that the only way to set the window's "dirty" flag was to *explicitly* call [window setDocumentEdited:editedFlag] within other methods by duplicatin

Obtaining the number of characters in a string

2008-07-20 Thread Phil Faber
Still struggling with documentation! Simple task. I have two text fields (text1 & text2) and all I'm trying to achieve is to put into text2 a number specifying how many characters there are in the text in text1. I started with: [text2 setStringValue:[text1 stringValue]]; ..just to make s

Re: Obtaining the number of characters in a string

2008-07-20 Thread Tim Isted
Try using [text2 setStringValue:[NSString stringWithFormat:@"%i", [[textField1 stringValue] length]]]; Using setIntValue on a text field won't set the text field's stringValue to be a string from that int. Tim On 20 Jul 2008, at 12:56, Phil Faber wrote: Still struggling with document

Re: Obtaining the number of characters in a string

2008-07-20 Thread Ron Fleckner
On 20/07/2008, at 9:56 PM, Phil Faber wrote: Still struggling with documentation! That might be because the documentation makes the reasonable assumption that you already know how to use C and Objective-C. Simple task. I have two text fields (text1 & text2) and all I'm trying to achi

Re: NSDocument's isDocumentEdited

2008-07-20 Thread Graham Cox
Normally you "tell" a document that it is edited in one of two ways - either a) by maintaining an Undo stack in which case it "just works", and b) by calling -updateChangeCount: The method you mention is a lower level method that is not meant to be overridden, as far as I'm aware. If you us

Re: Obtaining the number of characters in a string

2008-07-20 Thread Graham Cox
You can also use a formatter (which can be set up in IB) that allows you to call setIntValue: on a text field and have it display something sensible. Not sure if that will help or hinder, but it's there FWIW, hth Graham On 20 Jul 2008, at 10:12 pm, Tim Isted wrote: Try using [text2 se

Re: Dot Syntax docs missing?

2008-07-20 Thread Bill Royds
On 19-Jul-08, at 22:42:05 , Marcel Weiher <[EMAIL PROTECTED]> wrote: On Jul 19, 2008, at 18:34 , Ian Joyner wrote: On 19/07/2008, at 11:36 PM, Michael Ash wrote: The universe of programming languages extends far beyond this little island of ALGOL-lookalikes. Objective-C messaging syntax

Re: Obtaining the number of characters in a string

2008-07-20 Thread Andy Lee
On Jul 20, 2008, at 8:12 AM, Tim Isted wrote: Try using [text2 setStringValue:[NSString stringWithFormat:@"%i", [[textField1 stringValue] length]]]; Using setIntValue on a text field won't set the text field's stringValue to be a string from that int. I believe this is incorrect. Try s

Re: opaque types in NSArray

2008-07-20 Thread Michael Ash
On Sun, Jul 20, 2008 at 12:28 AM, lajos kamocsay <[EMAIL PROTECTED]> wrote: > It seems that in order to add an opaque type (for example CFPathRef) to an > NSArray it needs to be wrapped into an object. What's the best way of doing > this? I assume you mean a CGPathRef. That's a CFType, and all CFT

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-20 Thread mmalc crawford
On Jul 20, 2008, at 4:17 AM, Jean-Daniel Dupas wrote: The dot syntax uses the getter and setting specified for the property in the @property declaration. As documented[1], if you don't explicitly supply getter or setter names in that directive, it defaults to the property name for the get

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-20 Thread Clark Cox
On Sun, Jul 20, 2008 at 4:17 AM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > > Le 20 juil. 08 à 10:33, Ken Thomases a écrit : > >> On Jul 18, 2008, at 11:53 PM, Rick Mann wrote: >> >>> I realize after all this, it's not really the Dot Syntax I need. I need >>> to know how a property name (starts

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-20 Thread Jean-Daniel Dupas
Le 20 juil. 08 à 16:31, Clark Cox a écrit : On Sun, Jul 20, 2008 at 4:17 AM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: Le 20 juil. 08 à 10:33, Ken Thomases a écrit : On Jul 18, 2008, at 11:53 PM, Rick Mann wrote: I realize after all this, it's not really the Dot Syntax I need. I need

Re: opaque types in NSArray

2008-07-20 Thread lajos kamocsay
Thanks! (I did mean CGPathRef..) -lajos On Jul 20, 2008, at 10:25 AM, Michael Ash wrote: On Sun, Jul 20, 2008 at 12:28 AM, lajos kamocsay <[EMAIL PROTECTED]> wrote: It seems that in order to add an opaque type (for example CFPathRef) to an NSArray it needs to be wrapped into an object. What

Being notified of changes to a file

2008-07-20 Thread Yann Disser
Hi everyone. I am trying to execute a ruby script from within a Cocoa application. I want to use NSTask (any better ideas?). My scripts outputs its progress by printing single lines on standard out containing percentages (e.g. "15%"). How can I update my application continuously depending

How to get a table column header with an image instead of text?

2008-07-20 Thread Marc Respass
Hi All, I have run a number of searches and cannot find any documentation nor examples for putting an image in a table column header. I tried setting the table header column cell to an NSImageCell but that failed fabulously. It seems that I need to sub-class NSTableHeaderCell and draw the

Re: How to get a table column header with an image instead of text?

2008-07-20 Thread Marc Respass
Hi again, I hate answering my own question but I did figure it out. I sub- classed NSTableHeaderCell then created an instance using initImageCell. Then it occurred to me that it seemed a bit silly. If I can init an image cell, maybe I can just set the cell. So, create an outlet to the colu

looking for help with http post example

2008-07-20 Thread Richard Nichols
Hi I'm looking for a simple example that will show me how to do an http POST with user and password in cocoa. All I want to do is send some text to a php script but it expects the see the user and password and I'm not sure what classes to use and how to set them up. I've looked at a num

Re: How to get a table column header with an image instead of text?

2008-07-20 Thread Jean-Daniel Dupas
Le 20 juil. 08 à 19:54, Marc Respass a écrit : Hi again, I hate answering my own question but I did figure it out. I sub- classed NSTableHeaderCell then created an instance using initImageCell. Then it occurred to me that it seemed a bit silly. If I can init an image cell, maybe I can jus

Re: How to get a table column header with an image instead of text?

2008-07-20 Thread Adam R. Maxwell
On Jul 20, 2008, at 10:57 AM, Jean-Daniel Dupas wrote: Le 20 juil. 08 à 19:54, Marc Respass a écrit : Hi again, I hate answering my own question but I did figure it out. I sub- classed NSTableHeaderCell then created an instance using initImageCell. Then it occurred to me that it seemed a

Re: looking for help with http post example

2008-07-20 Thread Jean-Daniel Dupas
Le 20 juil. 08 à 19:55, Richard Nichols a écrit : Hi I'm looking for a simple example that will show me how to do an http POST with user and password in cocoa. All I want to do is send some text to a php script but it expects the see the user and password and I'm not sure what classes to

Re: drawRect infinite loop -- argh!

2008-07-20 Thread Brian Hughes
Thanks for all of the replies. I do use the debugger, but even with the debugger I couldn't figure out why it is looping. Obviously, there is something I am not understanding which is why I am writing to cocoa-dev. I also removed the NSLog statement but it is still looping. I can't see it in

StopWatch Application Help

2008-07-20 Thread Eric Lee
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: AppController.h @interface AppController : NSObject { IBOutlet NSTextField *textField; NSTi

Re: looking for help with http post example

2008-07-20 Thread Richard Nichols
Thank you for the link, I'm missing something, how do I get the user and password information inserted? As a little additional information, I'm trying to talk to a php script that has an API similar to Twitter. So I need to have user password and UTF8 text. It should be simple but I've b

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 {

drawRect doesn't get called when using CoreAnimation?

2008-07-20 Thread Rick Mann
I have Wants Core Animation Layer checked in IB on my view, and when I do, my view subclass' drawRect doesn't get called. Is there any way to have it also called (preferably after CA draws my layers)? Mostly this is just for experimentation, so I can draw while figuring out how to convert m

newbie question: NSURLConnection delegation and "method instance"

2008-07-20 Thread JB Ashton
Hi all, I'm struggling with "receivedData is declared as a method instance elsewhere" in this explanation of NSURLConnection delegation: http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html When I declare the receivedData as NSMutableData in t

Re: How to get a table column header with an image instead of text?

2008-07-20 Thread Marc Respass
On Jul 20, 2008, at 2:05 PM, Adam R. Maxwell wrote: On Jul 20, 2008, at 10:57 AM, Jean-Daniel Dupas wrote: Le 20 juil. 08 à 19:54, Marc Respass a écrit : Hi again, I hate answering my own question but I did figure it out. I sub- classed NSTableHeaderCell then created an instance using

Core Data Sync Question (Managed Object Contexts)

2008-07-20 Thread Manoj Patwardhan
I am using Core Data syncing which uses its own managed object context to apply sync changes. In the pulling stage, my application's managed object context's mergeChangesFromContextDidSaveNotification method is getting called. However, the application has some array controllers that are lis

Re: Obtaining the number of characters in a string

2008-07-20 Thread Phil Faber
Thanks to all who helped me with this challenge of obtaining the number of characters in a string. On 20 Jul 2008, at 13:12, Tim Isted wrote: Try using [text2 setStringValue:[NSString stringWithFormat:@"%i", [[Field1 stringValue] length]]]; Using setIntValue on a text field won't set the

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 tim

NSThread and UI

2008-07-20 Thread Torsten Curdt
AFAIU accessing UI elements from within an NSThread is a big no-no. So in the following naive code I would have to either wrap the calls to the progressIndicator object through a performSelectorOnMainThread or could send NSNotifications to update it on the main thread. But looking around th

Re: drawRect doesn't get called when using CoreAnimation?

2008-07-20 Thread Scott Anguish
On 20-Jul-08, at 3:40 PM, Rick Mann wrote: I have Wants Core Animation Layer checked in IB on my view, and when I do, my view subclass' drawRect doesn't get called. Is there any way to have it also called (preferably after CA draws my layers)? No. If you're using layer-backed views (you

Re: newbie question: NSURLConnection delegation and "method instance"

2008-07-20 Thread Scott Anguish
receivedData should be an instance variable of the class that contains the code in Listing 1 - Creating a connection using NSURLConnection. often an instance of that class is also used as the delegate (which is what this example code is assuming) the code for these snippets really needs to

Re: newbie question: NSURLConnection delegation and "method instance"

2008-07-20 Thread Dmitri Goutnik
On Jul 20, 2008, at 11:43 PM, JB Ashton wrote: Hi all, I'm struggling with "receivedData is declared as a method instance elsewhere" in this explanation of NSURLConnection delegation: http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html Wh

Re: NSThread and UI

2008-07-20 Thread Bruce Johnson
AppKit stuff isn't thread safe. AppKit stuff is usually the user interface stuff (like Progress bars) So that should be run on the main thread, something like: > [NSThread detachNewThreadSelector:@selector(convert) > toTarget:self > withObject

Re: Documentation on changing dock icon programmatically?

2008-07-20 Thread Diop Mercer
Thanks, guys. -m On Fri, Jul 18, 2008 at 1:34 AM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Thu, Jul 17, 2008 at 8:35 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: >> -[NSApplication setApplicationIconImage:] to set the dock tile. > > Also take a look at NSDockTile, which is Leopard-only. It doe

Create a window with status bar at its bottom, how to do?

2008-07-20 Thread Cloud Strife
Hi everyone. I am interested to create a window with status bar at its bottom. Hmm, you can see Xcode editor window as an example, once we open a .m source file, the editor window has a status bar at its bottom. When click the build and run buttom, you can see the prompt information from Xcode show

WebKit, programmatic form input, form submits

2008-07-20 Thread Diop Mercer
Hi, I've been playing with WebKit, and I've written a Cocoa app that brings up a site in a WebView. That was easy, but now I'd like to go to a site with a form and have the Cocoa app fill in the form fields and submit the form. Can anyone point me to documentation on how to programmatically fill i

Re: WebKit, programmatic form input, form submits

2008-07-20 Thread Mike Abdullah
You'll need to use the DOM API. Either from the ObjC API, or another language such as javascript. On 20 Jul 2008, at 17:39, Diop Mercer wrote: Hi, I've been playing with WebKit, and I've written a Cocoa app that brings up a site in a WebView. That was easy, but now I'd like to go to a site wi

Re: NSThread and UI

2008-07-20 Thread Ken Thomases
On Jul 20, 2008, at 4:01 PM, Torsten Curdt wrote: AFAIU accessing UI elements from within an NSThread is a big no-no. There are exceptions, but that's a good rule of thumb. Here are Apple's specific guidelines: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSaf

Re: Obtaining the number of characters in a string

2008-07-20 Thread Ron Fleckner
On 21/07/2008, at 6:26 AM, Phil Faber wrote: On 20 Jul 2008, at 13:16, Ron Fleckner wrote: Still struggling with documentation! That might be because the documentation makes the reasonable assumption that you already know how to use C and Objective-C. You're not recognising the differe

Re: Being notified of changes to a file

2008-07-20 Thread Jens Alfke
On 20 Jul '08, at 9:37 AM, Yann Disser wrote: I am trying to execute a ruby script from within a Cocoa application. I want to use NSTask (any better ideas?). You can use the Ruby C API to run Ruby inside your process, but that's definitely more work. My scripts outputs its progress by pr

Re: looking for help with http post example

2008-07-20 Thread Jens Alfke
On 20 Jul '08, at 11:53 AM, Richard Nichols wrote: As a little additional information, I'm trying to talk to a php script that has an API similar to Twitter. So I need to have user password and UTF8 text. Does the website support HTTP authentication? That's the preferred way to interact w

Re: Create a window with status bar at its bottom, how to do?

2008-07-20 Thread Jens Alfke
On 19 Jul '08, at 8:10 PM, Cloud Strife wrote: Hi everyone. I am interested to create a window with status bar at its bottom. Hmm, you can see Xcode editor window as an example, once we open a .m source file, the editor window has a status bar at its bottom. In Interface Builder, just move

Re: WebKit, programmatic form input, form submits

2008-07-20 Thread Jens Alfke
On 20 Jul '08, at 9:39 AM, Diop Mercer wrote: Hi, I've been playing with WebKit, and I've written a Cocoa app that brings up a site in a WebView. That was easy, but now I'd like to go to a site with a form and have the Cocoa app fill in the form fields and submit the form. Can anyone point me

Re: How to get cursor text from a Mac window

2008-07-20 Thread Jens Alfke
On 19 Jul '08, at 5:00 AM, Gang Chen wrote: I am new to Cocoa and Mac dev, and I want to make a simple dictionary program with Cocoa on MacOSX. Can anybody help and tell me how to get any words on screen where cursor points in Cocoa? I'm not exactly sure how the built-in Dictionary app doe

Re: Drawer examples?

2008-07-20 Thread Jens Alfke
On 19 Jul '08, at 1:53 PM, Ashley Perrien wrote: am having no luck with getting the custom view within the drawer to redraw except by closing and reopening it. I throw setNeedsDisplay: YES at it from everywhere I can think of and it just won't redraw. Usually when something like this happe

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 16, 2008, at 16:23:23, David Duncan wrote: Can't really say what you are or are not seeing here, I'd probably have to see code. If this is critical, I'd recommend filing a DTS incident. David, I checked my code again, and realized I was setting the bias to 1 (I thought I saw that

Re: drawRect doesn't get called when using CoreAnimation?

2008-07-20 Thread Gordon Apple
OK, now that is at least the type of definitive statement I've been looking for. (I have recently opened a discussion with DTS on some of these issues.) So apparently, there are some things internal that change when you call "setLayer" besides just the layer? I have also figured out (and

Re: drawRect infinite loop -- argh!

2008-07-20 Thread Bill Bumgarner
On Jul 20, 2008, at 11:52 AM, Brian Hughes wrote: Thread 2 -[LNTab3View drawRect:] at LNTab3View.m:52 -[NSView _drawRect:clip:] -[NSView _lightWeightRecursiveDisplayInRect:] _lightWeightRecursiveDisplayInRect2 CFArrayApplyFunction -[NSView _lightWeightRecursiveDisplayInRect:] _lightWeightRecursiv

Newbie CALayer Questions

2008-07-20 Thread Bob Barnes
hi, I have some questions related to CALayer drawing. I want to be able to display images, text, 2D graphics or a PDF page. I'm able to display an image by directly setting the contents property using a CGImageRef or subclassing CALayer, overriding display and sending setNeedsDisplay, but

Re: Newbie CALayer Questions

2008-07-20 Thread Jens Alfke
On 20 Jul '08, at 5:00 PM, Bob Barnes wrote: I have some questions related to CALayer drawing. I want to be able to display images, text, 2D graphics or a PDF page. I'm able to display an image by directly setting the contents property using a CGImageRef or subclassing CALayer, overridin

Re: NSThread and UI

2008-07-20 Thread Chris Hanson
On Jul 20, 2008, at 2:01 PM, Torsten Curdt wrote: So in the following naive code I would have to either wrap the calls to the progressIndicator object through a performSelectorOnMainThread or could send NSNotifications to update it on the main thread. Notifications — whether via NSNotific

Re: Newbie CALayer Questions

2008-07-20 Thread Bob Barnes
On Jul 20, 2008, at 5:06 PM, Jens Alfke wrote: On 20 Jul '08, at 5:00 PM, Bob Barnes wrote: I have some questions related to CALayer drawing. I want to be able to display images, text, 2D graphics or a PDF page. I'm able to display an image by directly setting the contents property using a

Unarchiving a plugin custom control

2008-07-20 Thread Anders Lassen
Hi, I am working on a custom control, which has a few simple properties. The object is a subclass of NSBox, and is therefore initialized with initWithCoder. When the object is created for the first time and nothing has been saved to the archive, all properties are set to zero values. My

Design question, which controller class to use

2008-07-20 Thread James W. Walker
I have these windows, each of which has a table displaying data from an array of dictionaries. The data is never stored on disk, so I don't think of these windows as "documents". Since there is a window (which has a title that depends on the data) I thought I should use a subclass of NSWi

Re: Design question, which controller class to use

2008-07-20 Thread Jens Alfke
On 20 Jul '08, at 8:05 PM, James W. Walker wrote: Since there is a window (which has a title that depends on the data) I thought I should use a subclass of NSWindowController. On the other hand, there is an array being displayed in a table, and I gather that's easier to set up using bindi

RE: setting image for person in address book

2008-07-20 Thread Vijay Kanse
I have Tried initWithContentsOfURL. But I am getting exception. NSData *imageData = [[NSData alloc] initWithContentOfURL:@" file://localhost/volumes/DATA/image/ > play.tiff "]; What Might be problem with That ? Is there any other problem with my code ? Thank You. -Original Message- Fro

Re: setting image for person in address book

2008-07-20 Thread Kyle Sluder
On Sun, Jul 20, 2008 at 11:40 PM, Vijay Kanse <[EMAIL PROTECTED]> wrote: > I have Tried initWithContentsOfURL. But I am getting exception. It's -initWithContentsOfURL, not -initWithContentOfURL: as your code seems to indicate. And in the future, if you are getting errors or exceptions, you need t

RE: setting image for person in address book

2008-07-20 Thread Vijay Kanse
I am getting the Image set for the Person. I was Missing to write [NSURL URLWithString@"url path"]. Thank You. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kyle Sluder Sent: Monday, July 21, 2008 9:39 AM To: Vijay Kanse Cc: Heinrich Giesen; cocoa-dev@li

Re: Newbie CALayer Questions

2008-07-20 Thread Brian Christensen
On Jul 20, 2008, at 20:00, Bob Barnes wrote: I have some questions related to CALayer drawing. I want to be able to display images, text, 2D graphics or a PDF page. I'm able to display an image by directly setting the contents property using a CGImageRef or subclassing CALayer, overriding

how to prevent baseline shift when using NSSuperscriptAttributeName on a NSTextView's NSAttributedString ?

2008-07-20 Thread Rua Haszard Morris
I am using NSSuperscriptAttributeName to make part of a string displayed in an NSTextView label display as superscript (to show "to the power of 2"). I may also use a smaller font attribute to make the "2" char smaller. My problem is that thebaseline of the text drawn in the NSTextView is

ikimagebrowserview + bindings

2008-07-20 Thread Duncan Campbell
Does anyone know of any example code that demonstrate IKImageBrowserView working with bindings? Cheers in advance, Duncan. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 16, 2008, at 16:23:23, David Duncan wrote: This is also why when you scale up a CALayer its content its content looks interpolated - its the same number of pixels as before, just interpolated larger. If you exceed the maximum LOD of a tiled layer, you will see the same thing (which

Re: drawRect doesn't get called when using CoreAnimation?

2008-07-20 Thread Scott Anguish
On 20-Jul-08, at 7:21 PM, Gordon Apple wrote: OK, now that is at least the type of definitive statement I've been looking for. (I have recently opened a discussion with DTS on some of these issues.) So apparently, there are some things internal that change when you call "setLayer" bes

Re: Newbie CALayer Questions

2008-07-20 Thread Scott Anguish
that shouldn't be an issue if he's explicitly calling the setNeedsDisplay is the method signature correct on your implementation of drawInContext:? On 21-Jul-08, at 12:22 AM, Brian Christensen wrote: On Jul 20, 2008, at 20:00, Bob Barnes wrote: I have some questions related to CALayer

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Scott Anguish
On 21-Jul-08, at 1:20 AM, Rick Mann wrote: On Jul 16, 2008, at 16:23:23, David Duncan wrote: This is also why when you scale up a CALayer its content its content looks interpolated - its the same number of pixels as before, just interpolated larger. If you exceed the maximum LOD of a ti

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 20, 2008, at 22:44:37, Scott Anguish wrote: all the visual properties that are 'animatable' are applied at render time. Thanks for that answer, Scott. So, can I not make my own drawing code an animatable property? I thought I could. I was really hoping I would be able to do this

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Scott Anguish
On 21-Jul-08, at 1:52 AM, Rick Mann wrote: On Jul 20, 2008, at 22:44:37, Scott Anguish wrote: all the visual properties that are 'animatable' are applied at render time. Thanks for that answer, Scott. So, can I not make my own drawing code an animatable property? I thought I could.

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 20, 2008, at 22:57:12, Scott Anguish wrote: Nope. That is entirely private. The reason I had mentioned the animatable properties is because those visuals (including background color and the border) are not scaled the same as your content, since they aren't cached.. Okay, thanks f

NSWindowController getting over-released by NSDocument?

2008-07-20 Thread Markus Spoettl
Hi List, I'm having some problems with memory management of a window controller in a standard NSDocument based application. The problem is that my window controller gets released through an autorelease pool after the document has been deallocated (and released it in the process). I've