Display USB Video Camera output : AVFoundation?

2015-09-10 Thread Gordon Apple
First, yes, AVFoundation is the way to go. Second, you can use AVCaptureView or AVCaptureVideoPreviewLayer. II recommend that you don¹t subclass AVCaptureVideoPreviewLayer, but rather embed it in your own custom CALayer. That gives you more freedom of control, and if you want to do things like cli

Re: Display USB Video Camera output : AVFoundation?

2015-09-13 Thread Gordon Apple
It¹s a bug. I filed it a couple of days ago. 22666722 AVCaptureSession commitConfiguration calls deprecated code. On 9/13/15 2:00 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > Well, AVCaptureView is not very malleable. I needed to use an > AVCaptureVideoPreviewLayer, which needed quite a fe

Re: Refreshing Cocoa Bindings

2017-01-12 Thread Gordon Apple
Just don't try binding to an arrayController via representedObject. I've resorted to using representedObject to establish a local iVar to reference such an arrayController. That works. On 1/12/17 1:42 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > On Jan 11, 2017, at 13:16 , Daryle Walker w

Re: Argh never-ending troubles with bindings

2017-02-09 Thread Gordon Apple
If you are trying to bind to an arrayController via representedObject, I've never had any luck with that. I've always used representedObject to get a local reference to the arrayController and bind to that. On 2/8/17 8:26 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > Note that I've also trie

Re: Compressing glyphs programmatically

2014-09-30 Thread Gordon Apple
One of my big gripes with the Mac or iOS text system is the lack of a real super/subscript attribute. I haven¹t tried doing custom attributes. Is it possible to define and use custom super/subscript attributes which combine the normal baseline shift attributes with NSExpansionAttributeName to get a

RE: Compressing glyphs programmatically

2014-09-30 Thread Gordon Apple
I tried using NSExpansionAttributeName when sending a NSAttributedString to CoreText, but it didn’t work. Docs say it should be a NSNumber of the log of the expansion factor. This is confusing because log normally means base 10, except that in C it is actually ln() (Naperian). Either way, it had no

WWDC App

2014-10-19 Thread Gordon Apple
What has happened to the WWDC app? I even deleted it from my iPad and re-downloaded it. It doesn¹t work. Crashes and quits when you select anything. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Gordon Apple
Reminds me when I racked my brain trying to figure out how OmniGraffle drew parallel border lines on Beziers. I tried inset/outset, etc, then slapped my forehead when I realized that they just stroked it with a wide line, then again with a narrow line using the background color. Duh! On 10/20/14

Re: What changed in 10.10 scrollView / scrollPoint?

2014-11-17 Thread Gordon Apple
I hope they haven¹t gone to layer backed views for text. If you have a choice turn that off. We have a teleprompter app which scales formatted text nicely on Mac, but was found to be unusable on iOS due to layer backing. On 11/17/14 3:00 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > Hi, I ha

NSView nextResponder always the viewController?

2014-12-16 Thread Gordon Apple
In Yosemite, any included viewController is automatically inserted into the view¹s responder chain. Something is not working right. In many of our views, we insert controllers (derived from NSResponder) A and B into the view¹s responder chain. A must come first, then B, so B is inserted first as th

Re: NSView nextResponder always the viewController?

2014-12-17 Thread Gordon Apple
Thanks, I¹ll look into that. It would have been nice if the docs has more explanation of how they are handling the responder chain for viewControllers. Also, it appears that the view is now holding a reference to the viewController (when used). However, it is not public. I wish that would make tha

Re: Request for guidance re. CALayer

2015-01-07 Thread Gordon Apple
We have a Mac application that uses CALayers (subclassed) for layered drawing. Our drawing view uses a drawing delegate for drawing (rendering) and a Edit delegate for interaction. The latter is in a view controller that is also inserted into the view¹s responder chain. (Edit Delegate methods are m

Re: Testing selection with NSArrayController?

2015-01-19 Thread Gordon Apple
I totally disagree with that assessment. Selection should NOT be a property of the object model. I tried that years ago. Bad move. Selection is part of the ³control² layer of MVC. The Œview² part displays to the user. The array of objects is part of the model. You should be iterating the array for

Re: What's the right way to use UIActivityIndicatorView? After it's stopped

2015-01-26 Thread Gordon Apple
You can stack views and controls however you like. I do it all the time. You need to pay attention to the list of views, not just the visuals in iB. Just use an outlet or binding to hide the ones you don¹t want showing. Set the activity indicator to hide when not active. When you stop animation, un

Re: Does the NSView Drag Protocol has any issues with non-key windows?

2015-05-07 Thread Gordon Apple
Apparently so. I have had difficulty dragging things into an open (non-transient) popover. It just doesn¹t work. On 5/7/15 1:00 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > I am trying to drag a NSTableView row on to a NSView on the same window. But > the window is a non-key window (made exp

Re: Another NSTreeController/NSOutlineView/NSIndexPath Question

2015-06-11 Thread Gordon Apple
If you are going to use a data hierarchy, then use a data hierarchy. Look like you are attempting to use a linear array, which won¹t work. You need arrays of arrays and you bind the tree controller to the root array. On 6/10/15 10:45 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > Hi All, Is t

Re: Another NSTreeController/NSOutlineView/NSIndexPath Question

2015-06-12 Thread Gordon Apple
Ok, I admit to being confused. Seems like what we are missing is the data model. Your containers must be or at least have an array for storage. Normally, the NSTreeController reflects this model and has the info provided to traverse it. In my case, elements are CoreData objects with parent relation

NSNumberFormatter Issues

2015-07-04 Thread Gordon Apple
I¹m having a new problem, in code that¹s been around for awhile, that I¹d swear was never there before. Text field had a NSNumberFormatter and is bound to a CGFloat. It is for angle entry and the format is set to show the degree symbol suffix. A Circular slider is bound to the same value. Text disp

Re: NSNumberFormatter Issues

2015-07-05 Thread Gordon Apple
On 5 Jul 2015, at 6:53 am, Gordon Apple wrote: >> > >> > However, if user changes the >> > displayed value, leaving the degree symbol intact, it says it is invalid >> and >> > throws an exception, essentially ending the program run. This is totally >>

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 sp

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 ob

Re: View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Gordon Apple
(Crud -- Forgot to change the title again. Sorry about that. -- GA) 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

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 co

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.

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 c

Re: CALayer Transitions

2009-11-15 Thread Gordon Apple
it through, I never see this key come through the delegate. On 11/15/09 8:51 PM, "Matt Neuburg" wrote: > On Sat, 14 Nov 2009 14:58:31 -0600, Gordon Apple said: >>I assume this should be simple, but so far I haven't found the magic >> incantation, even after

Re: CALayer Transitions

2009-11-16 Thread Gordon Apple
enough, but it ain't happening that way. On 11/16/09 11:23 AM, "Matt Neuburg" wrote: > On Sun, 15 Nov 2009 22:38:04 -0600, Gordon Apple said: >>What I don't understand, is that, according to the core animation guide, >> kCATransition seems to be what I wan

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: NSTimer never being deallocated

2010-03-13 Thread Gordon Apple
I haven't followed this whole thread, but my experience is that an NSTimer (especially a repetitive one) is an easy thing to leak, even in a GC environment (which I use). To prevent it, you have to make sure you keep a reference to the timer so that you can actually invalidate it, taking it out of

Re:Attributes set in NSTextStorage ignored/overridden

2010-03-29 Thread Gordon Apple
Be aware that it your textView is bound to an NSTextStorage (or NSAttributedString) elsewhere, that programmatic changes will not be stored unless someone does a manual edit afterwards. Programmatic changes do not trigger a KVO to make it update, such as what happens with manual edits. I haven't

Font Style Names for iPhone/iPad

2010-04-12 Thread Gordon Apple
How do I get a list of style names for a particular font family for iPhone/iPad? I can get the full font names and have my own font picker which shows those. However, that is not what I really want. I want the secondary list to show the common names, i.e., "Bold", "Italic", etc., like is shown i

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Gordon Apple
is not consistent. Some even use contractions. If you look at the font list in Pages on the iPad, it does what I want. On 4/12/10 4:08 PM, "Eric E. Dolecki" wrote: > http://www.alexcurylo.com/blog/2008/10/05/snippet-available-uifonts/ > > On Mon, Apr 12, 2010 at 5:03 PM,

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Gordon Apple
t for changes in the primary column so you can reload the dependent column. On 4/12/10 5:15 PM, "Kyle Sluder" wrote: > On Mon, Apr 12, 2010 at 3:08 PM, Gordon Apple wrote: >> Thanks for the response, but that is what I have now and am trying to get >> away from.  I wan

Re: Font Style Names for iPhone/iPad

2010-04-14 Thread Gordon Apple
Yes, but no support for actually doing anything useful with CoreText. Can't comment on eventualities, but let's just say I'm not happy. (Sneezy from pollen, Sleepy from too much coding, Grumpy about lack of text support, but definitely not Happy :-) On 4/14/10 10:10 AM, "Matt Moriarity" wrote

Re: Overriding text size in NSTextStorage

2010-05-10 Thread Gordon Apple
There is a bug in the text system, which I have reported and filed previously. If you programmatically change the text, the KVO for the bindings is not triggered and will not update the text storage. If you then use the keyboard for another edit, it will trigger it and will commit both changes.

Subject: Re: iPad interface orientation basics

2010-05-17 Thread Gordon Apple
If you think that's confusing, wait until you try to use an external monitor and see what the rotation does to you. So far, I've successfully managed to counter-rotate the external view's window so my text stays upright, but getting the view and its contents to scale properly is proving more elusi

Undo/Redo Notifications

2010-05-22 Thread Gordon Apple
So far, I don't see what I need for enabling/disabling undo/redo buttons in iPhoneOS NSUndoManager. I want to implement an undo button/popover, a la Pages, for a UITextView. I know I can read canUndo/canRedo, but I need an active notification when undo status changes in order to enable/disable th

Re: Undo/Redo Notifications

2010-05-22 Thread Gordon Apple
mented it and, much to my surprise, it worked. On 5/22/10 8:02 PM, "Fritz Anderson" wrote: > On 22 May 2010, at 4:30 PM, Gordon Apple wrote: > >> So far, I don't see what I need for enabling/disabling undo/redo buttons in >> iPhoneOS NSUndoManager. I want

Re: Question about scaling text within a subView

2010-06-10 Thread Gordon Apple
Text will scale just fine by changing the view's bounds (or the transform) if you are NOT using a layer-backed view. I had to abandon this approach on the iPad because everything is layer-backed and it just scales pixels. On 6/10/10 4:04 AM, "cocoa-dev-requ...@lists.apple.com" wrote: > On 9 Ju

CoreData Problems

2010-07-05 Thread Gordon Apple
We're doing our first iPad (simulator only at this time) CoreData project and having a multitude of problems. We have a sectioned table in one of our tabs. The CD stack is created in the appDelegate's didFinishLaunchingWithOptions by using: self.fetchedResultsController.delegate = self; This se

Re. CoreData Problems

2010-07-05 Thread Gordon Apple
Addendum. Sorry -- should have included this. After the pre-load, I do another performFetch on the frc to make sure it gets everything in the database. Also, there are no error conditions, failed attempts, or console messages showing up anywhere. __

Managing Files with CoreData

2010-07-18 Thread Gordon Apple
I have a series of questions about using CoreData (iPad). Although CoreData is supposedly easy to use, I have found it anything but. It is extremely finicky and unforgiving. In fact, even with DTS support, I have never been able to get NSFetchedResultsController to work using a cache. I do have

Re: Managing Files with CoreData

2010-07-18 Thread Gordon Apple
On 7/18/10 6:14 PM, "Keary Suska" wrote: > On Jul 18, 2010, at 2:20 PM, Gordon Apple wrote: > >> I have a series of questions about using CoreData (iPad). Although CoreData >> is supposedly easy to use, I have found it anything but. > > I don't know

Re: Managing Files with CoreData

2010-07-19 Thread Gordon Apple
On 7/19/10 8:27 AM, "Keary Suska" wrote: > On Jul 18, 2010, at 8:19 PM, Gordon Apple wrote: > >>>> My main entity has three references (one-to-one and one-to-many) to >>>> identical entities defined as class "File" (a managed object). File

Re: Unnecessary Boolean Warning

2011-08-01 Thread Gordon Apple
preciate the warning. On 7/31/11 8:15 PM, "Graham Cox" wrote: > > On 01/08/2011, at 6:13 AM, Gordon Apple wrote: > >> Anybody who understands >> basic boolean operator precedence knows this is unnecessary. > > > True, but who does? I mean, sure, if ever

Re: Problems with UIAlertView

2011-08-16 Thread Gordon Apple
I¹m doing the same thing under iOS 4.3.3 with no problems (no private APIs). Is this liable to break under new OS? On 8/16/11 11:38 AM, "cocoa-dev-requ...@lists.apple.com" wrote: > On 15 Aug 2011, at 9:45 PM, Laurent Daudelin wrote: > >> > I'm having a problem with a UIAlertView that was worki

Re: Cocoa-dev Digest, Vol 8, Issue 783

2011-09-29 Thread Gordon Apple
There must already be an array for the table, so just iterate the array every minute or whatever (single repeating timer), compare the times to [NSDate date} and start or shut down whatever has not been started or shut down. Much easier than trying to manage timers. On 9/29/11 8:06 PM, "cocoa-de

Re: creating multiple NSTimers

2011-09-29 Thread Gordon Apple
Whoops, didn¹t reset the title. Sorry. On 9/29/11 8:25 PM, "Gordon Apple" wrote: > There must already be an array for the table, so just iterate the array every > minute or whatever (single repeating timer), compare the times to [NSDate > date} and start or shut down wh

Re: Is MKMapView just kinda messy?

2011-11-20 Thread Gordon Apple
Thanks, Kyle. This also fixed my problem with the MapView. Because MapView is so self-contained, I had it in a xib presented in a popover, and didn¹t even keep a reference to the MapView. (I do now.) On 11/20/11 2:01 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > On Sat, Nov 19, 2011 at 2:

Re: Drag and drop in collectionview

2012-01-29 Thread Gordon Apple
> If you are just trying to rearrange things in your list, you do not need to > get involved with the pasteboard. Rearranging arrays (or ordered sets) is a > little tricky, especially if you want to drag a dispersed collection to a > specific location which is in or after the extent of the selecti

Custom Accessors in Core Data

2011-02-02 Thread Gordon Apple
I would like to have scaler accesors and also standard (NSNumber) accessors in my managed objects. The docs show some ways to handle the former, e.g., "CGFloat myValue". I prefer not to cache. (I'm trying to retrofit an app to CoreData and prefer not to change all my code accesses to deal with N

Re: Custom Accessors in Core Data

2011-02-02 Thread Gordon Apple
y works until I get the rest of the scaler/Number accessors done and try it. On 2/2/11 1:50 PM, "Quincey Morris" wrote: > On Feb 2, 2011, at 09:52, Gordon Apple wrote: > >> I would like to have scaler accesors and also standard (NSNumber) accessors >> in my mana

Re: Custom Accessors in Core Data

2011-02-03 Thread Gordon Apple
The reason I did it the way I stated was that it is a retrofit of CoreData, and I didn't want to have to change a slew of accessor calls in existing code. Otherwise, I would agree. Doing it my way does require four accessors to be written instead of two. The form is similar for all scalers, so I

Common Font Style Names

2011-02-04 Thread Gordon Apple
This used to work, but not under iOS 4. - (NSString*)styleNameForIndex:(NSUInteger)index inFontFamily:(NSString*)famName { NSString* fontName = [[UIFont fontNamesForFamilyName:famName] objectAtIndex:index]; CTFontRef fontRef = CTFontCreateWithName((CFStringRef)fontName, 0.0, NULL); CFS

CoreData Migration Problems

2011-02-08 Thread Gordon Apple
I am trying to migrate an existing app CoreData database to a new version. Theoretically, this should be what's called a simple migration. I have not been able to get it to work. Just to see what it's trying to do, I went ahead and let it generate a mapping model, which appears to be correct. Bu

Re: CoreData Migration Problems

2011-02-08 Thread Gordon Apple
incey Morris" wrote: > On Feb 8, 2011, at 12:08, Gordon Apple wrote: > >>persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] >> initWithManagedObjectModel: self.managedObjectModel]; >> >>NSError *error = nil; >>

Re: CoreData Migration Problems

2011-02-10 Thread Gordon Apple
option is to make sure I know when it is migrating, set a flag somewhere, then use a fetch request to get all the mainEntity objects and add the new entity to each mainEntity. That's a PITA, and seems like a patch on what should have been a simple process. Any better ideas? On 2/9/11 3:45 AM

Sleep Notification

2011-02-12 Thread Gordon Apple
If it exists, could somebody point me to notifiers for sleep/wake in iOS? I have a comm link that goes down with sleep. I would like to bring it up again on wake (in case the user forgot to disable sleep). I'm already doing this for applicationWillEnterForeground, but that doesn't work for sleep

Re: UINavigationController in Popover

2011-02-14 Thread Gordon Apple
ionController >didShowViewController:(UIViewController *)viewController > animated:(BOOL)animated { > navigationController.contentSizeForViewInPopover = > viewController.contentSizeForViewInPopover; > } > > To be sure, I'm just doing here what I would have expec

Re: Sleep Notification

2011-02-15 Thread Gordon Apple
, 12 Feb 2011 13:01:28 -0600, Gordon Apple said: >> If it exists, could somebody point me to notifiers for sleep/wake in iOS? >> >> I have a comm link that goes down with sleep. I would like to bring it up >> again on wake (in case the user forgot to disable s

Re: Fast way to grab the screen

2011-02-24 Thread Gordon Apple
What I would like is the ability to capture video from the contents of a window, regardless of whether it is on top, or even on the screen. If it contained video, it would also be nice to synchronize capture with the contained video content. (In a perfect world.) I don't know how you would handl

Notifications and Subclassing

2011-03-08 Thread Gordon Apple
Class A: NSObject, has methods: - (void)foo:(Notification*)notification { ... } - (void)addObservers { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(foo:) name:notif

Re: Notifications and Subclassing

2011-03-08 Thread Gordon Apple
Yup. Right you are. Thanks. This was originally a singleton class where it wouldn't have shown up. That changed in redesign when we started switching different subclasses, which caused the problem. On 3/8/11 10:07 AM, "glenn andreas" wrote: > > On Mar 8, 2011, at

Popover Shrinks beyond Indicator

2011-03-21 Thread Gordon Apple
I have a popover with a navigation controller, which launches from a button near the right side of (and at toe top of) the screen. Subsequent smaller panels within the popover downsize correctly, but resizing is always by moving in the right side of the popover, often beyond the anchor point for t

Re: Popover Shrinks beyond Indicator

2011-03-21 Thread Gordon Apple
Because this is a public forum, I assumed it would be clear I was referring to iOS. I know nothing about Lion. Haven¹t even downloaded it. On 3/21/11 3:59 PM, "Corbin Dunn" wrote: > Hi Gordon, > > On Mar 21, 2011, at 12:34 PM, Gordon Apple wrote: > >> > I h

Detecting Bluetooth Keyboard and getting key clicks

2011-05-24 Thread Gordon Apple
Googling this has produced nothing useful, just undocumented APIs, which is a sure way to get an iOS app rejected. Two questions: 1. How to detect the presence of a Bluetooth keyboard? I need this because I only want response when the Bluetooth keyboard is present, and not display the virtual ke

Re: Re: Linearly Scaling Text

2011-05-30 Thread Gordon Apple
When I implemented a scalable teleprompter screen in MacOS, I did it by rendering the text in a narrow view that was scaled down by the scale factor, then scaled the view up to fill the containing view. With a little work, it was fully editable. I was not using CALayers at the time. When I tried t

Re: Linearly Scaling Text

2011-05-30 Thread Gordon Apple
Actually, I wasn¹t talking about tiled layers, although that might also be relevant. I was talking about tiled views. There is some sample code available for tiled views, but it took some massaging to get it to do what I wanted. I only tiled my view vertically and used half of a screen height fo

Dismissing a Popover Internally

2011-07-20 Thread Gordon Apple
UIPopoverController has a UINavigationController. Is there any decent way to access the UIPopoverController inside a popover view to dismiss it? The only way I have come up with is to either pass the reference down the chain, or at least put it into in the root view. In the latter case you can g

Re: Dismissing a Popover Internally

2011-07-21 Thread Gordon Apple
passing the reference down the line to everyone. On 7/20/11 2:30 PM, "Matt Neuburg" wrote: > On Wed, 20 Jul 2011 12:32:07 -0500, Gordon Apple said: >> UIPopoverController has a UINavigationController. Is there any decent way >> to access the UIPopoverController inside

Unnecessary Boolean Warning

2011-07-31 Thread Gordon Apple
The following expression generates a warning message (³&&² within ³||²) and says to include the ³anded² expression in parens. Anybody who understands basic boolean operator precedence knows this is unnecessary. Bug report? BOOL isInUse = [super mediaIsInUse]; isInUse = isInUse || [self v

Re: Unnecessary Boolean Warning

2011-07-31 Thread Gordon Apple
Sorry, that should have been posted to Xcode. On 7/31/11 3:13 PM, "Gordon Apple" wrote: > The following expression generates a warning message (³&&² within ³||²) and > says to include the ³anded² expression in parens. Anybody who understands > basic boolean operat

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

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. I'

Re: NSTextView Bad Behavior

2009-12-14 Thread Gordon Apple
, and slow scrolling. It still has a few issues, but mostly works. On 12/14/09 12:55 PM, "Douglas Davidson" 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

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

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" 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 s

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 leve

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 t

New Tablet

2010-01-05 Thread Gordon Apple
I realize that we are not going to get any answers here at this time. My question is whether developer info will be forthcoming simultaneously with the announcement expected later this month (according to today's WSJ article). It would be nice to know if this is a full MacOS/Cocoa or an extended

Formatter for NSTextFierld in IB

2010-02-07 Thread Gordon Apple
Is there an IB issue with setting custom Formatters? I've successfully used a custom formatter with table views, but when I try to use the same formatter with an NSTextField, IB will not let me change the formatter file to my custom formatter. I have to set it programmatically. Bug? __

Re: Formatter for NSTextFierld in IB

2010-02-07 Thread Gordon Apple
ormatter is just a subclass of NSFormatter. I wish NSDateFormatter or NSDatePicker would allow using 24-hr time without changing system prefs. Then I wouldn't have to use my own formatter for setting/displaying NSTimeIntervals. On 2/7/10 2:32 PM, "Kyle Sluder" wrote: > On Sun, Fe

Re: What classes have -init?

2010-02-11 Thread Gordon Apple
It's unfortunate that all initializers don't at least call "init" internally. That would make subclassing easier if all one needs is to set a few ivars. In the earlier days of MacApp (Pascal and first C++ versions) there was a basic initializer, similar to "init", called by all classes, just for

Re: What classes have -init?

2010-02-11 Thread Gordon Apple
My point was that if you could count on "init" being called internally and all you needed was to initialize some ivars, you could override "init" and not have to override the (sometimes more involved) designated initializer and possibly other initializers. You could still use the (superclass) desi

Re: What classes have -init?

2010-02-11 Thread Gordon Apple
classes have -init? > To: Cocoa-Dev List > Message-ID: <6ea60c25-38cb-447a-832f-96f17a865...@me.com> > Content-Type: text/plain; charset=us-ascii > > > On Feb 11, 2010, at 12:08 pm, Gordon Apple wrote: > >> My point was that if you could count on "init"

Document not Saving Text View Attachment

2010-02-20 Thread Gordon Apple
I have a window with an NSTextView. If I edit the text normally, even adding a single character, it behaves properly, I can save, close, reopen, and the change is present. If I close after edit, it asks to save, like it is supposed to. However, if I programmatically insert an attachment (wi

Re: Document not Saving Text View Attachment

2010-02-20 Thread Gordon Apple
:@"$"] atIndex:index]; [store endEditing]; The edit works, but it's just not committing the result. If I type another character elsewhere, then it saves both correctly. On 2/20/10 3:34 PM, "Kyle Sluder" wrote: > On Sat, Feb 20, 2010 at 9:11 AM, Gordon Apple wrote: >>    [s

Re: Document not Saving Text View Attachment

2010-02-20 Thread Gordon Apple
just not committing the result. If I type another character elsewhere, then it saves both correctly. On 2/20/10 3:34 PM, "Kyle Sluder" wrote: > On Sat, Feb 20, 2010 at 9:11 AM, Gordon Apple wrote: >>    [store insertAttributedString:string atIndex:index]; >>    NSRang

Re: Document not Saving Text View Attachment

2010-02-21 Thread Gordon Apple
ot;XYZ" at the caret. It all gets called, index is correct, but nada, zilch, zip. No change. Anything obviously wrong with the above? On 2/21/10 2:02 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > On Sat, Feb 20, 2010 at 2:33 PM, Gordon Apple wrote: >> Like I said

Re: Document not Saving Text View Attachment

2010-02-21 Thread Gordon Apple
p a dummy ivar and a dependency to make it update. On 2/21/10 7:24 PM, "Kyle Sluder" wrote: > On Sun, Feb 21, 2010 at 2:00 PM, Gordon Apple wrote: >> This is getting stranger by the minute.  I ruled out the menu issue as the >> cause, then created a test app from the standard

Re: Document not Saving Text View Attachment

2010-02-22 Thread Gordon Apple
eport, unless there is > something else I can do to trigger the KVO for programmatic edits. > > I suppose a workaround could be to set up a dummy ivar and a dependency to > make it update. > > On 2/21/10 7:24 PM, "Kyle Sluder" wrote: > >> On Sun, Feb 21, 2010

Re: Subtitle Track

2009-06-15 Thread Gordon Apple
This is a QuickTime question, not Cocoa. I was just looking into this recently. A text track is part of the movie. A subtitle track is an optional track usually depending on option settings and the machine's language settings. Yes, you can have multiple languages. Google it and you sho

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" wrote: > so is CGAffineTransform conside

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, bu

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" wrote: > Hi All, > > Does anyone know

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 com

Scroller With CATiledLayer Running out of Memory

2010-08-06 Thread Gordon Apple
I have a very long text view (CoreText) for iPad. It a CATiledLayer, 1024 x 512 tiles. I'm doing optimized drawing (first to last line) in drawRect, which gets called for each tile. I have a vertical slider that appears when you tap the right side in order to fast (live) scroll when needed. I'm

Re: Scroller With CATiledLayer Running out of Memory

2010-08-06 Thread Gordon Apple
x27;m skeptical. Even if it helps, I would still like to be able to render far longer documents and I fear I'm going to run into the same problem when somebody fast scrolls. On 8/6/10 3:23 PM, "David Duncan" wrote: > On Aug 6, 2010, at 12:29 PM, Gordon Apple wrote: > >>

Re: Scroller With CATiledLayer Running out of Memory

2010-08-06 Thread Gordon Apple
w crashing all over the place, even though (for testing) I went back to native tile size and no optimized drawing. Unfortunately, running out of memory, the stack trace leads back to the run loop and provides nothing useful. On 8/6/10 7:13 PM, "David Duncan" wrote: > On Aug 6, 2010, a

  1   2   3   4   >