Using views from other apps as CoreAnimation Layer - cocoa

All,
How can I use (NS)Views from other applications as Layers in my CA app. I.e. I'd like to display a Keynote presentation as Layer in my CA app.
I found the iChatTheatre API which looks promising - however I'd need the oposite. An API to get the contents from an app - not to provide it.
Any pointers?
Thanks.

Take a look at the "Son of Grab" sample.
It shows you how to use the CGWindow*() API that was introduced with Mac OS X 10.5
The API allows you to get the content of a whole window, so you have to find a way to get the portions of the window you are interested in.

I don't believe there's a public way to do what you're talking about. Your best approach is probably to reverse-engineer the iChat AV system (the receiving side) and see if you can replicate it. Some initial work has been done by the ICP project. It's very sketchy, but it's a start.
Another approach is the QuickLook API, which has the advantage of not having to run the source application. So far Apple hasn't made the reading side of that API available either. Ciarán Walsh did some handy reverse engineering on QL a couple of years ago, and I've played with that approach, but it is somewhat klunky. You can generate the panel as Ciarán explains, but put it off screen. You can then copy the contents into an NSImage using NSBitmapImageRep -initWithFocusedViewRect:. Unfortunately you can wind up with some funky visual artifacts in this (like scroll bars in some cases), but for some applications it can be effective.

Related

Getting detected features from Google Tango Motion Tracking API

I would like to know how to get the current feature points used in motion tracking and the ones that are present in the learned area (detected or not).
There is an older, related post without an useful answer:
How is it possible to get tracked features from tango APIs used for motion tracking. I'm using the tango to not do SLAM and IMU-integration on my own.
What do I need to do, to visualize the tracked features like they did in some of the presentation videos. https://www.youtube.com/watch?v=2y7NX-HUlMc (0:35 - 0:55)
What I want in general is some kind of measure or visual guidance on how good the devices learned the current environment. I know, there is is the Inspector App but I need this information on the fly.
Thanks for your Help ;)
If you want to check if an area is present in your learned area model and which is not, you can use the Tango Debug Overlay App. It has a field 'Tracking Success' that only counts up if the device sees learned feature points (ADF on) or finds new feature points (ADF off) (http://grauonline.de/alexwww/tmp/tango_debug_overlay_app.jpg). Additionally, you can request that debug information like Tango Debug Overlay App does (as a simple text) via UDP port 29361 in your App and parse the returned debug text (although this is not recommended at all for a real app as this interface is not documented)
PS: In Tango Core 01-19-2017 this counter does not seem to work anymore.

How can I make unlimited windows using Xcode when developing a Mac app?

I am trying to develop an application for the mac however I am having issues trying to make multiple windows such as when you click cmd+N on safari.
I have tried looking for tutorials on how to do it however the closest I have got to be able to do this is just by creating a separate window by using this tutorial here: https://www.youtube.com/watch?v=Z1Erw7aP0EQ
If anyone knows how I can make unlimited windows using Xcode I will highly appreciate it!
Just write a NSDocument-based app, as described in Apple's docs. BTW, Apple's docs are always worth visiting together with the various tutorials you can dig up with Google.
That said, the document architecture works best if your window is going to contain something that can be viewed as a document. If the Open... (and maybe Save...) menu items make sense for your data, then you'll likely be fine with the document architecture, otherwise you should be prepared to jump through a few hoops to tweak the architecture to your needs.

Is Adobe Air/Flash the easiest framework for advanced GUI development?

Excuse a non-developer being forced to develop applications instead of administrating networks like I'm used to. This is a horrible post in many ways.
I'm developing an application which has reached the point of needing a GUI. However, I haven't done any GUI development ever before, so I feel the need to ask for help on this.
The application is your standard data collecting/management app, with all common widgets and stuff that every application is using. The problem is that I need the application to be able to display websites using an external browser of some sort, to pass a captcha on the site the application works against. The website guys haven't given me permission to circumvent the captcha in any way.
I know of GTK, QT, Tcl/Tk etc. None of these frameworks have struck me as easy to use. To be honest, I'd like to design the interface using drag-and-drop like I used to do in VB6 when I was a kid, although I get chills thinking about writing this thing in Basic.
I was thinking about Adobe Air, and to design the application in Flash/ActionScript. From what I've learned about Air, I should be able to do everything I want to do. And I do believe it has built in sqlite, right? Would it be considered more "simple" to develop the actual GUI using Flash than using one of the traditional frameworks? What pitfalls am I facing?
A few guidelines:
It only needs to run on Windows
I need to be able to work against a database. Currently using SQLite3.
Some sort of browser integration is crucial. A browser window of some sort needs to open up inside my interface, be directed by the application, and the application needs to be able to read some data from the site that is being used.
Any help with this would be great. This is a clear case where I have to rely on the experience of others to complete the project at all. I'm happy to provide more information if you need that to make a suggestion.
You can always try Titanium Framework, it was aquired by Appcelerator nor so much ago. http://www.appcelerator.com/
It actually puts a webkit browser in a window, so if you can design HTML and CSS you can use this framework.

Application Development: Cocoa vs Sencha vs Others

I'm a developer most comfortable with web languages (PHP, Javascript etc.). Now, My company wants to start making iPad apps for pharma sales reps that basically gives a nice introduction to drugs.
We used to subcontract it but we want to bring it in house. It's a very big plus for me financially if I can take on the jobs and do them right. Now doing my research, these apps aren't crazy; they just kinda need to act like a powerpoint slideshow with a little animation and interaction.
I don't know Cocoa. I know there will also be a learning curve with it as well. I do know Sencha slightly. Does anyone here have any experience with either of these platforms and do you think it's a "might as well learn cocoa" type of thing? The only reason I like Sencha is becuase you program in Web languages and can port it to app stores. Any ideas? Suggestions?
My answer is always just to learn Cocoa in situations like this, but Sencha is actually surprising not-bullshit. I'm really impressed with it.
However, I wanted to note a few things: I don't know exactly what you mean by "port it to app stores", but I want to be sure you don't delude yourself into thinking than an app written with Sencha would be usable on any platform other than iPad. Of course you could load a page written in Sencha on non-iPad device, but the entire point of Sencha is tailoring your web application to work surprisingly well on an iPad. So, it will be out of place anywhere else, and given the quality of current iPad competitors, it'd be unlikely to perform adequately off of the iPad at this time.
So, if you want to use Sencha, it has to be for the right reasons (of which there are two):
You want more flexibility in deployment: you don't want to have to deal with Apple's Enterprise deployment system. Apple's not interested in apps that only pertain to one company (internal software) on the App Store, so if you want to go the Cocoa route, you'll have to use their Enterprise Ad-Hoc deployment.
You don't want to / can't afford to take the time and learn Cocoa (really, to make an app that doesn't sucks will probably take at least a year of experience, trial and error, etc.; at least, that's how it was for me).
If either one of these things is true, I'd go the Sencha route. But as an advocate of iOS, I really hope you take the time and learn Cocoa! I believe I speak for all the Cocoa developers on Stack Overflow when I say that we'd be happy to help you with any questions you may have as you go. Good luck, whatever you decide!

More examples of Prism (Composite Application Library) Applications?

The examples that Microsoft's Patterns and Practices provides are quite helpful:
about a half-dozen simpler QuickStarts which touch on specific issues
the StockTrader reference implementation, which is a fairly rounded application
but it lacks a more useful base application that reads and writes to a data source (XML or database), allowing users to login, edit data, logout, etc. (something like what ASP.NET MVC comes with).
Since Prism applications can get quite complex and lengthy (the StockTrader example is almost 300 files without tests), it would be helpful to have an application that takes care of the CRUD bulk that everyone needs to build for most apps anyway.
Does anyone know of any data-editing Prism example apps out there?
Here (http://petedoesstuff.net/Blog/?p=79) you'll find a bunch of links to the samples of using the Prism.
Particularly, LateNight (http://code.google.com/p/cwpfsamples/) may be what you need. It has login screen and data editing functions.
Its feedback I've seen a lot of. I'll pass this onto the Team and see if we can get some more examples put online around this space.
I'm currently writing my own demo app now, so i'll also try and put that online via my blog.
Scott Barnes - Rich Platforms Product Manager - Microsoft.
The reason data access was left out of the Prism RI is because it is largely irrelevant to Prism. I would think you're better off looking at something like DinnerNow for those kind of things.

Resources