No TCP connection established after ARP request

2010-12-21 Thread Remco Poelstra
Hi, I hope this is not too much off topic, but my iPhone app tries to establish a TCP connection over Wifi. I noticed that sometimes (about 30% of the attempts), a connection is refused. I do see an ARP request, but there is no TCP SYN packet following after the answer. Is this a bug in iOS?

UKKQueue and CVS

2010-12-21 Thread Martin Hewitson
Dear list, I have implemented an editor where I use UKKQueue to handle changes to the file by other apps. The problem is that I don't get a notification if the file is committed to a CVS repository (or an SVN repository, for that matter). Looking at the file on disk, CVS does change the file

Text display consistency

2010-12-21 Thread Kenneth Baxter
Hi, I have an application that needs to display text on both Mac OS X and on iOS. I'm sticking to core technologies for my drawing and drawing all my stuff into cgcontexts for maximum portability. I sometimes need the user to edit the text, so am planning to add a subview (NSTextView /

Text rendering/editing on OSX iOS

2010-12-21 Thread Kenneth Baxter
Hi, I have an application which I plan to roll out on both iOS and MacOS X, and it needs to display text in various places on a series of views. I am doing all the drawing using the Core technologies (CGContext drawing) to make the maximum reuse of code. I've done most of the graphical stuff

Re: Text rendering/editing on OSX iOS

2010-12-21 Thread Ricky Sharp
On Dec 21, 2010, at 7:04 AM, Kenneth Baxter wrote: Hi, I have an application which I plan to roll out on both iOS and MacOS X, and it needs to display text in various places on a series of views. I am doing all the drawing using the Core technologies (CGContext drawing) to make the

Improving drawing of UIView with many many Subviews

2010-12-21 Thread Gustavo Adolfo Pizano
Hello all. I have a problem, Im encoding many subviews of class CustomUIView, each of it draws a CGImageRef, now, the encoding part its great, fast. Also decoding, It decodes great each sub class. but then when I add the custom view to the parent view the nightmare starts. this is my method

Re: Text rendering/editing on OSX iOS

2010-12-21 Thread Kenneth Baxter
Thanks Ricky, this is a very drawing-heavy application, so I think it's probably worth a little pain to get it mostly drawing cross platform, and then wrap the platform specific UI around that. I'm mostly there with that approach. Being the same refers to the size, position, rendering between

Re: No TCP connection established after ARP request

2010-12-21 Thread Fritz Anderson
On 21 Dec 2010, at 3:53 AM, Remco Poelstra wrote: I hope this is not too much off topic, but my iPhone app tries to establish a TCP connection over Wifi. You may have better luck on the macnetworkprog list. Despite the historical name, it covers Darwin networking on all platforms. —

Re: Performance: Drawing hundreds of short text strings

2010-12-21 Thread tra...@postfl.com
Hi Mike, Seconding Sherm and Joar, this will be the easiest way to get started. Down the line, if that doesn't work, have a look at Core Text. Also, I have been developing an application for drawing with text. I draw a few hundred individual letters at a time, then commit them to a graphics

Re: Recovering from a merge conflict

2010-12-21 Thread Fritz Anderson
On 21 Dec 2010, at 8:36 AM, Paulo Andrade wrote: int tries = 10; while ( tries-- ) { // compute this batch [moc save:error]; if (error != nil [error code] == NSManagedObjectMergeError) { This may not be your main problem, but you should never inspect a returned error object

Re: access multiple NSTextFields as an array?

2010-12-21 Thread Leonardo
You can quickly iterate (and read) the array that way for(NSTextField* aField in fieldsArray){ [aField doSomething]; } So you don't need to count the items and iterate. Regards -- Leonardo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Performance: Drawing hundreds of short text strings

2010-12-21 Thread Leonardo
You could create an array of objects grouping the parameters of your strings For example: typedef struct { NSAttributedString*text; // it already contains color and font NSPoint position; } MyObj; Or you can even create your own class MyObj The you create the

Waiting for UIWebView with Dispatch Semaphores

2010-12-21 Thread Jeff Kelley
I’m trying to create a synchronous method on iOS (4.2.1) to create a thumbnail image for a PowerPoint file. To accomplish this, I want to load the file into a web view, then wait for it to load, then render its context into a new graphics context and save it to an image. Here’s what I have so far:

Re: Improving drawing of UIView with many many Subviews

2010-12-21 Thread David Duncan
Why not just use a UIImageView instead of implementing a custom UIView subclass to do this? If this is all you are doing a UIImageView is very often the superior choice. On Dec 21, 2010, at 6:46 AM, Gustavo Adolfo Pizano wrote: and this is the drawrect method of the BCItemView // Only

Re: Waiting for UIWebView with Dispatch Semaphores

2010-12-21 Thread David Duncan
On Dec 21, 2010, at 8:52 AM, Jeff Kelley wrote: Is there a way to synchronously wait for the web view? All combinations of splitting things off on separate threads fall apart when I try to wait for the image to be created. Why do this synchronously at all? The web view already gives you a

Re: Waiting for UIWebView with Dispatch Semaphores

2010-12-21 Thread Jeff Kelley
On Tue, Dec 21, 2010 at 11:59 AM, David Duncan david.dun...@apple.com wrote: Why do this synchronously at all? The web view already gives you a notification, use that to generate your thumbnail and signal the caller. What I’m trying to do is create a thumbnail for a PowerPoint that, when

Re: Improving drawing of UIView with many many Subviews

2010-12-21 Thread Gustavo Pizano
Aha,,, I thought using UIView instead would be better, but I guess I was wrong.. I will then make the modifications then and see.. Thanks for the help I will keep you informed.. G. On Dec 21, 2010, at 5:57 PM, David Duncan wrote: Why not just use a UIImageView instead of implementing a

Re: Recovering from a merge conflict

2010-12-21 Thread Paulo Andrade
On Dec 21, 2010, at 3:08 PM, Fritz Anderson wrote: On 21 Dec 2010, at 8:36 AM, Paulo Andrade wrote: int tries = 10; while ( tries-- ) { // compute this batch [moc save:error]; if (error != nil [error code] == NSManagedObjectMergeError) { This may not be your main problem, but

App submission

2010-12-21 Thread Dan Hopwood
Hi, Apologies if this question is inappropriate for this mailing list - if someone is able to point me in the direction of where I need to ask or has any information themselves I would be very grateful. I am trying to find out how app submission is affected over the Christmas period. I would

Re: App submission

2010-12-21 Thread Chris Williams
Shut down from Thurs the 23rd through Tues the 28th. From: Dan Hopwood d...@biasdevelopment.com Date: Tue, 21 Dec 2010 12:39:22 -0500 Subject: App submission I am trying to find out how app submission is affected over the Christmas period.

Re: Performance: Drawing hundreds of short text strings

2010-12-21 Thread Aki Inoue
Yes, we optimized NSStringDrawing API since the documentation discouraging its use was first written. In fact, for some of short simple string rendering, it's the fastest on the platform (use -drawWithRect:... variants for the maximum efficiency if possible). So, as already mentioned, use the

Re: Improving drawing of UIView with many many Subviews

2010-12-21 Thread Gustavo Pizano
David hello. I just wanted to update you. So I did the modification to subclass UIImageView instead, and just added the userInteractionsEnable to YES, modify my NSCoding protocols methods + I add a category for th eUIImage (NSCoding) methods, and all seemd to work perfectly, saving time its

Re: Performance: Drawing hundreds of short text strings

2010-12-21 Thread Kyle Sluder
On Dec 21, 2010, at 11:04 AM, Aki Inoue a...@apple.com wrote: Note CoreText is a core layout engine, a building block for higher-level text engines such as AppKit. It doesn't necessarily perform better than higher-level engines which are caching by utilizing contextual info available. Is

Creating an NSImage of a View and its Contents

2010-12-21 Thread Stephen Blinkhorn
Hi all, I'm trying to capture a view and its contents as an NSImage which I can subsequently draw in the view. The idea is that I'm trying to 'freeze' the view's content (custom sliders, buttons, menus etc) and present this image in the view. I'm getting mixed results when attempting to

Re: Creating an NSImage of a View and its Contents

2010-12-21 Thread Corbin Dunn
Hi Stephen, This was done in the AnimatedTableView demo app available on the dev site. Check it out and let me know if you need pointing to the particular part of code that does it. corbin On Dec 21, 2010, at 12:11 PM, Stephen Blinkhorn wrote: Hi all, I'm trying to capture a view and its

Re: Creating an NSImage of a View and its Contents

2010-12-21 Thread Corbin Dunn
I'll just copy the code here for you: NSRect visibleRect = [_oldContentView visibleRect]; NSBitmapImageRep *imageRep = [_oldContentView bitmapImageRepForCachingDisplayInRect:visibleRect]; [_oldContentView cacheDisplayInRect:visibleRect toBitmapImageRep:imageRep];

Re: Creating an NSImage of a View and its Contents

2010-12-21 Thread Stephen Blinkhorn
On 21 Dec 2010, at 15:10, Corbin Dunn wrote: I'll just copy the code here for you: NSRect visibleRect = [_oldContentView visibleRect]; NSBitmapImageRep *imageRep = [_oldContentView bitmapImageRepForCachingDisplayInRect:visibleRect]; [_oldContentView cacheDisplayInRect:visibleRect

Vertical Asian Text in Cocoa

2010-12-21 Thread Abdul Sowayan
Hi folks, As I understood it several years ago, there was no native support in Cocoa for rendering vertical Japanese text. Note that certain punctuation and compound characters are supposed to render differently when drawing in the vertical orientation than they normally would when drawing

CALayer and pixel alignment

2010-12-21 Thread Gideon King
I am drawing some CALayers, and use code like what I have below so I can draw exactly on pixels. When I draw it in my CALayer drawing code, it's not always pixel aligned. It's certainly better than if I had done no rounding, but still it is not correct. Is there something I'm not doing right?

UIWebview: scrolling vs anchors - followup

2010-12-21 Thread Donald Hall
On December 20 I wrote: - I have a UIWebview in my app that I want to use to load an HTML document containing anchors so that I can jump around the document by tapping on the links to the various anchors. (e.g. a link at the bottom of the page to jump to the top of

Strange error solved by turning off Non-contiguous Layout

2010-12-21 Thread Brad Stone
I have an NSTextView that has about 1,900 characters in it. Just regular text. If I edit the text and save my app hangs at [[self managedObjectContext] commitEditing]; I found setting nonContinuousLayout to NO in the NSTextView prevents the hang but that's not really solving the problem.

Exception Location

2010-12-21 Thread Richard Somers
The following exception message that is being sent by the frameworks: - [NSCFArray objectAtIndex:]: index (x) beyond bounds (y) The method 'objectAtIndex:' is called in many location within the code base but the console message gives no indication where the error occurred. The error is

hacked email account

2010-12-21 Thread Maryanna Rogers
Hi I am writing to you because you are the most contacted addresses from this account. I have rarely used this account and just realized that someone has hacked into it multiple times and is using my name in public forums. Please contact me at maryannarog...@yahoo.com if you have any

Re: Strange error solved by turning off Non-contiguous Layout

2010-12-21 Thread Ken Thomases
On Dec 21, 2010, at 10:08 PM, Brad Stone wrote: I have an NSTextView that has about 1,900 characters in it. Just regular text. If I edit the text and save my app hangs at [[self managedObjectContext] commitEditing]; I found setting nonContinuousLayout to NO in the NSTextView prevents

Re: Exception Location

2010-12-21 Thread Ken Thomases
On Dec 21, 2010, at 11:25 PM, Richard Somers wrote: The following exception message that is being sent by the frameworks: -[NSCFArray objectAtIndex:]: index (x) beyond bounds (y) The method 'objectAtIndex:' is called in many location within the code base but the console message gives no

Re: CALayer and pixel alignment

2010-12-21 Thread Seth Willits
On Dec 21, 2010, at 4:09 PM, Gideon King wrote: When I draw it in my CALayer drawing code, it's not always pixel aligned. You need to make sure the layer is aligned correctly too. The anchor point by default is {0.5, 0.5}. If you place an oddly-sized layer on X.0 coordinate, it'll be

Re: CALayer and pixel alignment

2010-12-21 Thread Gideon King
Yeah, that crossed my mind too, and I thought I had tried that, but I have just gone back through my code and found that there was a parent layer where I hadn't set it to an integral frame. I fixed that, and it's now working perfectly - looks so much better! Thanks for triggering me to look