Xcode refactoring error - "The Selection Does Not Contain Identifiable Content" - cocoa

Select a method
Selection http://synapticmishap.co.uk/aSO/SelectionGrab.jpg
Edit > Refactor...
Select "Move Up"
I get the following error a lot.
Refactoring Error http://synapticmishap.co.uk/aSO/RefactoringError.jpg
Any ideas on how I can get Xcode to, well, do its job?
Solution Summary
Option 2 that Peter suggests below did the trick. I can't believe that
a) I didn't try this Smacks head
and
b)
Xcode couldn't find a sane way of saying "Don't select the whole method!"

Two possibilities:
Maybe that blank line at the start is screwing it up? Try starting the selection at the -/+.
Try right-clicking the first segment of the selector and Refactoring that.

I tried refactoring a class (implementation) after I renamed the containing file manually and got the same error. Once I renamed the file back to its original name I was able to refactor.

Related

SSRS error on preview : "The size necessary to buffer the XML content exceeded the buffer quota" hides original error

I understand that there is definitely something wrong with my report (e.g. columns missmatcch) and I need to correct it but what I see is the WCF error message that hides actual problem and exactly this hiding irritates me much more than original problem: columns missmatch.
I guess we need to adjust the WCF 'buffer size' and we will get original problem message. But where is the config file?
Text search of "system.serviceModel" in the C:\Program Files (x86)\Microsoft Visual Studio 10.0 doesn't bring good idea...
P.S. Since this is just preview of report I do not think that it is SSRS configuration problem. Problem localised somewhere in DevStudio process or int the DevStudio's internal web server process ...
P.P.S Please help me too improve the question. I see that responders doesn't understand what kind of help I need.
I have encountered multiple "flavors" of this bug in SSRS Preview. It seems the renderer for Preview mode is quite fragile.
There is a simple way to solve this. Ignore the error and attempt to upload the RDL file to your reporting server. The uploader will happily tell you exactly what is wrong with your file - it will tell you exactly what field has a problem and what that problem is. If there are multiple errors, you will get told each and every field and the error associated with each one.
I can create this bogus XML buffer error with any of the following:
Add a new Tablix, start to connect it to a dataset, then cancel out.
Copy/paste some text into a textbox from a MS Word document where one or more lines have a negative right indent (right column end is outside page margin).
Connect a dataset with a varchar(8000) returned value.
Please Check if any of your report items are referencing fields that are not in existing dataset scope.
This indeed worked for me.
See Below link for more information:
http://connect.microsoft.com/SQLServer/feedback/details/742913/ssdt-reporting-services-designer-error
I have seen this error when adding a new field to an existing dataset by clicking "Refresh Fields".
The dataset source was a stored procedure. The result was only a few of original fields showed up in the dataset field list and not the new field. If I tried to preview the report I get XML buffer error.
Workaround was to not refresh fields but hit add new field and type the new field name into the dataset properties field last.
Worked fine after that.
I got this error again today.
I had created a table to hold data to replace two slow queries. I changed some names to clean up the process.
I think the error actually means that there are so many problems with my report that the buffer holding the various error messages isn't large enough which leads to the error message.
The size necessary to buffer the XML content exceeded the buffer quota
Of course this should be an easy fix but Microsoft has said that they will not fix it.
https://connect.microsoft.com/SQLServer/feedback/details/742913/ssdt-reporting-services-designer-error
EDIT: I've updated my answer based on having fixed the issue.
I'm currently experiencing this problem after having changed multiple stored procedures and updating the dataset names in the SSRS report.
And when I try to run the preview I get the exact same error.
As it turns out, after investigating the issue, the problem was that I had changed the name property of my datasets.
There several places in my report where formulas or expressions use the old name properties of the datasets I renamed. After reverting the dataset names back, I managed to get the real errors like missing fields etc. atcual errors came back after I set my dataset name properties back to what they were.
I only changed the name property back to what it was, the stored procedure names were correctly referring to my renamed stored procedures.
I had this problem when after copying and pasting a tablix, it changed CDbl in a formula to Microsoft.ReportingServices.RdlObjectModel.ExpressionParser.VBFunctions.CDbl. I opened up the XML and removed all instances of "Microsoft.ReportingServices.RdlObjectModel.ExpressionParser.VBFunctions." and the report then worked.
For a working report, when I tried to add a column it gave me this error. I edited the .rdl file using notepad++. After SSRS prompt to reload the change from disk, it worked without issues.
I got this error after copying my Custom Code to Visual Studio for hightlighting the code for better readability. Well, Visual Studio added class definitions to the beginning and end of the file. After editing code, I pasted it back to report Custom Code, then got this error. Fix was just to remove class definitions (Public Class Class1 and End Class) from Custom Code. So, check your Custom Code also (if any).
I got this error after adding some new parameters to an existing report.
For some reason when I created the parameters first then modified the Dataset to use the new parameters I got the error, but when I modified the Dataset first then added the parameters second and I did not get the error.
This seemed like very strange behavior to me so I tested it by restoring the report from repository and repeating the process three times with each method, and had identical behavior every time.
I am also facing this problem. I solve this Find and replace
Microsoft.VisualBasic.Interaction.iif ==> iif
Microsoft.ReportingServices.RdlObjectModel.ExpressionParser.VBFunctions.cdbl
==> cdbl
I hope this may helps someone. Thanks
Possible root causes
Parameter name is incorrect(case/order)
Accessing non-existing property.
and many more...
Solution: To get the exact error message are
Deploy SSRS report and find the error : Suggested by "Kim Crosser" already
Remove the section(SSRS/Report content) temporarily you feel is error free to free space in buffer so that you can get actual error message. Later add sections back to the page(removed earlier).
I had the same error message and it was totally caused by my doing. It's a bit embarrassing, but if it helps someone out then great! I had accidentally copied my dataset query that included a small sub select statement within it, which I was using to check parameter/variable values.
Another solution is to open the .rdl file in Report Builder 3.0 (as opposed to Visual Studio) and try to preview it. I found this gave me the details of the error, although if more than one error is present it only shows the first.
I previously binded a TextBox to
Fields!FieldName
and fixed it with
Fields!FieldName.Value
With that said, and with the other answers posted as well, this error happens in different flavors. My issue was fixed after I had the field property "Value" included.

Show all current conflicts using tool

I am sometimes having conflicts when merging two branches using subversion.
This is not a real problem, as I just have to look at the actual code and solve them one after the other.
But I usually don't want to solve them during the merge process, as tortoise wants me to do and solve them afterwards.
Thing is our codebase is quite huge, and it takes a lot of times for the icons to refresh which makes it quite difficult to track down conflicts quickly.
So what is the best/easiest way to have some kind of listing of all the current conflicts in a repository ?
Any idea is welcome, I can also use another tool or the command line as soon as the solution is efficient.
Thx!
svn status will help you to see postponed merge-conflicts (which also block possibility to commit)
Extraction from svn help status
The first seven columns in the output are each one character wide:
First column: Says if item was added, deleted, or otherwise changed
...
'C' Conflicted
Second column: Modifications of a file's or directory's properties
...
'C' Conflicted
Seventh column: Whether the item is the victim of a tree conflict
...
'C' tree-Conflicted
Ok, here is what I found to get around :
In whatever repo you know have conflicts, you can use
right click->Tortoise SVN->Resolved.
This will list all conflicts in the repo, taken recursively all subfolders too.
Find a target that is big enough for you, and resolve your conflicts till the list is empty.
You can even resolve them directly within the window is you wanna go faster.
Group resolve also works for elements in the same folder that have the same kind of conflict.
Hope this helps someone :)

can I edit Xcode code completion suggestions?

I love the code completion in Xcode, it saves me a lot of typing work. Also, it confirms my code is probably error-free in real time. However, to me, some code suggestions are disturbing. For example, when I type else after an if-statement, Xcode suggests this:
else {
statement
}
I'd like to change this to just:
else
statement
Because, I quite often just want to use one line of code there, and adding curled brackets goes much faster than removing them. The other annoying thing is the fact that using such a suggestion takes the return key, while a new line does as well. So, if I would want to use my preferred way as shown above, I would first have to press the escape key in order to stop Xcode suggesting it, and then press the return key. Not a real pain, but I think it's unnecessary.
There are some other code suggestions which I would like to change, but I think I have made my point already. Is there a way to change these code suggestions? I know Apple doesn't provide an easy way within Xcode itself, but I'm willing to dive into the finder for the file with suggestions and change it manually. Thanks!
in your example, it would work to add a space after typing else. Doing that removes the brace suggestion and you can just hit enter.

Input Method (IMKit) setup trouble

I'm trying to create a new input method using Input Method Kit. The documentation is very lacking, but I believe I'm setting the project up correctly and I place the input method into ~/Library/Input Methods after building it. However, I see strange behavior when looking at the list of input sources in Language & Text preferences.
The NumberInput sample seems to work fine for me, and there are no differences in my new input method that I can find, aside from the values for tsInputMethodIconFileKey, InputMethodConnectionName, InputMethodServerControllerClass, and CFBundleIdentifier in Info.plist. But I'm seeing these issues:
When I use my desired bundle identifier for the app, nothing shows up in the list. (This bundle ID doesn't exist anywhere else on my system.)
Changing the bundle identifier to be the same as the NumberInput sample makes it show up in the list, but when I select it, it sometimes duplicates entries in the list, and generally behaves weirdly.
As I make slight modifications to the bundle identifier, it seems to behave normally, but once I change it back to the original identifier (the desired one) it disappears from the list.
If I quit the process associated with my input method, selecting it in the menu again doesn't relaunch it.
Does anyone have any idea what's going on? Apple's documentation for IMKit is nearly nonexistant and it doesn't seem like many people have documented their own attempts at making input methods. Is there something I'm missing?
Thanks in advance!
P.S. Yes I've tried logging out and back in and even restarting my computer, nothing seems to significantly change the behavior I mentioned above.
This worked for me. Try this: make sure your bundle identifier contains "inputmethod" somewhere in the path. Example "com.blugs.inputmethod.IPAPalette". Yes AFAIK it's totally undocumented. Yes the documentation is awful. Hope this helps! Cheers.
The accepted answer here is very useful, adding .inputmethod. to your Bundle ID.
I'll add that I found a bit of documentation for this in TextInputSources.h, which contains a large number of comments and documentation not found in the Input Method Kit overview docs. Worth a read.
Carbon > Frameworks > HIToolbox > TextInputSources.h
In the Info.plist file, the value for the CFBundleIdentifier key must be a string that includes ".keyboardlayout."; typically this might be something like "com.companyname.keyboardlayout.MyKeyboardLayouts" (Before Leopard, it was required to be a string that began "com.apple.keyboardlayout", even for keyboard layouts not supplied by Apple).
and
If this key is not specified, an InputSourceID will be constructed by combining the BundleID with an InputModeID suffix formed by deleting any prefix that matches the BundleID or that ends in ".inputmethod."

Cucumber: Automatic step file creation?

When i run cucumber it displays the
possible steps that i should define, an example from the RSpec book:
1 scenario (1 undefined)
4 steps (4 undefined)
0m0.001s
You can implement step definitions for undefined steps with these snippets:
Given /^I am not yet playing$/ do
pending
end
When /^I start a new game$/ do
pending
end
Then /^the game should say “Welcome to CodeBreaker”$/ do
pending
end
Then /^the game should say “Enter guess:”$/ do
pending
end
Is there a way that it will automaticly create the step definitions file, so i don't have to
rewrite or copy paste by hand but i can just to customize them to be more generic?
Cucumber doesn't offer this feature. Probably because you would have to tell it where to put the step definitions file, and what to name it.
Like Kevin said, Cucumber would have to know the name of the file to put it in, and there are no good defaults to go with, other than using the same file name as the feature file. And that is something I consider an antipattern: http://wiki.github.com/aslakhellesoy/cucumber/feature-coupled-steps-antipattern
Intellij Idea or RubyIDE does exactly what you are asking for:
Detects missing step definitions
Creates missing step definitions in a new file (you choose the name of the file) or in one of the existing step definition files
Highlights matched step parameters
see http://i48.tinypic.com/10r63o4.gif for a step by step picture
Enjoy
There is a possibility this kind of feature could be useful, but as Kevin says, it doesn't exist at present. But it could also get quite messy, quite quickly.
Maybe you already do this, but there's nothing stopping you cut and pasting the output direct into your text editor, or even piping the output direct to your text editor if you're so inclined. Then at least you're getting pretty much most of the way there, bar creating the file and naming.
try this https://github.com/unxusr/kiwi it auto generate your feature file and make the step definitions file for you and you just fill in the steps with code.
In later version will write the code of the steps and run the test all of that automagically
You can use a work around way to generate steps file
all you have to do is to run the Cucumber on a feature doesn't have defined steps by identify a specific feature as the following command:
1) using path
bundle exec cucumber {PATH}
note path would start with features/....
for example
features/users/login.feature
1) using tags
bundle exec cucumber --tags=#{TAG}
note tag should be above your scenario in the steps file
for example
#TAG
Scenario:
And you will have the suggested steps in the console with pending status

Resources