ChangeCount for Multiple Undo Managers

2009-12-30 Thread Gordon Apple
When in the course of undo events, it becomes necessary to introduce multiple undo managers, certain issues arise. For example: How to handle the document change count? I currently have at least a half dozen independent undo managers for my document, which I keep in a bank near the document

Re: ChangeCount for Multiple Undo Managers

2009-12-30 Thread Gordon Apple
Ah! That's what I missed. Thanks. I assume that just tests the zero state of changeCount. Maybe I can override that to return YES if any count is non-zero. This is a fairly complex document, involving a data hierarchy and various contexts (and editable windows) within that hierarchy. Some of

NSOutlineView Bad Scrolling Behavior

2009-12-19 Thread Gordon Apple
I plan to file a bug report on this unless someone has a better idea to fix it. I have an outline view in a scroller. The view has two fixed columns on the left, then an editable name field. There are five levels in the data hierarchy in the name field. The view is set to expand the name field

Re: NSOutlineView Bad Scrolling Behavior (Solved))

2009-12-19 Thread Gordon Apple
Nevermind. Turning off Autoresizes Outline Column in IB appears to have solved the problem. On 12/19/09 4:45 PM, Gordon Apple g...@ed4u.com wrote: I plan to file a bug report on this unless someone has a better idea to fix it. I have an outline view in a scroller. The view has two fixed

Re: NSAttributedString fill with gradient

2009-12-17 Thread Gordon Apple
If you capture the entire laid-out text string as a single Bezier path, then you can fill it with whatever you want -- gradient, image, burning fire QTMovie, more text, etc. I've done it and it works. Of course, all of that takes a significant amount of effort. In my case, I already had all the

NSTextView Bad Behavior

2009-12-14 Thread Gordon Apple
Apparently, I'm not the only one who has experienced this. NSTextView (or NSLayoutManager) is lazy. It does stuff in the background that is driving me nuts. I need to do a full layout, not just what's visible, so I can get a reliably accurate measure of the total physical text layout length.

Re: NSTextView Bad Behavior

2009-12-14 Thread Gordon Apple
scrolling. It still has a few issues, but mostly works. On 12/14/09 12:55 PM, Douglas Davidson ddavi...@apple.com wrote: On Dec 14, 2009, at 10:50 AM, Gordon Apple wrote: Any ideas on how to force a full layout and then prevent NSTextView from further mucking with it? One

Relation Between a View's Bounds and its CTM

2009-12-11 Thread Gordon Apple
Are there any good way to get/set a view's transform? (No, not using CALayers.) It is possible to flip a view's horizontal and/or vertical orientation by setting negative values for the bounds size. However, a request for the view's bounds always returns a validated rect, giving no indication of

Re: CALayer Transitions

2009-11-17 Thread Gordon Apple
Here's the current status. I seem to have everything working, partly due to you guys. Thanks. However, now having analyzed this thing to death, I'm filing a bug report. First a summary of the (extended) problem. The view is layer hosted. Its layer has a sublayer called content, which

Re: CALayer Transitions

2009-11-16 Thread Gordon Apple
/16/09 11:23 AM, Matt Neuburg m...@tidbits.com wrote: On Sun, 15 Nov 2009 22:38:04 -0600, Gordon Apple g...@ed4u.com said: What I don't understand, is that, according to the core animation guide, kCATransition seems to be what I want for a key instead of sublayers. The guide says

Re: CALayer Transitions

2009-11-15 Thread Gordon Apple
the delegate. On 11/15/09 8:51 PM, Matt Neuburg m...@tidbits.com wrote: On Sat, 14 Nov 2009 14:58:31 -0600, Gordon Apple g...@ed4u.com said: I assume this should be simple, but so far I haven't found the magic incantation, even after reading the docs, Dudley's book, and some archives. Problem

CALayer Transitions

2009-11-14 Thread Gordon Apple
I assume this should be simple, but so far I haven't found the magic incantation, even after reading the docs, Dudley's book, and some archives. Problem: Layer called contentLayer has sublayers containing layer A, which is to be transitioned to layer B. (Note: Using GC here.) Controller

Re: iPhone CLLocation Accuracy?

2009-11-11 Thread Gordon Apple
Multi-channels do better than single channel units, but in general GPS (in open areas) can get you within 10m. Ground reference calibrations (what you get with the mentioned auxiliary systems) can do better. It also helps if you happen to have a Cesium time standard attached to your iPhone.

Binding Popup to Images

2009-10-11 Thread Gordon Apple
I saw a few refs to this from from a few years back and I guess it was problematic. Anything changed? Is there a way to bind a popup or dropdown to an array of images, other that faking it with images in text? I really don't want to set an outlet to load it, because that means a whole new

Re: Cocoa-dev Digest, Vol 6, Issue 1443

2009-10-07 Thread Gordon Apple
IMHO, you are trying to do this the hard way. I did one similar to that, using views, many years ago using MacApp. (Presented it at MadaCon in Phoenix.) I wouldn't do it that way again. Just draw everything in one view. Define a draw-shape object with lists of inputs and outputs (could be

Quartz Composer API Questions (and comments)

2009-09-28 Thread Gordon Apple
I would post this in the QC forum, but it seems mainly for users or creators rather than cocoa programmers. 1. Why is there no API for QCPatchController, at least for setting the file or composition? This makes it utterly useless for anything but a trivial app. 2. Why is there no way to

MathML View or Component?

2009-08-21 Thread Gordon Apple
Does anyone know of a Cocoa View or a drawing component (or code) that will render MathML (from LaTex, whatever)? I've been looking at a lot of stuff through Google, but haven't found what I want. What I would really like is a total graphical equation editor/renderer. DesignScience has a

Re: Screen capture Cocoa framework

2009-06-24 Thread Gordon Apple
If you find anything like that, I'd like to know. What I want is a vDig component that could be used with QTBroadcaster that captures frames of the content of a window -- on-screen or off-screen. On 6/24/09 6:30 AM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote:

Re: Group CGAffineTransform Animations?

2009-06-17 Thread Gordon Apple
IMHO, matrix operations are one of the most confusing and cumbersome aspects of Cocoa. Every time I use them, I end up trying most combinations until I get the desired result. C++ doesn't have this problem. You can simply write the matrix equations and be done with it. I love Objective C,

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Gordon Apple
CALayer does have setAffineTransform: which is what I mostly use. It just does the 3D transform for you and is adequate for translation, scaling, (planer) rotation, skew, and a few other things. On 6/16/09 12:18 PM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: so

Re: CGRectUnion with one empty Rectangle

2009-05-20 Thread Gordon Apple
IMHO, if it works the way you describe, it's doing the right thing, at least mathematically speaking from a point-set viewpoint. Unfortunately, NSUnionRect works like the docs describe, which is not what I needed, so I wrote my own. It's too bad NSUnionRect and CGRectUnion appear to not be

Re: Possible blunder with CALayers

2009-02-27 Thread Gordon Apple
The view's layer ignores the flipped flag. I added my own content layer with an inversion transform. On 2/27/09 8:01 AM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: When ever I add a Layer my first layer flickers and one more thing , how do I set the Flip

Re: CALayer defaultValueForKey

2009-02-18 Thread Gordon Apple
Anguish sc...@cocoadoc.com wrote: On 15-Feb-09, at 6:07 PM, Gordon Apple wrote: The docs are a clear a mud on this. What do you get from CALayer's defaultValueForKey? Is this the same as one would expect from valueForKey for an NSDictionary? The return type is id. If this method

What is a CALayer?

2009-02-17 Thread Gordon Apple
OK, I've said it. WHAT is a CALayer? I'm using a lot of them and appreciate what they can do, but still don't understand them. The docs, books, etc., are reasonably good at how they relate to each other, but suck toadstools when it comes to relating them to the underlying view. It's taken

CALayer defaultValueForKey

2009-02-15 Thread Gordon Apple
The docs are a clear a mud on this. What do you get from CALayer's defaultValueForKey? Is this the same as one would expect from valueForKey for an NSDictionary? The return type is id. If this method returns nil a suitable ³zero² default value for the property is provided, based on the

Re: isNotEqualToString

2009-02-13 Thread Gordon Apple
Or just replace the || with . DeMorgan's theorem. Basic boolean logic. On 2/13/09 3:19 AM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: Subject: Re: isNotEqualToString To: Chunk 1978 chunk1...@gmail.com Cc: cocoa-dev Dev cocoa-dev@lists.apple.com Message-ID:

Re: Can we render QCRenderer in CAOpenGLLayer..?

2009-01-31 Thread Gordon Apple
Just curious - are you using garbage collection? We recently determined there is a bug in QCCompositionLayer with garbage collection that prevents the composition from playing. QCCompositionLayer is a subclass of CAOpenGLLayer. Maybe you hit the same bug? On 1/31/09 10:09 AM,

Re: Bug with QTCaptureLayer..........?

2009-01-22 Thread Gordon Apple
As is supposedly the alternating start/stop when you change anything in the layer. I haven't had a chance to test it yet. (Waiting on a new HD to arrive to load Snow Leopard.) BTW, I haven't seen an update since around Dec. 1. What's with that? On 1/22/09 7:04 AM,

Re: NSWindow With Only Close Button?

2009-01-12 Thread Gordon Apple
Set the size to zero instead. You can do it in a window controller: [[[self window] standardWindowButton:NSWindowMiniaturizeButton] setFrame:NSZeroRect]; [[[self window] standardWindowButton:NSWindowZoomButton] setFrame:NSZeroRect]; On 1/12/09 12:03 PM,

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-11 Thread Gordon Apple
Well, it's good to know that. One thing I had assumed (possibly erroneously) is that other initializers and factory methods would internally call init for basic initialization. That would be consistent with your claim that factory methods are just convenience methods. I found out that's not

Button Bindings

2009-01-11 Thread Gordon Apple
I'm trying to replace some IBActions with bindings so I can bind through one nib to another through an object controller. I recently discovered the button binding example and have been able to do this successfully. However, one thing escapes me. I have a passel of related buttons connected

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-10 Thread Gordon Apple
I would definitely recommend using the factory methods. You have no idea of what is going on inside those methods, but you better believe you need it, whatever it is. Also, I've found that some of those methods don't even cal init, which I found out when my own iVars were not getting

Re: QTMovieLayer and QCCompositionLayer Don't Start

2009-01-06 Thread Gordon Apple
://www.cimgf.com/2008/09/24/core-animation-tutorial-core-animation-and-qua rtz-composer-qccompositionlayer/ -Matt On Jan 2, 2009, at 11:34 AM, Gordon Apple wrote: The specs claim that both QTMovieLayer and QCCompositionLayer start automatically. They don't. I have to explicitly start

Re: QTMovieLayer and QCCompositionLayer Don't Start

2009-01-06 Thread Gordon Apple
...@apple.com wrote: On Jan 6, 2009, at 11:53 AM, Gordon Apple wrote: Note: There is no equivalent to play for a composition (at least that I am aware of). I get the initial frame and no play. My composition layer is four levels deep

Re: QTMovieLayer and QCCompositionLayer Don't Start

2009-01-06 Thread Gordon Apple
Try turning on garbage collection for CALayerEssentials and tell me if the composition layer runs. It doesn't here. On 1/6/09 6:07 PM, David Duncan david.dun...@apple.com wrote: On Jan 6, 2009, at 3:29 PM, Gordon Apple wrote: The only differences I can figure out is that Essentials loads

QTMovieLayer and QCCompositionLayer Don't Start

2009-01-05 Thread Gordon Apple
The specs claim that both QTMovieLayer and QCCompositionLayer start automatically. They don't. I have to explicitly start Movies and I haven't figured out yet how to start a QCCompositionLayer. I get the initial image in a QCCompositionLayer, but no play. How do you start it? A

CALayer Mask

2008-12-07 Thread Gordon Apple
Either the mask setting of CALayer is the most ill-behaved item in Cocoa or I totally don't understand it. I suspect the latter. Although I have successfully used a mask layer in a CALayer (mainly QTMovieLayer and QTCapture Layer) when first creating the CALayer, changing the transform

IR Remote Control Events

2008-11-30 Thread Gordon Apple
Is there a simple way give to get the 6 button events from an Apple IR Remote control in Cocoa? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Best way to Change Window

2008-11-23 Thread Gordon Apple
What is the best way to change to a different window? I have a main window nib with a lot of controllers in it. Currently the main view is in a scrolling window. I want to live-switch between that and a borderless (optionally full screen) window or a resizable (non-scrolling) window.

Questions about Garbage Collection

2008-11-20 Thread Gordon Apple
Last year when I moved to 10.5 and Objective C 2.0, I made the decision to move to garbage collection (GC). After seemingly working ok, I deleted most of my pre-GC code, e.g., retain, release, dealloc. I am now regretting that decision. I am running into major problems in working with

Re: GC and print operations cause objects not to finalize?

2008-11-20 Thread Gordon Apple
Speaking of which -- What does it take to print a view with layers? (GC also.) On 11/20/08 5:17 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've got a GC-only document-based application and I'm trying to add basic print operations to my documents. I've reduced this down to what I think

Filter Scaling in CALayers

2008-11-07 Thread Gordon Apple
I believe this to be a CALayer question, not a QT question. I'm applying filters to my video, a la the QTRecorder example. It works correctly for a QTCaptureView where it applies the filter to each frame (via the delegate), but does not scale its effects in a QTCaptureLayer when applied to

Lack of Initializers or Factory Methods

2008-11-03 Thread Gordon Apple
The following example is one of several I have run into recently. Inheritance is as follows: CAKeyframeAnimation: CAPropertyAnimation : CAAnimation. CAKeyframeAnimation has no explicit initializer or factory method. Dudney's book uses [CAKeyframeAnimation animation] to create an

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Gordon Apple
, 2008, at 10:53 AM, Gordon Apple wrote: The following example is one of several I have run into recently. Inheritance is as follows: CAKeyframeAnimation: CAPropertyAnimation : CAAnimation. CAKeyframeAnimation has no explicit initializer or factory method. Dudney's book uses

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Gordon Apple
more often used the explicit arrayWithCapacity. It does make me want to go back and look at my own factory methods to make sure I implemented them the same way. On 11/3/08 11:20 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: --- On Mon, 11/3/08, Gordon Apple [EMAIL PROTECTED] wrote

Re: [Q] Hiding zoom minimize buttons

2008-10-22 Thread Gordon Apple
Here is what I do in the window controller or in the code that loads the window: - (void)windowDidLoad { //Hiding the disabled window buttons (removing them is deadly -- don't do it!) [[[self window] standardWindowButton:NSWindowMiniaturizeButton] setFrame:NSZeroRect]; [[[self

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

2008-10-21 Thread Gordon Apple
Uh, unless you might want to draw an NSImage sometime... On 10/20/08 9:04 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 21 Oct 2008, at 2:21 am, DKJ wrote: When I do this in the controller's awakeFromNib method: [theView lockFocus]; Then don't do it! stuff like -lockFocus

Re: NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Gordon Apple
The question I would ask is if you are using a KVC compliant method when Under some circumstances the the backing array is refreshed with new content. Otherwise, the changes might not be registered everywhere they need to be. NSIndexSet is a non-mutable object that gets replaced whenever you

Re: CDMA Programming

2008-10-06 Thread Gordon Apple
iphone is on ATT which does not use CDMA. All the CDMA-based companies, Verizon, Sprint, and AllTel license their technology from QualComm. I used to teach short courses and seminars about similar spread-spectrum technologies and I knew Andy Viterbi, one of the founders of QualComm. Just

Re: CDMA Programming

2008-10-06 Thread Gordon Apple
(Whoops, did it again. Forgot to change the title. -- GA) iphone is on ATT which does not use CDMA. All the CDMA-based companies, Verizon, Sprint, and AllTel license their technology from QualComm. I used to teach short courses and seminars about similar spread-spectrum technologies and I

Subviews in flipped layer-backed views

2008-09-27 Thread Gordon Apple
This used to work in 10.5.4 ‹ not in 10.5.5. However, there have been other changes in my code, so the cause could be elsewhere. I have a view that is flipped. My draw objects can contain text which is flowed into the shape of the object. The reason the view is flipped is that that is the

Nil Object Crashing KVO

2008-08-24 Thread Gordon Apple
I¹m having a problem that only shows up in Release mode. I have an object that should have ³editLayer² ivar automatically initialized to nil. A second object has a KVO on this ivar property. When the first object calls setEditLayer (as a result of it¹s own KVO notification observation from

Re: Nil Object Crashing KVO

2008-08-24 Thread Gordon Apple
/24/08 11:29 AM, Ken Thomases [EMAIL PROTECTED] wrote: On Aug 24, 2008, at 9:00 AM, Gordon Apple wrote: I¹m having a problem that only shows up in Release mode. I have an object that should have ³editLayer² ivar automatically initialized to nil. A second object has a KVO on this ivar

Re: Nil Object Crashing KVO

2008-08-24 Thread Gordon Apple
Thank you, thank you, Thank you! You gave me the key without even realizing it. I had just wanted to give a running version to someone who was visiting and had quickly tried to compile a release version. I stupidly assumed the release version would keep the same project settings except for

Outlet Initialization Uses Accessors

2008-08-20 Thread Gordon Apple
I just had a revelation I though I would share -- thanks to some sample code David Duncan sent me. When IB makes a connection, it calls the outlet's accessor, if one is available. That fact can be used to initialize related items in your code. Ok, maybe everybody but me already knew that,

Re: Why use NSObjectController?

2008-08-10 Thread Gordon Apple
I don't use CoreData. Frankly, the main use I have made of NSObjectController is to decrease my typing in IB bindings. For example, my inspectors have a large number of controls that are bound through a fairly long chain of references to their controllers. By using an NSObjectController to

Re: CGGStackRestore: gstack underflow

2008-08-06 Thread Gordon Apple
I don't know anything about NSDefaultRunLoopMode and have simply been trying to replace my layered list of draw lists with layers in what may or may not be a scrolling view. I'm not doing anything with animation yet. To say this has been problematic would be an understatement. Also, in spite of

CGGStackRestore: gstack underflow

2008-08-05 Thread Gordon Apple
I'm getting a ton of console messages: Tue Aug 5 16:34:13 Macintosh-5.local RTP[2209] Error: CGGStackRestore: gstack underflow. What should I be looking for to find the problem? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: CGGStackRestore: gstack underflow

2008-08-05 Thread Gordon Apple
of the Core Animation Cookbook. On 8/5/08 5:09 PM, Kyle Sluder [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 5:44 PM, Gordon Apple [EMAIL PROTECTED] wrote: What should I be looking for to find the problem? I'm not a CoreGraphics expert, but my first instinct is too many calls

Re: Dumb question: How does NSScrollView know the size of the thing it's scrolling?

2008-07-23 Thread Gordon Apple
You can look at the Sketch sample code for one way. You can lift SKTZoomingScrollView intact, although you may need to implement your own controller to extract related code from the Sketch document class. However, I have still to get it to work properly when using CALayers. Sketch scales the

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

More CALayer Questions

2008-07-07 Thread Gordon Apple
I'm suffering from extreme frustration with CALayers. I obviously don't understand the documentation available and there is a lot that is not documented, especially since the Views guide has not been updated to include CALayers. Also, as others have observed, the flipped paremeter in

Re: More CALayer Questions

2008-07-07 Thread Gordon Apple
OK, a little update. Through watching a number of parameters, a lot of experimentation, and probably blind a** luck, I've managed to get rescaling to sort of work. However, to do editing of objects (e.g., dragging them around), I had to call removeAllAnimations. When I change the scale, the

Re: More CALayer Questions

2008-07-07 Thread Gordon Apple
Thanks. That's a good suggestion. I just realized that the thing was trying to animate and was interfering with my attempts to manually draw. I saw removeAllAnimations and tried it to solved my immediate problem. I'll see if I can use what you mentioned instead. I'm not currently using

Re: More CALayer Questions

2008-07-07 Thread Gordon Apple
Yup, Amazon, July 15, $23.07 + shipping. BTW, you might want them to update the title because it doesn't mention iPhone. Considering the huge number of iPhone SDKs downloaded, that could be a big draw. I may cancel Amazon and order the PDF package from your site. I had considered

CALayer and View Scaling

2008-06-29 Thread Gordon Apple
Apparently, there is a disconnect between the view's coordinate system context and that of the contained CALayers. I'm using Sketch's SKTZoomingScrollView to set the scale factor of my main drawing view. It works great without CALayers. What is does is it scales the bounds of the containing

Re: Problems with a Layer backed NSView in a NSScrollView

2008-06-19 Thread Gordon Apple
As I stated in my recent post, I implemented my own transform to flip the layer since nothing else worked. That worked, and my view is in a scrolling window. What I'm currently having trouble with is scaling the view. My window is similar to that in Sketch, with a popup scale factor in the

Re: Drawing in CALayers

2008-06-18 Thread Gordon Apple
Addendum: I did implement my own transform to flip the drawing. As far as I can tell, the initialFlippedState parameter in NSGraphicsContext *)graphicsContextWithGraphicsPort:(void *)graphicsPort flipped:(BOOL)initialFlippedState has no impact whatsoever. Bug report time? Another

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

2008-06-17 Thread Gordon Apple
At the present time, I'm not doing animation. I just want a layer stack I can draw into, with one layer for previous drawings and one normal user drawing activities. Later, I want to add more layers for user annotation and (possibly animated) attention directors. So far, I haven't even been

Re: Core Data Questions

2008-06-09 Thread Gordon Apple
If you're designing a data model using Core Data, it's actually very useful to step back and look at your data the way a layperson would. By this I mean forget about classes and inheritance and all that stuff. You can come back to it later, but the main thing is to look at the problem in

Where is CIFilterBrowser?

2008-06-09 Thread Gordon Apple
The CIFilterBrowser widget is mentioned in the docs but no search I have done will turn it up anywhere. Does it exist? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Where is CIFilterBrowser?

2008-06-09 Thread Gordon Apple
#$%^*(! docs said you had to download it from ADC. I took them at their word. Thanks. It's there. On Mon, Jun 9, 2008 at 3:06 PM, douglas a. welton [EMAIL PROTECTED] wrote: The widget used to be available when you logged in to the ADC site. My quick check didn't find it there, so it

Re: Drawing over a QTCaptureView

2008-06-06 Thread Gordon Apple
clippedImage:returnImage]; return returnImage; } Gordon, Would you post a snippet of your code. I'm curious as to how you're approaching this. regards, douglas On Jun 5, 2008, at 9:26 PM, Gordon Apple wrote: After receiving this, I tried something similar for clipping. After I cut

Core Data Questions

2008-06-06 Thread Gordon Apple
I'm currently trying to evaluate whether or not Core Data is a viable storage system in our application. Although I've been through the tutorials, Refs, and searches, I still have questions: 1. Our data hierarchy model does not seem to fit into the Core Data object model. (At least I

Re: Core Data Questions

2008-06-06 Thread Gordon Apple
BaseList can get to it. Apparently, there's an issue calling super in managed objects, so I'll have to see if that poses any problems. On Fri, Jun 6, 2008 at 6:59 PM, Gordon Apple [EMAIL PROTECTED] wrote: I'm currently trying to evaluate whether or not Core Data is a viable storage system

Re: Drawing over a QTCaptureView

2008-06-05 Thread Gordon Apple
After receiving this, I tried something similar for clipping. After I cut in the filter, it worked for a few seconds, then slowed to crawl, then crashed. The images from the internal iSight are large. My theory is that all those NSImages (and associated caches) simply overwhelmed the

Re: Drawing over a QTCaptureView

2008-06-04 Thread Gordon Apple
And then what can you do with it? Although I've been able to rotate the image with a transform, I still haven't figured out how to clip the image to a Bezier. You can't focus and draw into a CIImage like you can a NSImage. If it were the latter, I could just use NSBezier setClip. After

Re: Copying NSTextStorage

2008-06-03 Thread Gordon Apple
, Gordon Apple wrote: apparently NSTextView will accept nothing but the original NSTextStorage -- no subclasses allowed, even without any overrides. Nope. To subclass NSTextStorage, see http://www.cocoabuilder.com/archive/message/cocoa/2002/2/5/14848

The KVO Race

2008-06-03 Thread Gordon Apple
This probably isn't news to most programmers, but since I've run into it twice now, I thought it was worth a post. I have had cases where my program worked correctly sometimes, sometimes not. In two cases, I have traced the problem to KVO race conditions. I will describe one. The

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

2008-06-03 Thread Gordon Apple
I guess I don't know hw to use that. The particular situation was a nib that is document related, but loaded and opened later by menu. On Tue, Jun 3, 2008 at 5:53 PM, Gordon Apple [EMAIL PROTECTED] wrote: Both observations are set up in the same Nib in awakeFromNib. If you have

Re: The KVO Race

2008-06-03 Thread Gordon Apple
(Sorry about that. For got to chance the Subject. -- GA) I guess I don't know hw to use that. The particular situation was a nib that is document related, but loaded and opened later by menu. On Tue, Jun 3, 2008 at 5:53 PM, Gordon Apple [EMAIL PROTECTED] wrote: Both observations

Design Patterns -- Views

2008-06-03 Thread Gordon Apple
I haven't delved into the Buck Book yet, but I thought I would offer my take on the use of Views. IMHO, Cocoa and its sample code, like MacApp, makes far too much use of subclassing views for encapsulating complex functionality, e.g., NSTextView, in violation of MCV. In MacApp, I made

Re: The KVO Race

2008-06-03 Thread Gordon Apple
OK, if I understand the documentation correctly, the first suggestion might work. Thanks. I don't think the second one is applicable here. (I have used that successfully within one class.) Yes, the observed editLayer in displayController was being observed by the

Re: Copying NSTextStorage

2008-05-31 Thread Gordon Apple
New attempt. Instead of intercepting the text key in my shape CopyWithZone, I tried the obvious thing of subclassing NSTextStorage, adding the copying/mutablecopying protocols using the same copy technique of creating a new object initialized with the original. Even without the protocols,

Re: Copying NSTextStorage

2008-05-30 Thread Gordon Apple
understand why the problem just surfaced now. On 29 May '08, at 11:03 AM, Gordon Apple wrote: Apparently, NSTextStorage does not conform to NSCopying, even though its superclass (NSAttributedString) does. Has something changed recently with NSTextStorage that makes copy not work

Copying NSTextStorage

2008-05-29 Thread Gordon Apple
This used to work. No more. Has something changed in NSTextStorage? In my Shape object, I have a dictionary of parameters, one being key = text with value NSTextStorage*, similar to what is done in Sketch (without the dictionary). My copyWithZone duplicated the dictionary and called

Re: KVO Response for incomplete paths

2008-05-21 Thread Gordon Apple
a property that does not exist at registration time, and then have it observe properly when the path is created. E.g., register to observe xxx.shadow.angle when shadow does not exist, then add the shadow object and have xxx.shadow.angle be observed properly. On May 19, 2008, at 2:02 PM, Gordon Apple

Re: KVO Response for incomplete paths

2008-05-21 Thread Gordon Apple
viable. That is good news. So I should be able to rule that out and look elsewhere for problems I am encountering. On 21 May 2008, at 19:51, Gordon Apple wrote: OK, thanks. That helps on the KVO responses. However, I have other questions about the entire KVO process. Not having access

KVO Response for incomplete paths

2008-05-19 Thread Gordon Apple
I'm currently trying to implement undo for drawing using code based on Sketch and am running into KVO problems on Shape properties. Sketch uses a dictionary of Properties that applies to selected Shapes (i.e., Graphics). Some of my parameters are compound, e.g., Shadow is a referenced

Re: Problem getting subclass of NSTextContainer working

2008-05-10 Thread Gordon Apple
One thing it doesn't do for you is keep track of the earlier rect heignts on the same line, as I showed at www.ed4u.com/textflow. You have to keep track of that yourself to keep it from overwriting itself on the next line. Here is part of my solution. Note that it still doesn't line up

Re: Group rotation

2008-05-07 Thread Gordon Apple
This is a major advantage of separating the drawing (rendering) code from the data model instead of having objects draw themselves (not to mention cross-platform). Our renderer object is recursive (and could be a shared object if not for the deficiencies in shadow rendering -- a story for

Re: Group rotation

2008-05-07 Thread Gordon Apple
That is effectively what our renderer object does. Note that we transform the drawing space, not the object. For a group object, it sets the group's transform, then recursively calls the same rendering function for the objects in the group. Each object's transform is then applied within the

Re: Flash'In'App ? Free Cocoa Framework

2008-05-05 Thread Gordon Apple
Some of us want to incorporate Flash directly in our applications without WebKit. I've been in discussions with Eltima for awhile on this. The framework is free for personal use, but $399 (IMHO, not a bad price) for a commercial license. Unfortunately, you have to buy the commercial version

NSImageView blocking drag

2008-05-03 Thread Gordon Apple
I have a custom view that contains a (covering) NSImageView. The latter is disabled. I want the custom view to handle all drag operations. This works fine as long as I don't drag in a type (e.g., NSFilenamesPboardType) that NSImageView directly supports. setAllowsCutCopyPaste:NO for the

Re: NSImageView blocking drag -- solved

2008-05-03 Thread Gordon Apple
That post was in the middle of the night when I couldn't sleep. I researched the archives this morning and found the solution. I added an outlet in my controller to the NSImageView and in awakeFromNib called unregisterDraggedTypes for the NSImageView. Problem solved. However, I still

Re: Problem with Grouping the rotated object

2008-04-02 Thread Gordon Apple
Let me explain how we are handling grouped objects. We have only one basic type of draw object with a dictionary of characteristics. That gives a lot of flexibility. We do not let objects draw themselves. Instead, we use a separate rendering object. This results in a clean object data model.

Re: NSFontManager Initialization

2008-03-04 Thread Gordon Apple
Therein lies the problem. When the user clicks the text tool and clicks a position on the view, I pop a sheet to enter the string and where the the font panel can be launched to set font and size. When the sheet is closed, the Bezier is created and the string appears as a Bezier shape

Cocoa and Flash

2008-02-26 Thread Gordon Apple
What is the best way to incorporate the Flash player (with interactivity) in a Cocoa application? I haven't had much luck finding what I need on the Adobe site. Lots of questions in the archives, but few answers. Can this be done through WebView? I know that QT has had some Flash

<    1   2   3