Best way to spell check a plist? - iphone

I've got about 400 different NSString entries in my plist file. I want to spell check them. At the moment I'm having to go through, expand each entry (there's a huge amount) and select the text then do a spell check (Cmd + ;).
I really need to spell check the whole thing at once, like you would in a word document, or an excel spreadsheet. I don't mind having to manually filter out the occasional field I don't need changing. It would be quicker that way, than having to go through and select all the different strings separately.
Is there anything I can do? Or am I doing it the best way already?
Thanks
Tom

In Xcode, right-click on the file you want to spellcheck. Select "Open as->Plain text file".
From there, you should be able to spellcheck the whole plist.

Related

Is there an Emacs read-only or view mode that allows inserting some text?

Here's the use case: I'm writing a novel in Emacs (in org-mode). One part of my writing/editing flow is to read over some large portion of what I've written, collecting notes/possible edits/etc as I go. The sort of thing you'd do, on paper, by printing it all out and then writing notes in the margin.
I want to prevent myself from, as I do this kind of review, actually doing any writing -- but that's surprisingly hard. Like, if the buffer is editable, I start to type a brief note about a fix, then find myself starting to restructure / fix a sentence, and next thing I know, I've spent five minute polishing
a single paragraph. This not only slows me down, it breaks my ability to imagine a reader's response.
I've tried just putting the buffer in view-mode, and that sort of works -- but then it's laborious to try to identify the places I want to go back and review/fix up.
My ideal would be, to have something in view-mode, which I genuinely can't edit, but which, as I move the cursor through it, I could hit some key combination, and it would allow me to enter a brief note in the minibuffer, which would then get inserted into the main buffer, at point, possibly inside brackets or a comment or some such.
Does anyone know of something like that? Or have any pointers to something similar which I could try to adapt?
You can easily set bookmarks at any locations. And bookmarks can contain annotations.
If you use library Bookmark+:
The annotations are in Org Mode by default, and they can even be separate files (by default they are part of the bookmarks themselves, so stored in your bookmarks file).
You can bookmark not just a position but also a region of text, whether a sentence, paragraph, page, or an arbitrary span of text.
You can automatically name bookmarks as you set them, if you don't care about the names.
Updated after OP's comment saying "I prefer to shove the comments/questions/notes directly into the text of the novel. Because I end up adding/deleting/moving text a ton, and I want the notes to move with the text":
Bookmarks move with the surrounding text. That is, they generally get relocated automatically, since the surrounding text is recorded as part of the bookmark, and when jumping to a bookmark that text is looked for.
Occasionally the context has changed so much that a bookmark can't be relocated automatically, and you are prompted to relocate it manually.
But yes, bookmarks are stored in a bookmark file, separately from the files they target. There are both advantages and disadvantages to this feature. Advantages include (1) removing clutter from the text (annotations, including notes about possible text changes are metadata), (2) immediate access to particular text locations from anywhere, (3) a separate, persistent record/history of work or thoughts on it, (4) you can have multiple, separate sets of bookmarks/annotations for the same target text.
One thing you might find handy, when using bookmarks especially for annotating a particular file: C-x p C-l switches to a bookmark file that has only bookmarks for the current file or buffer, creating such a file on the fly if none
exists. (This is available only with Bookmark+.)

Is it possible to attach two word file with each other?

Like in MS Excel one csv file may contain more than one sheet, Like this what I have to do is I want to keep all the theory in one word file and the programs in another word file. But I want to attach these both file with each other as a single DOC file.
Like a single DOC file contain theory as well as programs, which is open as two separate content/file.
Something close to what you want to do is the following:
In new Word Document Select your "View" Tab and then Select "Outline View".
Then Select "Show Document". The "Insert Button will now be visible.
You can now insert various documents in this document.
Unfortunately as far as I know this will have links into the original Documents which you can then open, edit and access from the new document.
Try it out and let me know!
Also, you can maybe try Microsoft One Note, I think this is probably what you looking for. See partial screen shot below for an idea.

Attempting to automate savingnew word document using user input

I'm using Applescript and I'm having trouble getting this to work, probably because my understanding of variables is quite limited. Anyhow, this is the script I have so far:
tell application "Microsoft Word"
activate
end tell
display dialog "Input Document Name" default answer ""
set answer to text returned of result
tell application "Microsoft Word"
create new document
save document as answer
end tell
I would appreciate any help or even a redirect to a relevant post. Thanks.
You have to follow the relevant Applescript dictionaries closely, and work out what Applescript is expecting. In this case, you need "save as". If you look up "save as" in the Word applescript dictionary the first things you see are
save as document
[file name text]
Let's try to plug what you have into that. Instead of "save document as answer" you would at least need
save as document file name answer
But that is not quite enough, because "document" on its own isn't the name of anything, or a reference to any document. At this point you need to look up what "create new document" does.
create new document
(various parameters)
-> document
So what you probably need is something like
set theDocument to create new document
save as theDocument file name answer
It isn't always quite a straightforward as that, and not everything is obvious from the dictionary. For example, I do not think the dictionary tells you that when word creates a new document it typically becomes the "active document". If you knew that in all possible circumnstances, that is what Word does, you could also use
create new document
save as active document file name answer
But the first approach is IMO more robust.

Word 2010 additional file format

I'm not sure whether this is the best approach for this or whether I perhaps should ask the question more clearer.
What I want to do is to create an additional file output - e.g. if the user uses Word to create a description consisting of known tags, I want to be able to save this as bbcode.
Now I do have an idea of how to do this, but is there a way to say add another file format to the "Save file"-dialog box and have it run a parser and file writer, that'd read the current document and export it using known bbcode-tags (that perhaps would be adjustable from some configuration window)?
The result would be a file containing bbcode as well as the text information that the user has entered.
How would I hook up my addin to the file output dialog? Is there a way to do this? I'm not sure it's custom XML since I won't be using the XML at all.
Thanks in advance and please excuse my poor English.
Edit: after having a look at the Word 2010 AddIn-project, I figured, that I'm looking for a way to define my own "export"-format. I'd like to export the BBCode to a .txt (or even .bbcode) file. The Microsoft.Office.Interop.Word.WdExportFormat seems to have its own fixed enumeration. Is there a way to add an export-format?
There is some code for this here:
phpbb.com/community/viewtopic.php?f=17&t=395554

How to merge two arrays in a plist?

I have a plist with two string arrays. I want to merge these two arrays. I tried selecting all the strings in one array and copying to the other, but I cant select multiple items. I don't want to do this programmatically. I'm on a Mac using xcode. Any thoughts?
Just edit the PList files as text (context menu, "Open as plain text file" or "Source code file") and copy the relevant items in.
Save the plist in XML format if it isn't already, then open it as text. If you understand XML, it's pretty straightforward to move all the string nodes from one array to the other, then just remove the unwanted array node.