MKAnnotation coordinate

2010-11-09 Thread Dan Hopwood
Hi all, This is a quick and simple question - for some ridiculous reason I can't work out how it should be done properly and it couldn't be more frustrating. I'd be really grateful if someone could help me out. Ok so I am working with MKAnnotations on my map view and want to know the * correct*

sizeof a function

2010-11-09 Thread Gerriet M. Denkmann
These lines: typedef char *(*my_type)(const char *, int); my_type some = index; fprintf(stderr,sizeof(index): %lu\n, sizeof(index)); fprintf(stderr,sizeof(some): %lu\n, sizeof(some)); produce: sizeof(index): 1 sizeof(some): 8 This is x86_64 so the pointer-size should be 8 bytes. But why is the

Re: NSTextFieldCell multi-line

2010-11-09 Thread Micha Fuhrmann
Thanks for your respons, but I need the exacte size in points, which means drawing with the right Font etc. So here's where I am in - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row I'm calling a function which calculates the height needed for the text and that's what

Re: sizeof a function

2010-11-09 Thread Kyle Sluder
On Mon, Nov 8, 2010 at 9:06 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: typedef char *(*my_type)(const char *, int); my_type some = index; fprintf(stderr,sizeof(index): %lu\n, sizeof(index)); fprintf(stderr,sizeof(some): %lu\n, sizeof(some)); 1. This is not a Cocoa question. 2. sizeof

Populating NSPopUpbuttonCell in document-based Core Data App

2010-11-09 Thread PJBorges
Hi, In my app I have a data model with an entity called SpeakersIn with an string attribute called talkTitles. What I would like to have is a predefined item list in the table column hosting the NSPopUpButtonCell when adding a new row in the tableview. I'm thinking that I need to add the code

Re: Calling getter on const object

2010-11-09 Thread Jonny Taylor
I now think that what I am seeing is a minor parsing sort of issue within the compiler (gcc 4.2) when mixing idSomeProtocol with blocks. The more fundamental problem is that gcc C++ does not fully support blocks, period. Indeed, as soon as it gets a sniff of c++ near a block things start

PDF and iPad

2010-11-09 Thread colors
on some PDF files, when I call CGPDFDocumentGetPage I get the following console output: invalid page tree entry. invalid `Kids' array: missing or invalid dictionary at index 5. Is there a way to keep this from happening, or at least detect the PDF is going to cause this in the code, before it

Re: MKAnnotation coordinate

2010-11-09 Thread Fritz Anderson
On 9 Nov 2010, at 3:31 AM, Dan Hopwood wrote: Ok so I am working with MKAnnotations on my map view and want to know the * correct* (i.e. the Apple intended) way to set up my custom annotation class so that I can set the coordinate upon initialisation but also access the coordinate attribute

Re: MKAnnotation coordinate

2010-11-09 Thread Dan Hopwood
Thanks Fritz, a resource like that was what I was looking for - where I can I will always read Apple's documentation over examples/tutorials since they are often wrong or inaccurate. I will have a read tonight and see how I get on. Sorry I wasn't more specific, I couldn't remember the name of

Re: PDF and iPad

2010-11-09 Thread David Duncan
I would recommend you Report Bugs for both of these issues. Assuming the PDF is valid, you shouldn't need to preflight them and they shouldn't cause issues. Please attach the PDF in question to whatever bugs you file. On Nov 9, 2010, at 6:54 AM, colors wrote: on some PDF files, when I call

Re: Calling getter on const object

2010-11-09 Thread Sean McBride
On Tue, 9 Nov 2010 12:08:57 +, Jonny Taylor said: For what it's worth, my bug has been closed with the comment Please upgrade to the LLVM Compiler when Xcode 4 is released. Hopefully it won't be too long now, and if all the blocks business is sorted that will make me very happy! You can

Apply animation curve to nswindow position?

2010-11-09 Thread Michael Hanna
Is this even possible? It appears from the documentation that you can only apply an NSViewAnimation to an NSWindow. I'd like to apply a CABasicAnimation to animate a window's movement. Any suggestions? Michael ___ Cocoa-dev mailing list

Re: Apply animation curve to nswindow position?

2010-11-09 Thread Nick Zitzmann
On Nov 9, 2010, at 11:57 AM, Michael Hanna wrote: Is this even possible? It appears from the documentation that you can only apply an NSViewAnimation to an NSWindow. I'd like to apply a CABasicAnimation to animate a window's movement. Any suggestions? Is there some reason why the

using NSURLConnection to download NSArray

2010-11-09 Thread Stephen Blinkhorn
Hello, I'm using a simple NSArray stored on a web server as part of a version tracking system. First I download the array using arrayWithContentsOfURL: and check the version etc. The problem with this approach is that if the server is down the method appears to hang indefinitely. So

Re: Apply animation curve to nswindow position?

2010-11-09 Thread Sean McBride
On Tue, 9 Nov 2010 13:57:51 -0500, Michael Hanna said: Is this even possible? It appears from the documentation that you can only apply an NSViewAnimation to an NSWindow. I'd like to apply a CABasicAnimation to animate a window's movement. Any suggestions? I don't think there's anything more

Re: using NSURLConnection to download NSArray

2010-11-09 Thread Nick Zitzmann
On Nov 9, 2010, at 12:26 PM, Stephen Blinkhorn wrote: I'm using a simple NSArray stored on a web server as part of a version tracking system. First I download the array using arrayWithContentsOfURL: and check the version etc. The problem with this approach is that if the server is down

Re: using NSURLConnection to download NSArray

2010-11-09 Thread Stephen Blinkhorn
On 9 Nov 2010, at 13:32, Nick Zitzmann wrote: On Nov 9, 2010, at 12:26 PM, Stephen Blinkhorn wrote: I'm using a simple NSArray stored on a web server as part of a version tracking system. First I download the array using arrayWithContentsOfURL: and check the version etc. The problem

Re: NSTextFieldCell multi-line

2010-11-09 Thread Ross Carter
On Nov 9, 2010, at 4:45 AM, Micha Fuhrmann wrote: Thanks for your respons, but I need the exacte size in points, which means drawing with the right Font etc. So here's where I am in - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row I'm calling a function

Re: Apply animation curve to nswindow position?

2010-11-09 Thread Michael Hanna
Yes, -setFrame:display:animate would do the job but I think it'd be neat to have finer control over the duration. I would like to make a bunch of borderless windows that each contain a cloud graphic. So they would float by at different rates across the screen. I guess this sortof a silly idea

Re: Apply animation curve to nswindow position?

2010-11-09 Thread Nick Zitzmann
On Nov 9, 2010, at 2:41 PM, Michael Hanna wrote: Yes, -setFrame:display:animate would do the job but I think it'd be neat to have finer control over the duration. If you subclass NSWindow and override -animationResizeTime:, you can make the duration take any time you want. Nick Zitzmann

Re: sizeof a function

2010-11-09 Thread Greg Parker
On Nov 9, 2010, at 2:07 AM, Kyle Sluder wrote: On Mon, Nov 8, 2010 at 9:06 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: typedef char *(*my_type)(const char *, int); my_type some = index; fprintf(stderr,sizeof(index): %lu\n, sizeof(index)); fprintf(stderr,sizeof(some): %lu\n,

Re: Calling getter on const object

2010-11-09 Thread Eeyore
I'm new at this too, so perhaps I am completely off here. My guess is that it isn't the const that is messing this up, but the non-class type. The problem I see is that frame is a pointer to an objc_object and objc_objects aren't the same as NSObjects (but, like I said, I'm new, so maybe they

Catching errors with MPMoviePlayerController

2010-11-09 Thread Rogerio de Paula Assis
Hi guys, Is there a way of catching exceptions (particularly for network errors / no connection available) when using a MPMoviePlayerController? I have reviewed the available documentation and realise I can get a notification for moviePlayerLoadStateChanged:(NSNotification*)notification.

Issues in specifying the file extensions for NSOpenPanel

2010-11-09 Thread Sachin Porwal
Hi All, In my application I need to choose only dmg files, so I am using NSOpenPanel with the following code snippet. But the NSOpenPanel is also allowing me to choose the folders having the extension '.dmg'. Ideally NSOpenPanel should allow me to choose only dmg files not folders ? Is this

Pause during drawing

2010-11-09 Thread Siegfried
Hello, For studying purposes (on recursion), I build a simple NSView subclass capable of drawing a Sierpiński triangle. The class has 2 helper methods to draw triangles and the fractal itself. The former is quite simple, draws triangles given start point, height and width. The latter, also

Problem with redirecting stdout

2010-11-09 Thread Edmond Ho
Hello all, I am having some trouble with capturing and redirecting stdout in my Cocoa application. A little bit of background: My app has an embedded scripting language interpreter, and I would like to redirect stdout in order to display the results of executed scripts in an NSTextView. I've

ABPeoplePickerProblems

2010-11-09 Thread ronald b. kopelman
I am having a problem with the ABPeoplePickerView. I have read the Class Reference, the Address Book Programming Guide for Mac OS X, searched the web, all to no avail. I wish to double click either a name or a group have the program respond to the double click. I created an ABPeoplePickerView

Re: Pause during drawing

2010-11-09 Thread Graham Cox
On 10/11/2010, at 4:23 AM, Siegfried wrote: The question is: Is it possible to pause after each call to -drawTriangle say for 0.25 second and redisplay the view, so I can see each triangle being draw? Yes, but you need to refactor your code. Just inserting a delay while drawing is a bad

Re: Problem with redirecting stdout

2010-11-09 Thread Ken Thomases
On Nov 9, 2010, at 5:48 PM, Edmond Ho wrote: To summarize, I use dup2() to bind stdout to my own NSPipe, and then add an NSNotification observer to listen for an NSFileHandleReadCompletionNotification on the NSPipe; the notification callback then reads the NSPipe. NSFileHandle

Re: Problem with redirecting stdout

2010-11-09 Thread Dave Keck
I think the problem is that the pipe buffer is not being flushed/read when it's full; when the pipe is full, the script interpreter then is blocked because it's waiting for the pipe to empty so that it can write. I don't fully understand the structure of your program, but indeed it sounds like

Re: Issues in specifying the file extensions for NSOpenPanel

2010-11-09 Thread Quincey Morris
On Nov 9, 2010, at 07:00, Sachin Porwal wrote: In my application I need to choose only dmg files, so I am using NSOpenPanel with the following code snippet. But the NSOpenPanel is also allowing me to choose the folders having the extension '.dmg'. Ideally NSOpenPanel should allow me to

Cocoaheads Lake Forest meets tomorrow, 11/10 at 7pm

2010-11-09 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 11/10. We will be having an informal discussion on

iPad 4.2 (deploy to 3.2.2) error

2010-11-09 Thread colors
When I try to run my base 4.2 iPad app on Simulator 3.2.2 or a 3.2.2 device, I get the following error during launch: Data Formatters temporarily unavailable, will re-try after 'continue'. (Not safe to call dlopen at this time.) The Base SDK is set to iOS 4.2 and the iOS Deployment Target is

Re: PDF and iPad

2010-11-09 Thread colors
I will go ahead and write up a bug, but I am not entirely sure the PDF is bad. It does work in Safari and Acrobat. bug report #8651074 Rich Collyer On Nov 9, 2010, at 9:19 AM, David Duncan wrote: I would recommend you Report Bugs for both of these issues. Assuming the PDF is valid, you