When editing plist files in Xcode, it can detect the type of plist and show human-readable strings to make it more easy to edit the file. The Info.plist, for example.
Thanks to This question, I found the (or a) place where it stores that structure definition, as InfoPlistStructDefs.xcodeplugin. If I put my own file in there, however, nothing interesting happens. That is, it doesn't show up in the list of possible property list types.
So does anybody know how to make Xcode or the external property list editor application recognize a custom plist structure definition?
I found the answer. I have to put it in
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/
FYI, PlistEdit Pro also provides a custom interface for creating and editing plist structure definitions, if you don't want to have to mess around with XML.
Related
I found out, that frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml
does control the parts of my bundle-pages that I want to edit. So, alright I could edit this file directly but I learnt, that isn't recommended due to upgradability-problems.
So, what would I alternatively need to do? Do I just need to add a new file
frontend/my_package/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml
like this and put all my stuff in there, or do I also need to reference something into my layout within local.xml? How would I do that?
Thanks
So yes simply make this file in your theme and then you can edit it to fit with your design.
The other option which is a bit more complex is to update the template via some layout xml and then this new template will be used and you can add it to the base folder with whatever new path you like. I would suggest that your changes are probably theme specific and so should be made by making the changes in your theme.
recently I have learned how to use the appleDoc to do the documentation for my iphone project.
But what I realize is that AppleDoc only scan the head file of each class and based on the special comment format it creates the docSet and html.
My question is that how to let the AppleDoc looking after the .m file as well. Because for classes like viewController, quite a few logic are in the .m sectors and not be exposed in the head file. (I am asking this is because in Xcode5 if you hover over a private method and press "option" button xcode does show you a hover which contain the special comment you made. That's how I guess that there must be a way to transfer these description/comment into the docSet).
Anybody has some idea please help to give me some answer.
Thanks
Finally I found out there was a line in the script command which you need to remove.
It will include all the "*.m" files where all the "private" interface comments are kept.
When I start an iOS single view application project, the AppDelegate files and ViewController files are not prefixing with the project name like they used to.
files names are as follows when I open a new project:
AppDelegate.h
AppDelegate.m
MainStoryBoard.storyboard
ViewController.h
ViewController.m
Why is this?
You have to add it manually. When you create a new project just fill out the "Class Prefix" field on the screen where you name the project/bundle id/ etc..
Just add your prefix where I wrote "THIS IS THE PREFIX" in the screenshot below
If you want to add a prefix after you've created your project, you can do so in the file inspector on Xcode's right pane:
Personally, I prefer not to prefix class names within an application.
When you are writing code for libraries, or custom classes, or categories, they are recommended, as there aren't namespaces in Objective-C.
But for application classes, I find they are just noise. Looking down a list of files that all have the same three letters in the front makes it just a bit harder to find what I'm looking for.
I mean, are you really going to have more than one class called AppDelegate? I'm all for full and descriptive naming of my classes, but prefixes for all the classes doesn't help me.
If it helps there are a few conventions for writing code. Search and you'll find them. Here are mine, for example.
You don't have to follow them, but pick a style and be consistent with it.
XCode 8 does NOT have the 'Class Prefix' field. It only has 'Product Name' and this does not ripple down to the view controller or the app delegate. I think 8.3 has bugs.
Class Prefix is file & template business. For the sake of organised files in a project it makes sense to have filenames that express their contents.
The workflow to achieve that was actually simplified with the Class Prefix field in the File inspector panel while your project name is active (clicked) in the file browser.
When there is a class prefix set the class name field when creating new files is predefined. That way you can choose file by file (class by class) if you want to use it and class name and file name will result in similar name scheme.
I was wondering (if possible) if there was a program/tool/utility that when I create a new file and provide it with an extension that it creates the appropriate tags automatically?
For example, a new file I create called index.php would have the appropriate tags auto-generated inside:
<?php
?>
I hope you get the idea.
Any information regarding this would be helpful.
I don't know about a portable utility, but on Windows, there's a built-in feature that does it.
From regedit, go to your HKCR/.your-extension (e.g. HKCR/.php). the (Default) value will contain the filetype class - go to either HKCR/.your-extension/the-filetype-class or HKCR/the-filetype-class (either will do), then inside create a key named ShellNew. In the key, create a string value called FileName and assign to it the file path of your template file.
Now all new files with this particular extension will be created containing the contents of your template.
Here's a more detailed tutorial.
If you run Linux with GNOME, maybe http://tombuntu.com/index.php/2008/02/13/add-your-document-templates-to-gnome/ is what you need.
There is probably something similar in other environments.
I created a .xcdatamodel Managed Object Model file in Xcode. I selected that file in Groups & Files. Then I go to File > New... > and nowhere in the iPhone Templates / Cocoa Touch Class templates I see the "Managed Object Class" file template.
Does anyone know what can be wrong?
I usually need to also select the entities for which I want to generate the class files.
In Xcode 4, select the entity in the xcdatamodeld, then choose Editor Menu > Create NSManagedObject Subclass
If you are wanting to subclass NSManagedObject then I would highly recommend talking a look at mogenerator (github). It will autogenerate the subclasses for you AND keep them in sync as you update your model. It also has the concept of machine classes vs. human classes so that you can add convenience methods, etc. without your code being stepped on each time you update your model.
I've seen this problem before as well. Solution for me was to click on a non-data model file (in Groups & Files) and then click back on the versioned data model file (and entity within it) and then try File -> New File. Alternatively, restarting xcode, selecting the data model file (and entity within it) and then trying File -> New File also worked for me.
Click On the top left where it says "Simulator 3.1.2 | debug". Change it to "IPHONE Device 3.1.2 (BASE SDK)... voila. (SAMS iphone in 24hrs?? lots of typos and incomplete procedures!)
Managed Object Class file template can be seen under "Core Data" section of new file creation option of XCode 4.
The following screenshot depicts it.
Thanks,
prodeveloper.