In WebStorm, when I start typing a function name, for a function call, I can use the tab key to autocomplete the function name. A tooltip will pop up showing me the default arguments for this function from the function definition.
Is it possible to make WebStorm autocomplete the default function parameters in the function call? Is there a key command I'm missing?
Not currently supported, please vote for IDEABKL-5496 and linked tickets
Related
I've searched a method into QT5 Docs and I couldn't find anything regarding a function that can get me all the elements within the StackWidget.
I have a StackWidget which contains the pages for my application, but so far the only way I found in order to be able to change that the page is this function setCurrentIndex which needs to take an index of that specific page. Is the anyway a function or something which cand return the name of the elements from that stackWidget or a way in which I can use the name of that object in order to change the page, not the index.
You may name your stack widgets using QObject::setObjectName function, and then iterate over them to find desired widget using its name, which is QObject::objectName.
When looking at a typical view in Django, there's usually an icon in the margin beside the template filename passed to render. You can also click on the string and hit "Ctrl+B" to jump to the template.
I have my own methods that I pass a string defining which template to use and it'd be nice if I could have PyCharm recognize that and allow me to quickly jump to the file. Is there a way to get PyCharm to recognize that method argument as being a template filename?
Make sure that Django is enabled in your project,
Also, you can right-click folder containing the templates, and selected ‘Mark-as’ which in the last 5 as far as I remember and select ‘Template Folder’
I found this documentation on suppressing certain inspections, and I remember using it before, however for some reason it is currently not available.
I am working on a UI for a Unity project and we are injecting a JavaScript function into the DOM from Unity. In WebStorm, the function is obviously undefined. Unfortunately, in the "fix" menu, I only have the following options:
Here is what I'm expecting, based on the docs:
I remember from using it in the past that it simply puts a comment before the call, but I don't remember what it is.
How can I enable this feature again? Alternatively, what is the comment so I can manually insert it?
Just as it's written in Help article, you have to press the -> key or click the right arrow button next to Create function.... menu item to open a submenu with suppress actions
You can also suppress it by adding a comment // noinspection JSUnresolvedFunction manually
I have a view that uses the id of the currently logged in user as a contextual filter. This was set using the Drupal UI and works well. Then I wrote a custom module that adds another parameter (a specific node id) to all views on my site. All views need this second parameter (and it needs to be added programmatically). This approach works well for all views that only use the programmatically added parameter as a contextual filter. However, the view that needs 2 filter values does not work, because I think I do not handle the order of parameters in the args array correctly. How do I set up views that already use filter values, but I need to add more programmatically (I set $args[0], but I guess this might be the problem) ?
I should say that I do not want those filters to appear in the URL.
testmod.module:
function testmod_views_pre_view($view, $display_id, array &$args) {
...
$args[0] = $value;
}
I thought I could just read the view's $arg array and add my special argument to it programmatically, but for the view that uses the logged-in user as a contextual filter, when I print print_r($args) it is an empty array, although the view is working correctly (and only shows results for the current user). Are contextual filters that I set up via the UI stored in a different place than $args ?
What needs to be done to tell the view how to use the 1. and 2. filter values correctly ? I'm a bit lost here.
Edit: I read that hook_views_pre_view() is too early to find contextual filters in the arg array (at that point you would only see arguments in that array passed via URL). Which hook would be best to achieve what I'd like to do ?
I now have a better understanding and found a solution. hook_views_pre_view() is indeed too early to see arguments that are NOT passed to the view via URL. That explains why $view->args was empty in my case. In hook_views_post_build() you do see ALL arguments (URL+nonURL) passed to the view. However, the way I solved my issue is still using $args[0] = $value; in hook_views_pre_view. That means the first argument passed to all views will always be $value. For views that are using additional arguments, Drupal will add them to $args later on. In my special case I have views that might not necessarily need the first argument that I pass, so I had to add a contextual filter Global: Null (at the first position) that allows a contextual filter value to be ignored (and as a default I set 0). This way each view does have the correct number of contextual filters and the order is correct, whether the view needs to use the very first argument or not. It might not seem intuituve to pass an argument to every view, even though not all views really need it, but adding a Global: Null dummy filter is easier than excluding views in an if() statement and always having to modify the module code when a new view has to be added later on.
I have rendering items and I can open its property dialog pop-up by using below javascript.
Sitecore.PageModes.PageEditor.postRequest("webedit:fieldeditor(command={11111111-1111-1111-1111-111111111111}, fields=field1|field2|field3, id={155DA3B8-41D9-4DA3-9D87-CBA72F67A0E2})");
However, I had to add Parameter Template for one rendering item. So, I created parameter template (Custom Styles) like this screenshot, but below javascript is not working.
Sitecore.PageModes.PageEditor.postRequest("webedit:fieldeditor(command={11111111-1111-1111-1111-111111111111}, fields=CSS1|CSS2|CSS3|CSS4|CSS5, id={F7D900EF-9D68-4488-855D-B96FBF6D9F27})");
I guess these fields are from parameter and I might have to use another command to call this pop-up, right? any idea, please?
This is what I found and there is webedit:editrenderingproperties command, but I don't know how I can use this command.
Sitecore.PageModes.PageEditor.postRequest("webedit:editrenderingproperties(.......)");
http://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2013/11/updated-field-editor-for-rendering-properties.aspx
Try webedit:ext:renderingfieldeditor instead (of course, if I understood your problem right).
There is an article that describes exactly what you are looking for:
Field Editor for Rendering Properties