I want to rename about 100 classes in my Xcode project. It would be painful to change every filename, then do a search and replace on the name of each class in question.
Is there a better way?
The change in question involves changing a prefix -- think of what Apple would need to do if they decided to rename all the classes in their "NS" framework to start with "MS". Unfortunately, the two caps in question do start some words in the project which are not among the class names in question.
If your version of Xcode is reasonably up-to-date, you can right-click on the symbol name in the editor and choose "Refactor..." which will take care of both renaming files and renaming symbols (with the appropriate checkbox enabled).
If you don't have C++, Shaggy's answer will probably work for you. But in my case, the answer appears to be that there is no better way.
Related
I use Poedit in a project for localization. Whenever I change an entry with poedit, it reorders all elements. I think it reorders the elements according to their line number and file but since I´m working with many coders on this project, poedit must not reorder all elements to avoid unneccessary line changes in the repository. Does anyone know how to achieve that?
Poedit never, under any circumstances, reorders content of the file when you “change an entry”. Files are always saved in the order they had when loaded, and it’s been like this since the very first version.
I have two explanations:
Either you’re confusing content of the file with the view presented in Poedit (where you can select your preferred display order in the View menu), in which case just change the display to whatever you like. But this seems unlikely.
Or you’re talking about not “changing an entry” in the file, but updating the PO file from source code. If that’s the case, it’s possible that you or some of your coworkers are using some very old version of Poedit. The fix would be to update to the current version, because the scan order was fixed to be stable across platforms in v1.6.5 1.3 years ago.
If it’s neither, you need to describe the issue reproducibly.
I'm rather new to Objective C (I'm using Xcode, if it's relevant). I tried to find an answer to this, but couldn't find anywhere...
My question is: Is there a possible way to change a variable name in the Localizable.strings file, so that it would change in the entire app?
I do not want to use the "search and replace" option, since if there are more instances of that string which are not this variable's name, they would change too (which is something I'm interested to avoid).
Basically I'm interested in finding the parallel function to java's "refactor", while using eclipse. Thanks to all helpers!
No, not possible to do it automatically. At least not in XCode - maybe AppCode can offer something, but I doubt it. Localizable.strings is not code - it's a text file which contains key-value pairs. Thus there are no real references to keys in your code, just same string values in your code and in the file.
Is there posibility to override files form.xhtml and model.xml (and template.xml) without compiling Orbeon sources ? I want to add field to form metedata, and I don't know, is it sufficient to add properly files to resource/orbeon/builder/form in my exploded .war file.
regards
Yes.
(That must have been the shortest answer I got a chance to post here!)
To expand on this a little bit, if you want to override Form Builder's form.xhtml, you can place your version in WEB-INF/resources/forms/orbeon/builder/form/form.xhtml. And of course, if there is any way to avoid this, you might want to consider it, as custom changes make it harder to upgrade, and can become quite a nuisance.
When using "keyword search" in offline MSDN that came with VS2008, is there any way to exclude unnecessary classes / namespaces that I know beforehand is out of the scope of my search? The search "filter" seems way to broad for this purpose.
To be specific, when I search for a class, say "ListView", I DO NOT want System.Web.UI class to show up as the first suggestion just because it is the first one alphabetically, and instead would like to see System.Windows.Forms.ListView as the document that comes up. I guess I could live with going to search result and browse through to find the intended class, or maybe typing class names with full namespace... But it would make my life easier if I could either temporary or even permanently (I know I won't touch ASP.NET for a while) remove unnecessary classes from the search index.
TIA
After trying several options I found out that manually taking the .HXS files associated with the unneeded namespaces out of the MSDN directory (In my case, C:\Program Files\MSDN\MSDN9.0\1041) seems to do the trick. MSDN document explorer recreates help index on the next launch after the content of the directory was modified. So even in case you need the documentation again, you can restore the help by simply moving the files back into the original folder.
The files I moved to take out System.Web.UI documentations were:
fxref_system.web.ui.adapters.hxs
fxref_system.web.ui.desi_obilecontrols.converters.hxs
fxref_system.web.ui.design.hxs
fxref_system.web.ui.design.mobilecontrols.hxs
fxref_system.web.ui.design.webcontrols.hxs
fxref_system.web.ui.design.webcontrols.webparts.hxs
fxref_system.web.ui.htmlcontrols.hxs
fxref_system.web.ui.hxs
fxref_system.web.ui.mobi_s.adapters.xhtmladapters.hxs
fxref_system.web.ui.mobilecontrols.adapters.hxs
fxref_system.web.ui.mobilecontrols.hxs
fxref_system.web.ui.webcontrols.adapters.hxs
fxref_system.web.ui.webcontrols.hxs
fxref_system.web.ui.webcontrols.webparts.hxs
Was pretty surprised when I saw this kind of somewhat primitive and forcible method to be the most effective...
Type "listview NOT System.Web.UI.ListView" for example - without the quotes :)
I'm working in XCode and I've also written an external editor tool that generates resources for use in the project. In the best case scenario, the tool would edit the project.pbxproj file so that it includes the generated resources in the project. I've read through the file in an attempt to understand it, and it's mostly discernible but there is still one major question I have.
If I wanted to generate a new Group from outside XCode (or a new anything, for that matter), how do I know what ID code to use? For example: 19C28FACFE9D520D11CA2CBB is one of them from my project. How am I supposed to know what to use if I make my own? Do they just need to be unique? Would it be legal to just make one up: 000000000000000000000001 and 000000000000000000000002 and 000000000000000000000003 etc. ?
Any help on this would be wonderful. Thanks.
Yes, you can make your own. The best way would be to use a hash function such as MD5 or SHA1 to generate it then you can truncate it at the desired length. I would hash the name of the file/group along with a time stamp appended this way you get a more unique result.