Re: text orientation/positioning with layout manager

2011-01-31 Thread Todd Heberlein
On Jan 31, 2011, at 3:23 PM, Aki Inoue wrote: > The precise definition of the point specified by the argument is the top left > corner of the text container containing the glyph range in the focused view > coordinate system. This flipped view for fonts confuses me a bit because the fonts are or

Re: worker thread iterating over array - SLOW

2011-01-31 Thread Peter Lübke
Thanks Ken, I was afraid to get an answer like this:-) Am 01.02.2011 um 02:07 schrieb Ken Thomases: On Jan 31, 2011, at 5:13 PM, Peter Lübke wrote: I use a worker thread in my app that invokes the same method(s) on all objects in an array sent from the main thread. The array may contain t

Bizarre behaviour of NSFontDescriptor and/or NSCharacterSet

2011-01-31 Thread Brian Schack
I have a small application that exhibits behaviour so strange that I can't even begin to explain what bug might possibly be responsible for it. I'm thinking of submitting a bug report to Apple, but first I'd like someone else to take a look at it to see if I haven't made some silly mistake or assu

Re: iPhone puzzle about rotation

2011-01-31 Thread WT
On Jan 31, 2011, at 11:16 PM, David Rowland wrote: > Is there something that defeats the delivery of rotate events to a view > controller? This may or may not be the case with your app, but a UITabBarController vetoes device orientation change events to its managed view controllers unless every

Re: text orientation/positioning with layout manager

2011-01-31 Thread David F.
Douglas -- Something somewhere must be trying to compensate for the unflipped context, because the text isn't drawn upside-down. Yes, the positioning is calculated with the assumption that the context is flipped, and effects like strikethrough and underline are drawn with the assumption that th

-[CALayer setContents:] slower in iOS 4.2?

2011-01-31 Thread Julian Wood
We have a game engine of sorts, developed under 3.2. It did use NSTimer to fire off the game loop, but now uses CADisplayLink, at 15fps. The game loop basically sends messages to as many as 15 sprites, telling them to update their position and their frame. A sprite is in essence a CALayer, and w

Re: worker thread iterating over array - SLOW

2011-01-31 Thread Ken Thomases
On Jan 31, 2011, at 8:48 PM, Peter Lübke wrote: > Thanks Ken, You're welcome. > Am 01.02.2011 um 02:07 schrieb Ken Thomases: > >> So, you have effectively failed to shift the work from the main thread to >> the worker thread. The main thread is a "server" doing all of the work on >> the beha

Re: text orientation/positioning with layout manager

2011-01-31 Thread Graham Cox
On 01/02/2011, at 1:04 PM, Todd Heberlein wrote: > For now, if I want my string drawn on a base line beginning at the point > basePoint, I currently define a glyphPoint which subtracts the font's > pointSize from the basePoint's Y value. So far it seems to work on a variety > of font sizes. Ar

Re: text orientation/positioning with layout manager

2011-01-31 Thread Ross Carter
On Jan 31, 2011, at 10:53 PM, David F. wrote: > So why aren't glyphs drawn upside-down when the context hasn't been flipped?! Why do you think they should be upside down? Flippedness is implicated in determining the origin point of the text container. Text containers themselves are always right

Re: text orientation/positioning with layout manager

2011-01-31 Thread Ross Carter
On Jan 31, 2011, at 9:04 PM, Todd Heberlein wrote: > For now, if I want my string drawn on a base line beginning at the point > basePoint, I currently define a glyphPoint which subtracts the font's > pointSize from the basePoint's Y value. So far it seems to work on a variety > of font sizes. A

Re: NSTableView selecting text within a cell [SOLUTION]

2011-01-31 Thread Ben Golding
On 31/01/2011, at 16:30, Ben Golding wrote: > I have an app with a NSTableView where the data is presented to the user. > When the user hits "Find", I'd like to be able to scroll the table view to > the visible cell (easy enough) and then select the range that matched within > that field (not

array controllers and key paths

2011-01-31 Thread Amy Heavey
Hi, I've got 3 entities, Event, CustomerOrders and CustomerORderITems. Events has a to many relationship (eventOrders) to CustomerOrders CustomerOrders has a to many relationship (customerOrderItems) to CustomerOrderItems I'd like to be able to list all of the CustomerOrderItems for a sele

Re: Initializing NSWindow with Carbon window

2011-01-31 Thread Kyle Sluder
On Sun, Jan 30, 2011 at 11:45 PM, Andrew James wrote: > I've done some investigating and still getting the behavior that the window > does > not display from the code below > > Interestingly,  if you look at the two ShowWindow/SelectWindow pairs. I will > see > the window when the first one is u

Re: Add a view (xib) to a project

2011-01-31 Thread Uli Kusterer
On 30.01.2011, at 22:59, Max Stottrop wrote: > But now to my question. Can anyone of you explain me (slowly;)) how to add > another view (.xib) file to my iPhone project? I tried several things, but > none worked for me. Thanks in advance. There are two steps to this: 1) Create a UIViewContro

Re: Initializing NSWindow with Carbon window

2011-01-31 Thread Uli Kusterer
On 30.01.2011, at 11:17, Andrew James wrote: > I have a legacy builder class that creates a Carbon window and I want to > initialize an NSWindow with this WindowRef. What for? What are you trying to achieve? Nonestly, I wouldn't recommend mixing Carbon and Cocoa windows in the same application.

Tab bar controller inside a navigation controller, how to adjust the view height

2011-01-31 Thread ico
I am trying to implement an app similar as "tweetie" applicatin, use UIViewController to implement a custom TabBarController that can be pushed in a navigation stack. This has been discussed before as shown here: http://stackoverflow.com/questions/576764/tab-bar-controller-inside-a-navigation-cont

Re: Initializing NSWindow with Carbon window

2011-01-31 Thread Andrew James
The application I'm writing hosts Audio Units. Many latest rev quite relevant Audio Units still only support a Carbon based AU view. So at this point, without thumbing my nose at the plug-in industry, I have to support Carbon based Audio Unit views as well as Cocoa based Audio Unit views. Ch

Re: Initializing NSWindow with Carbon window

2011-01-31 Thread Uli Kusterer
On Jan 31, 2011, at 4:57 PM, Andrew James wrote: > The application I'm writing hosts Audio Units. Many latest rev quite > relevant > Audio Units still only support a Carbon based AU view. So at this point, > without thumbing my nose at the plug-in industry, I have to support Carbon > based >

Re: Help Book authoring tool?

2011-01-31 Thread Ross Carter
On Jan 30, 2011, at 2:03 PM, Luc Van Bogaert wrote: > Hello, > > I would like to solicite some recommendations for an authoring tool to create > help books. I'm looking for a preferably freeware application, with a decent > html editor. Well, there is Helpify, which uses Omni Outliner. Persona

Re: NSTableView selecting text within a cell

2011-01-31 Thread Ross Carter
On Jan 31, 2011, at 12:30 AM, Ben Golding wrote: > I have an app with a NSTableView where the data is presented to the user. > When the user hits "Find", I'd like to be able to scroll the table view to > the visible cell (easy enough) and then select the range that matched within > that field

Re: NSTableView selecting text within a cell

2011-01-31 Thread Corbin Dunn
On Jan 30, 2011, at 9:30 PM, Ben Golding wrote: > > I have an app with a NSTableView where the data is presented to the user. > When the user hits "Find", I'd like to be able to scroll the table view to > the visible cell (easy enough) and then select the range that matched within > that fie

Re: Help Book authoring tool?

2011-01-31 Thread John Velman
On Sun, Jan 30, 2011 at 08:03:23PM +0100, Luc Van Bogaert wrote: > Hello, > > I would like to solicite some recommendations for an authoring tool to create > help books. I'm looking for a preferably freeware application, with a decent > html editor. > > Thanks, > > -- > Luc Van Bogaert Once

Re: Initializing NSWindow with Carbon window

2011-01-31 Thread Kyle Sluder
On Mon, Jan 31, 2011 at 7:57 AM, Andrew James wrote: > The application I'm writing hosts Audio Units.  Many latest rev quite relevant > Audio Units still only support a Carbon based AU view.  So at this point, > without thumbing my nose at the plug-in industry, I have to support Carbon > based >

Re: Help Book authoring tool?

2011-01-31 Thread Matt Neuburg
On Sun, 30 Jan 2011 20:03:23 +0100, Luc Van Bogaert said: >Hello, > >I would like to solicite some recommendations for an authoring tool to create >help books. I'm looking for a preferably freeware application, with a decent >html editor. I rolled my own: http://www.apeth.com/RubyFrontierDocs

Re: Tab bar controller inside a navigation controller, how to adjust the view height

2011-01-31 Thread Matt Neuburg
On Mon, 31 Jan 2011 20:29:47 +0800, ico said: >I am trying to implement an app similar as "tweetie" applicatin, use >UIViewController to implement a custom TabBarController that can be pushed >in a navigation stack. This has been discussed before as shown here: > >http://stackoverflow.com/question

Re: Help Book authoring tool?

2011-01-31 Thread Warren Dodge
On Jan 30, 2011, at 11:03 AM, Luc Van Bogaert wrote: > Hello, > > I would like to solicite some recommendations for an authoring tool to create > help books. I'm looking for a preferably freeware application, with a decent > html editor. > > Thanks, An article on using VoodooPad http://www.ma

Re: what are the disadvantages in keeping libraries and input files inside app bundle

2011-01-31 Thread Paul M
On 29/01/2011, at 2:08 AM, Dave Carrigan wrote: This is the preferred method of deployment. Experienced Mac users hate it when an installation scatters crud all over the filesystem. You should especially not be polluting /usr/local/lib. The sole reason for the existance of /usr/local/lib is

Re: Help Book authoring tool?

2011-01-31 Thread Jerry Krinock
You should look at some of the solutions which have been suggested, and try *really hard* to accept them as they are, or with minor modifications if they are open-sourced. Unfortunately, I was unable to do so, and succumbed to the temptation to roll my own, as others have done. It works great,

text orientation/positioning with layout manager

2011-01-31 Thread Todd Heberlein
I'm doing a simple experiment using NSTextStorage, NSLayoutManager, NSTextContainer to draw some text (I am basing this on the CircleView example because I want some of that orientation power later). I have found that when rendering the text using drawGlyphsForGlyphRange:atPoint:, I don't get t

Re: text orientation/positioning with layout manager

2011-01-31 Thread Douglas Davidson
The layout manager expects to be drawing within a flipped context. Douglas Davidson On Jan 31, 2011, at 2:09 PM, Todd Heberlein wrote: > I'm doing a simple experiment using NSTextStorage, NSLayoutManager, > NSTextContainer to draw some text (I am basing this on the CircleView example > because

Main menu in NSDocument based application

2011-01-31 Thread Bruce Cresanta
Hello, I've been scouring through the docs trying to figure out how to get a reference to the main menu in an NSDocument based app.I need to make programmatic changes to the menu depending on which NSDocument is key. Would you please help me find a pointer to the main menu? Thank

Re: Main menu in NSDocument based application

2011-01-31 Thread Lee Ann Rucker
On Jan 31, 2011, at 2:25 PM, Bruce Cresanta wrote: > Hello, > > I've been scouring through the docs trying to figure out how to get a > reference to the main menu in an NSDocument based app.I need to make > programmatic changes to the menu depending on which NSDocument is key. > W

Re: Main menu in NSDocument based application

2011-01-31 Thread Sherm Pendley
On Mon, Jan 31, 2011 at 5:25 PM, Bruce Cresanta wrote: > >        I've been scouring through the docs trying to figure out how to get a > reference to the main menu in an NSDocument based app.    I need to make > programmatic changes to the menu depending on which NSDocument is key.   > Would y

Re: Main menu in NSDocument based application

2011-01-31 Thread Bruce Cresanta
Thank you, I needed to know about the responder chain... The thing is well thought out. Bruce On Jan 31, 2011, at 3:43 PM, Sherm Pendley wrote: > On Mon, Jan 31, 2011 at 5:25 PM, Bruce Cresanta wrote: >> >>I've been scouring through the docs trying to figure out how to get a >> re

worker thread iterating over array - SLOW

2011-01-31 Thread Peter Lübke
Hi list, I use a worker thread in my app that invokes the same method(s) on all objects in an array sent from the main thread. The array may contain thousands of objects. The main thread communicates with the worker thread via distributed objects. Everything works fine except performance

Re: text orientation/positioning with layout manager

2011-01-31 Thread Graham Cox
On 01/02/2011, at 9:09 AM, Todd Heberlein wrote: > I'm doing a simple experiment using NSTextStorage, NSLayoutManager, > NSTextContainer to draw some text (I am basing this on the CircleView example > because I want some of that orientation power later). > > I have found that when rendering th

Re: text orientation/positioning with layout manager

2011-01-31 Thread Aki Inoue
The precise definition of the point specified by the argument is the top left corner of the text container containing the glyph range in the focused view coordinate system. Aki On Jan 31, 2011, at 3:18 PM, Graham Cox wrote: > > On 01/02/2011, at 9:09 AM, Todd Heberlein wrote: > >> I'm doing

Re: worker thread iterating over array - SLOW

2011-01-31 Thread Peter Lübke
Am 01.02.2011 um 00:20 schrieb A.M.: On Jan 31, 2011, at 6:13 PM, Peter Lübke wrote: Hi list, I use a worker thread in my app that invokes the same method(s) on all objects in an array sent from the main thread. The array may contain thousands of objects. The main thread communicates wi

New to internationalization

2011-01-31 Thread Bruce Cresanta
Hello, I would like to internationalize my app. Does anyone know of a good tutorial. The docs are pretty good, but a tutorial would be helpful. I plan to target 2 languages to begin with. Thanks, Bruce ___ Cocoa-dev mailing list (Cocoa

Re: worker thread iterating over array - SLOW

2011-01-31 Thread Ken Thomases
On Jan 31, 2011, at 5:13 PM, Peter Lübke wrote: > I use a worker thread in my app that invokes the same method(s) on all > objects in an array sent from the main thread. The array may contain > thousands of objects. > The main thread communicates with the worker thread via distributed objects. >

iPhone puzzle about rotation

2011-01-31 Thread David Rowland
I create a minimal view-based app from an Xcode template, and I implement these UIViewController methods, - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterface