I'm very new to OSX programming and I've been trying out a few examples in various articles and I've been facing a problem ; at that point I decided to follow tutorials from "Cocoa Programming for MacOSX" and Im running into the same problem.
My project name is "Random" and when I click "Build and Run", it shows the status as "Random running". However I don't see the window that pops up. Why does this happen?
I had a look at this SO thread and unfortunately it does not help.
[EDIT]
"Random" is a Cocoa application for Mac.
[EDIT2]
I tried doing the same with a new cocoa application and the problem persists. Here is what I did. Create a new cocoa project named "blah". Click "Build and Run" - from what I am reading im supposed to see an empty window - however I dont see the same.
[EDIT3]
My Xcode version details :-
Xcode IDE: 1610.0
Xcode Core: 1608.0
ToolSupport: 1591.0
Generally you will have a window visible if you have it in the xib that is loaded with you main menu and it is marked to be visible at launch... This should be all set up if you chose the window based application, if you chose document based then you will get a window when you select new from the file menu
Related
I thought I could pin projects to my GCP BigQuery Classic UI,
and then see them as pinned projects in the new UI, but today the PIN icon is no longer showing up next to a project/dataset which I have access to (in old UI), even though I can see the project.
I thought the best way to see pinned projects/datasets in the new UI was as
follows.
in the classic UI, click down "carrot" icon next to the current project, choose "switch to project," then choose display project
type in the project, choose "display project in the navigation panel."
click on the pin icon
navigate to the new console, and see the project
I thought I was doing this as recently as the mid-last week; I could be crazy though. Today when I do these steps, there is no pin icon, so either I'm doing this incorrectly, or something has changed, please advise.
p.s. the ultimate goal is merely pinning a project/dataset onto my console (new BigQuery UI) navigation tree - so if you have a better set of steps, please let me know.
Thanks...Rich
I didn't read that you wanted to pin it in the new UI. I just tried and pinning works in the new UI.
If you click on the "PIN A PROJECT", you need to choose your project and click OK. A pin appears next to the project you pinned.
There used to be a pretty nifty command in xcode 5 where you could simulate the document. I mean when you pressed this option, only the UI of the app got loaded and then you can just see how the autolayout is working.
I forgot where this is and I'd upgraded to Xcode 6.0. COuld anyone help me where this option is in xcode?
Yes, it is gone. There's no way to get it back.
However, you can instead preview .xib or storyboard files in assistant editor. This dose not open a new window, however, the storyboard file shows the UI preview by default.
I'm working on wrapping some Cocoa functionality in an Objective-C library that will be called from a cross-platform C library. One of my goals is to provide someone who does development in C on Linux with the ability to deploy to OSX without having to get into XCode, nib files, etc. I want them to be able to compile and link their code on OSX using the command line tools, and end up with a regular resizeable main window with the usual buttons and so on, an application menu and a dock icon that looks and behaves as expected, etc.
I'm working on OSX 10.8.5. I have XCode 5.0 installed. Here's my gcc --version output:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
I've figured out how to present a main window, how to set up the application menu, and various other things, programmatically, without using XCode or any nib or plist, but I've run into a problem with the dock icon.
I set a custom dock icon image by calling:
[NSApp setApplicationIconImage:dockImage];
When the user quits the app, the dock icon image reverts to something else (some kind of default application icon or view), briefly, before going away. How can I prevent that from happening without using XCode to create a nib or a plist?
I've tried setting the activation policy of NSApp to prohibitted in the app delegate's applicationShouldTerminate method, to try to hide the dock icon before this switch back occurs. That didn't help, it does hide the window and the dock icon, but the dock icon still switches back to the default icon, briefly, as part of the process of hiding. I confirmed this by returning NSTerminateLator, and confirming that setting the activation policy to prohibited does cause the dock and the icon to hide even though the app is not terminating, and not setting it leaves it unhidden.
I've tried subclassing NSApplication and overriding the setApplicationIconImage call. I have confirmed that it is being called a second time, by something other than my code (well, or not directly by my code, anyway), just before the program exits. I've tried preventing the second call to it from working by calling the super function the first time, but not the second time, and I've confirmed that code in that function can prevent my code from changing the application icon, but that didn't fix the problem. It still happens anyway, somehow.
I've also tried removing the application badge, like this:
[[window dockTile] setShowsApplicationBadge: NO];
just in case it was something to do with that, but that didn't work. The docs say that app badges are no longer relevant as of 10.6, but I was grasping at straws.
Being stumped on the programmatic front, I'm now trying to find out how to package an .app from scratch,without using XCode, and see if maybe I can create a plist from scratch that has a reference to application image in it. But a programmatic solution would be preferable, as I'd really like to minimize what goes into the OSX-specific packaging of a deployment.
Another possibility might be to use XCode once, to produce a very generic, bare-bones .app that my deployment scripts copy and alter.
Please don't shoot my question down as being "too broad" or "not constructive" or something like that. I realize I'm reinventing wheels that already exist in various forms, but there's no law against trying to build a better mouse trap, or just a different or even a worse one, for that matter. I realize I'm trying to fix a problem that a lot of people would consider inconsequential, but XCode-produced apps don't have this problem, and I really don't want the tools I'm creating to produce any user-visible artifacts like that. I'm not intending to diss Apple's tool chain or invite debate about whether or not what I'm pursuing should be pursued. I have a specific, technical problem that I'm looking for solution to that is within the constraints of my goals.
I've downloaded v. 537.6+ of WebKit for Mac OS, and am running it on 10.8. (No programming here, just being a web developer looking for the WebKit web inspector.) Everything's fine, except the "Show page source" option in the Develop menu is grayed out when I'm on even the most, and I can't find any way to enable it. I"m very puzzled -- is there something else I need to do to get it enabled? Is there something else going on? Is this how it's supposed to be?
Developer Menu
The contextual menu:
WebKit is not a full browser - only a rendering engine. Typically things like "view source", the back/forward buttons, address bar, preferences menus etc. are implemented at the browser level, outside of WebKit. However WebKit probably provides a minimum implementation of these for testing purposes, which presumably excludes 'view source' (which I can imagine isn't really essential for testing).
If you want to play with a full browser, you can't compile all of Safari, but you could try compiling Chromium instead which provides all that stuff. Note however Chromium is now using Blink instead of WebKit.
You can enable WebInspector to view the source.
The webkit you have is a very old one. I've tried downloading it to help with your question, but it won't even run on OSX 10.8.3. You can always get the current latest build of WebKit here:http://www.webkit.org [edit: I see this question was asked in 2012, so that would explain why it's an old version.]
However you say you are "a web developer looking for the WebKit web inspector" and you are running OSX 10.8. In that case you can perhaps just use the standard Safari that's already on your Mac. You need to do the following to show the Develop menu. And then you have the "Page Source" item you are expecting.
Launch Safari.
Open Safari’s Preferences by selecting ‘Safari, Preferences’ from the menu.
Click the ‘Advanced’ tab labeled.
Place a check mark next to ‘Show Develop menu in menu bar.’
I am creating an application for Mac using Xcode 4.2, and I wanted to create a page on startup somewhat like the ones in GarageBand and Microsoft Office. The user would be able to select an option (template) and then press 'Choose' to start working with that template. The following images depict the startup (option) screens of GarageBand and MSOffice:
Please note that both of these have an interesting way of selecting an option (template) to begin.
I would like to know what kind of UI Element or special class is being used for this. I do realize that a lot of custom artwork would go into this. Please also explain how these items are used like a radio button, not a normal button.
Those are almost certainly done with an NSCollectionView. NSCollectionView can be a little difficult to work with (in my limited experience) so I would start by looking at the docs:
Quick Start for Collection Views
NSCollectionView Class Reference
And then at some tutorials:
NSCollectionView Tutorial for Dummies (Xcode 3.1.3) (A little out of date but still helpful)
Adventures with NSCollectionView