Re: [iPhone] Zooming & Dragging a PDF Inside a UIScrollView

2009-05-22 Thread Bob Barnes
Dave, Thanks. That was quite a bit easier than what I was trying to do. The one drawback is that scrolling thru the PDF in a UIWebView is painfully slow compared to what I was doing earlier. I had implemented a slider that allowed me to fly through a 250 page PDF as fast as the slider coul

Multithreaded debugging help (audio recording eg).

2009-05-22 Thread Darren Minifie
Hi Everyone I am working through the audio queue services tutorial, recording pcm audio to a file. I have the example working as it is supposed to. The next thing I want to do is examine each audio packet (each sample) and see what it's 16-bit value is. Now, I know that at 44100 samples / sec,

Re: entity name not found when model is in private framework

2009-05-22 Thread Chris Hanson
On May 22, 2009, at 7:34 PM, Rick Mann wrote: I can't figure out how to add the Framework's MOM to the PSC I get from the Document (which really knows nothing about the Framework). Add a method to the framework to get its managed object model, and return that model from your NSPersistentDoc

Re: Sending keycode to stdin

2009-05-22 Thread Andrew Farmer
On 22 May 2009, at 15:54, Marc Tecles wrote: i'm trying to write a Cocoa application that launch a command line tool for example top. I've used NSTask with 2 NSPipe to launch the command line tool and to redirect the stdout and stderr to an NSTextview in my applycation asynchronously with No

Re: Newbie question on listing out detailed items

2009-05-22 Thread Jason Foreman
On May 22, 2009, at 5:33 PM, Stamenkovic Florijan wrote: What I want: a listout of items, each of which presents info and a number of controls. Typical example: Safari's downloads window. ... Any pointers to documentation on how to deal with this would be very appreciated. Perhaps I am si

Re: Newbie question on listing out detailed items

2009-05-22 Thread Graham Cox
On 23/05/2009, at 8:33 AM, Stamenkovic Florijan wrote: NSTableView does not seem to be of much help. It accepts an NSCell as means of rendering, but if I understand it correctly, an NSCell can't contain subviews nor subcells, and is therefore of little use. Any pointers to documentation on

Sending keycode to stdin

2009-05-22 Thread Marc Tecles
Hi, i'm trying to write a Cocoa application that launch a command line tool for example top. I've used NSTask with 2 NSPipe to launch the command line tool and to redirect the stdout and stderr to an NSTextview in my applycation asynchronously with Notification center. Now i want to send to

Newbie question on listing out detailed items

2009-05-22 Thread Stamenkovic Florijan
Hi all, Maybe this has been answered before, if so I am sorry to pollute. I've googled the archives, looked through CocoaDev, went through the documentation, and was not able to figure this out. Also I must say that I am a complete beginner in Cocoa. I just finished Aaron Hillegass's book

Re: NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-22 Thread Peter Ammon
On May 22, 2009, at 9:37 AM, Martin Stanley wrote: I've finally got the hang of NSPredicateEditor and custom NSPredicateEditorRowTemplates. (It sure took a while and many, many searches and head-scratchings). However, I am stuck on one thing and I suspect that the problem might lie in the

Re: entity name not found when model is in private framework

2009-05-22 Thread mmalc Crawford
On May 22, 2009, at 7:34 PM, Rick Mann wrote: So perhaps my app needs to get the model(s) from the framework, and merge them into its own model, but I don't even see how to do that; I see no way to add the MOM to the PSC, and it seems lame to have to create my own PSC (which is nicely han

Re: entity name not found when model is in private framework

2009-05-22 Thread Rick Mann
On May 22, 2009, at 13:34:33, Adam Swift wrote: Sure. Since the data model is now part of the framework project, when you build that framework the model should get built along with the other source files and it will be packaged up into your frameworks Resources directory: ${BUIL

Re: Save option For NSTextview.

2009-05-22 Thread Graham Cox
On 23/05/2009, at 11:16 AM, archana udupa wrote: I m a new to cocoa.Thanks in advance, for the ppl who can help me...:) We hav to develop an application similar to file merge with more added features to it in cocoa.We hav 2 NSTextview subclass,where we display the files.We can edit it both t

Re: entity name not found when model is in private framework

2009-05-22 Thread mmalc Crawford
On May 22, 2009, at 5:05 PM, Rick Mann wrote: Well, as I should've expected, the documentation for this doesn't say anything you can't infer from the method name itself. I guess I have to look elsewhere.

Save option For NSTextview.

2009-05-22 Thread archana udupa
Hi List... I m a new to cocoa.Thanks in advance, for the ppl who can help me...:) We hav to develop an application similar to file merge with more added features to it in cocoa.We hav 2 NSTextview subclass,where we display the files.We can edit it both the files. I wanna save the changes made to

Re: entity name not found when model is in private framework

2009-05-22 Thread Rick Mann
On May 22, 2009, at 13:34:33, Adam Swift wrote: Sure. Since the data model is now part of the framework project, when you build that framework the model should get built along with the other source files and it will be packaged up into your frameworks Resources directory: ${BUIL

Re: entity name not found when model is in private framework

2009-05-22 Thread Rick Mann
On May 22, 2009, at 12:18:56, Jerry Krinock wrote: On 2009 May 22, at 11:40, Rick Mann wrote: It sounds like you aren't adjusting the code that loads the managed object model when you move the resource into your framework. What adjustment needs to be made? Search your project for merged

Re: entity name not found when model is in private framework

2009-05-22 Thread Rick Mann
On May 22, 2009, at 12:18:56, Jerry Krinock wrote: On 2009 May 22, at 11:40, Rick Mann wrote: It sounds like you aren't adjusting the code that loads the managed object model when you move the resource into your framework. What adjustment needs to be made? Search your project for merged

Re: NSExpression with constant NSData value crashes Core Data

2009-05-22 Thread Jerry Krinock
On 2009 May 22, at 13:54, Ben Trumbull wrote: Uhm, No. %@ is the vararg specifier for an NSObject. - stringWithFormat: turns that into a string. Because - stringWithFormat: turns everything into a string. Kinda the point. -predicateWithFormat: does NOT call -description randomly. Pred

re: NSExpression with constant NSData value crashes Core Data

2009-05-22 Thread Ben Trumbull
On 2009 May 17, at 15:10, Ben Trumbull wrote: Core Data supports == and != searches against binary data. You should be able to just use a predicate like: [NSPredicate predicateWithFormat:@"myTransformableAttribute = %@", myGuidObject] and have it "just work". Read the above carefully! myGu

Re: entity name not found when model is in private framework

2009-05-22 Thread Adam Swift
On May 22, 2009, at 11:40 AM, Rick Mann wrote: On May 22, 2009, at 09:58:15, Adam Swift wrote: On May 22, 2009, at 1:45 AM, Rick Mann wrote: I'm working on a Framework with a Core Data model. When I first built the test app, I couldn't get the Framework to work right, and so I had all

Re: getting a point from an array of NSValue CGPoints

2009-05-22 Thread David Duncan
On May 22, 2009, at 12:45 PM, Jeff Decker wrote: Thank you for your help. I have a mutable array filled with NSValues which are CGPoints. I want to unpack them one by one while adding them to a CGContextAddLineToPoint rect. Here is my terrible attempt (most of the code is from the Stanf

Re: Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-22 Thread Seth Willits
It occurred to me... just use the "content" controller key instead of "selection" with NSIsNotNil. It works like a charm. *slaps forehead* Anything wrong with this that I'm not seeing? -- Seth Willits ___ Cocoa-dev mailing list (Cocoa-dev@li

getting a point from an array of NSValue CGPoints

2009-05-22 Thread Jeff Decker
Hello, Thank you for your help. I have a mutable array filled with NSValues which are CGPoints. I want to unpack them one by one while adding them to a CGContextAddLineToPoint rect. Here is my terrible attempt (most of the code is from the Stanford class on iTunes - which I'm really en

Re: [iPhone] Zooming & Dragging a PDF Inside a UIScrollView

2009-05-22 Thread Scott Anguish
The Scrolling example on the Apple developer site should get you started. On 22-May-09, at 1:35 PM, Bob Barnes wrote: Hi, I'm new to both Cocoa and iPhone so perhaps I've taken on something too complicated for a beginner, but I'm trying to display a PDF in a UIScrollView so that I can z

Re: Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-22 Thread Seth Willits
On May 21, 2009, at 2:15 AM, Quincey Morris wrote: The obvious way of doing that is to bind 'Enabled' to the NSObjectController's "selection" controller key, (no model key), and use the value transformer NSIsNotNil. Anytime the selection is not nil, the control is enabled… right? It's super

Re: Localizing absolute file name in Cocoa

2009-05-22 Thread Sean McBride
On 5/22/09 6:37 PM, Arun said: >I have absolute file path in a NSString. >Now before displaying this in the UI i need to localize and then display. If you need to display a path to the user, consider using NSPathControl. It will correctly use the display name of each path component. --

Re: entity name not found when model is in private framework

2009-05-22 Thread Jerry Krinock
On 2009 May 22, at 11:40, Rick Mann wrote: It sounds like you aren't adjusting the code that loads the managed object model when you move the resource into your framework. What adjustment needs to be made? Search your project for mergedModelFromBundles: and see what bundle you're passing

Forcing NSTreeController to re-sort, and select inserted

2009-05-22 Thread Jim Thomason
I've been fighting with NSTreeController for a couple of days now and have gotten nowhere. I have a hierarchy of disparate objects. It's pretty simple - Class A has many Class B. That's it. I'd like to display it in an OutlineView. I don't care about adding in additional Class A (Parent) objects,

Re: NSTextView - Having to call setFrame twice to work?

2009-05-22 Thread Seth Willits
Interesting. I had forgotten that + textContainer: is the designated initializer. I think I'll file a bug report on this. Maybe I'll get an answer. Thanks. -- Seth Willits On May 21, 2009, at 4:20 AM, Andy Lee wrote: I get the same result using initWithFrame:, but if I use the design

viewWillMoveToWindow, garbage collected apps, finalize, and resurrection errors

2009-05-22 Thread Sean McBride
Hi all, In my GC app I've just tried to use, in my custom NSView, the viewWillMoveToWindow: method. When the window containing the view is closed, this method is called with nil as the window parameter. That's expected. I was surprised to see in the backtrace that this is called when the window

Re: Localizing absolute file name in Cocoa

2009-05-22 Thread Michael Ash
On Fri, May 22, 2009 at 1:54 PM, Ken Thomases wrote: > On May 22, 2009, at 12:48 PM, Michael Ash wrote: > >> On Fri, May 22, 2009 at 1:15 PM, Arun wrote: >> >>> The displayName API will give me only the file name not the absolute path >>> of >>> >>> the file. >>> >>> Ex: If i have a path as /User

Re: entity name not found when model is in private framework

2009-05-22 Thread Rick Mann
On May 22, 2009, at 09:58:15, Adam Swift wrote: On May 22, 2009, at 1:45 AM, Rick Mann wrote: I'm working on a Framework with a Core Data model. When I first built the test app, I couldn't get the Framework to work right, and so I had all the source files (and .xcdatamodel) included in th

Re: [iPhone] Zooming & Dragging a PDF Inside a UIScrollView

2009-05-22 Thread Dave Camp
If all you want to do is display a PDF, just use a UIWebView. It will display the PDF just like Safari with scrolling and whatnot and handle everything for you. Dave On May 22, 2009, at 10:35 AM, Bob Barnes wrote: Hi, I'm new to both Cocoa and iPhone so perhaps I've taken on something

NSExpression with constant NSData value crashes Core Data

2009-05-22 Thread Jerry Krinock
On 2009 May 17, at 15:10, Ben Trumbull wrote: Core Data supports == and != searches against binary data. You should be able to just use a predicate like: [NSPredicate predicateWithFormat:@"myTransformableAttribute = %@", myGuidObject] and have it "just work". Read the above carefully!

Re: Localizing absolute file name in Cocoa

2009-05-22 Thread Ken Thomases
On May 22, 2009, at 12:48 PM, Michael Ash wrote: On Fri, May 22, 2009 at 1:15 PM, Arun wrote: The displayName API will give me only the file name not the absolute path of the file. Ex: If i have a path as /Users/user/temp.txt, only it will return temp.txt. Similarly componentsToDispla

Re: Localizing absolute file name in Cocoa

2009-05-22 Thread Michael Ash
On Fri, May 22, 2009 at 1:15 PM, Arun wrote: > The displayName API will give me only the file name not the absolute path of > the file. > Ex: If i have a path as /Users/user/temp.txt, only it will return temp.txt. > Similarly componentsToDisplayForPath API will give me an array of NSStrings > cont

Re: Best way to draw text in CAOpenGLLayer

2009-05-22 Thread David Duncan
On May 21, 2009, at 11:25 PM, Anshul jain wrote: Hi thanks for suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using Is this the right approach to do it. In Core Animation if you want to scro

[announce] A Core Data tutorial

2009-05-22 Thread Michael Swan
Just finished the first in a series of tutorials that takes a Core Data app from beginning to end including things like icons, and serial numbers. http://themikeswan.wordpress.com/2009/05/22/7/ Feel free to let me know what you think. Also there is one feature I want to add later that I ha

[iPhone] Zooming & Dragging a PDF Inside a UIScrollView

2009-05-22 Thread Bob Barnes
Hi, I'm new to both Cocoa and iPhone so perhaps I've taken on something too complicated for a beginner, but I'm trying to display a PDF in a UIScrollView so that I can zoom/drag, etc. I've created a view hierarchy with a main UIView (probably should be a UIViewController, but that's an

Re: Localizing absolute file name in Cocoa

2009-05-22 Thread Arun
The displayName API will give me only the file name not the absolute path of the file. Ex: If i have a path as /Users/user/temp.txt, only it will return temp.txt. Similarly componentsToDisplayForPath API will give me an array of NSStrings containing user, temp.txt But my requirement is to get a loc

Re: [iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread WT
Hello all, I've now tried Dave's suggestion and it doesn't quite work. Please take a look here: http://www.restlessbrain.com/cocoa-dev/tab_bar2/ where you'll see a short video, a source file with the relevant pieces of code that produce what you see in the video, and screen shots of how

Re: entity name not found when model is in private framework

2009-05-22 Thread Adam Swift
On May 22, 2009, at 1:45 AM, Rick Mann wrote: I'm working on a Framework with a Core Data model. When I first built the test app, I couldn't get the Framework to work right, and so I had all the source files (and .xcdatamodel) included in the test app directly. That worked fine. I've fig

NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-22 Thread Martin Stanley
I've finally got the hang of NSPredicateEditor and custom NSPredicateEditorRowTemplates. (It sure took a while and many, many searches and head-scratchings). However, I am stuck on one thing and I suspect that the problem might lie in the NSPredicateEditor code itself; hence this post. He

Re: Question about notifying KVO observers of changes to a property.

2009-05-22 Thread Morales Vivó Óscar
That's looks like the most sensible solution. Thanks for the insight. Another approach is to make your Objective-C wrapper duplicate the data of the C++ object, rather than being a pass-through wrapper. So, the getter for the property on your Objective-C wrapper does _not_ call through to

Re: Localizing absolute file name in Cocoa

2009-05-22 Thread Michael Ash
On Fri, May 22, 2009 at 9:07 AM, Arun wrote: > Hi All, > > I have absolute file path in a NSString. > Now before displaying this in the UI i need to localize and then display. > How can i localize the absolute file path. > Since in my app i am displaying the absolute file name using of > NSFileMan

Re: garbage collection and pointer to object

2009-05-22 Thread Mike Abdullah
I've seen this happening on a non garbage collected app too. Would very much like to know the reason why. On 21 May 2009, at 22:17, Michael Link wrote: I have a class with the following methods - (void)save { NSError* error = nil; if (![self save:&error]) {

Load tabbarcontroller without UIwindow

2009-05-22 Thread developers mac
Hi there, My problem in brief: I have created my page2(profile page which has to display user information only after successful login) in mainwindow.xib file. I have created a login page for user validation now using a UIView XIB - login.xib. I changed 'Main nib file base name' of Info.plist fil

Re: issues encoding MailMessage and NSData

2009-05-22 Thread Reza Farhad
I have solved the issue PARTLY. My NSData issue seems to have been resolved, and that was my mistake so I will no go into it. Now it appears that I can convert the MailMessage to NSData and save the data and read the data on startup. However if I try to convert this Data to a MailMessage

Re: [iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread WT
Hi Dave, yes, that's what I was considering trying but decided to ask the list first. I'll give it a try later today and will report back one way or the other, for the benefit of other people in the list. Thanks for your input. Wagner On May 22, 2009, at 3:18 PM, Dave DeLong wrote: Here'

Re: [iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread Dave DeLong
Here's something that might work, although I haven't personally tried it. You know when the game view appears, via the -viewWill/DidAppear: methods. You also know that your game view has a pointer to the parent tabBarController, via UITabBarController * parentTabBar = [self tabBarControl

Re: [iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread WT
Hi Brian, thanks for replying. Your suggestion didn't work and I suspect it was because I'm not using a navigation controller. The UIView documentation for the hidesBottomBarWhenPushed property seems to suggest that it only has an effect when the view is pushed into a navigation controlle

Localizing absolute file name in Cocoa

2009-05-22 Thread Arun
Hi All, I have absolute file path in a NSString. Now before displaying this in the UI i need to localize and then display. How can i localize the absolute file path. Since in my app i am displaying the absolute file name using of NSFileManager API's like displayName and componentsToDisplayForPath

Re: issues encoding MailMessage and NSData

2009-05-22 Thread Benjamin Stiglitz
that works fine, but when I go to decode the object I get the following error: exception raised:*** -decodeObjectForKey: only defined for abstract class. Define -[NSKeyedArchiver decodeObjectForKey:]! You need to use an NSKeyedUnarchiver, not an NSKeyedArchiver, to decode the object. -

Re: [iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread Brian Slick
In the view you are animating in, perhaps in the -init method, you can do this: [self setHidesBottomBarWhenPushed: YES]; There may be a complication, since it looks like you would want to do this on the top-most view controller for that tab. I've only ever done it for subviews, so that th

Re: Merge 2 QTTracks in a QTMovie

2009-05-22 Thread Alex Bumbu
Below is the code I'm using in this test application. I'm loading 2 mp4 movies (h.264 AAC) in the first action, getting an array of merged frames from the 2 movies and add them to the mixed video (method 3), get the sound qttracks from the 2 movies, change the layer number of the second and

[iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread WT
Hello, when tapping one of the items in the tab-bar of my iPhone app, I'd like to switch to a view that no longer has a tab-bar. I've accomplished this already by having the tab-bar delegate remove the tab-bar controller view from its superview (the window) and then instal the new view. I

issues encoding MailMessage and NSData

2009-05-22 Thread Reza Farhad
Hi all I am trying to save a MailMessage that I obtain from Apple Mail using scripting bridge. I get the message and I check to see if it does conform to NSCoding protocols, which it does. [ message conformsToProtocol:@protocol(NSCoding)] then I go to encode it in my encodeWithCoder cal

Two untitled documents opening

2009-05-22 Thread Thomas Davie
For some reason, my app loads two untitled documents when launched. I have no custom App delegate or document controller. My current source for my document subclass is at http://paste.lisp.org/display/80645. Adding a couple of breakpoints tells me that NSApp's _doOpenUntitled is called tw

Re: Merge 2 QTTracks in a QTMovie

2009-05-22 Thread douglas welton
Yes. It'd possible. How are you creating your tracks? Can you show us a little code to see what you've tried already? On May 21, 2009, at 8:44 AM, Alex Bumbu wrote: Hi all, I'm trying to add 2 sounds tracks in a QTMovie so they play at the same time. I've tried adding both sound tracks

entity name not found when model is in private framework

2009-05-22 Thread Rick Mann
I'm working on a Framework with a Core Data model. When I first built the test app, I couldn't get the Framework to work right, and so I had all the source files (and .xcdatamodel) included in the test app directly. That worked fine. I've figured out the Framework issues, and moved the mode

Re: [Core Data] Can we use setValue:forKey: in *willSave* method of NSManagedObject?

2009-05-22 Thread mmalc Crawford
On May 22, 2009, at 12:00 AM, Aurélien Hugelé wrote: The willSave method is not very well described. In particular, can we use setValue:forKey: (or trigger change notifications) inside it? It's not clear what setValue:forKey: has to do with it. That apart, in general, the documentation stro

Re: Compiler does not synthesize KVO compliant properties for CATiledLayer subclass (was: Synthesized properties for scalars not KVO compliant)

2009-05-22 Thread Dave Keck
> It would be great if we could get a reason as to why it seems to always > return NO. My guess would be that there could be a significant performance > overhead using the KVO mechanism for every layer's property? That was my first thought, too. But after thinking about it, it's my understanding t

[Core Data] Can we use setValue:forKey: in *willSave* method of NSManagedObject?

2009-05-22 Thread Aurélien Hugelé
Hi list! In the documentation it is clearly stated that we should not trigger change notifications in the *didSave* method of NSmanagedObject. The willSave method is not very well described. In particular, can we use setValue:forKey: (or trigger change notifications) inside it? I usually d