Search Results

Search found 5262 results on 211 pages for 'commands'.

Page 18/211 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Rails- MiniMagick commands not working

    - by digitalWestie
    I'm running windows xp and I've got MiniMagick and ImageMagick installed (latest versions). I'm now using the console to test out that everything works. Using the ms command prompt image magick works no problem. I'm testing this by using the identify command. Now, when I try to use MiniMagick from the console by entering image = MiniMagick::Image.new('image.jpg') It returns MiniMagickError, "ImageMagick command ("identify \"input.jpg\"") failed: {:status_code = #"'identify' is not recognized as an internal or external command,\noperable program or batch file.\n"} Can anybody help?

    Read the article

  • Inheriting a Base Form but Paste/Cut Commands Not Captured

    - by ohu812
    I created a base form that has a specific size and an icon as a base for all forms created in my project (to be consistent in looks). The problem is, for some reason if I add a Text box to the Child form, I can no longer execute shortcuts like Copy (CTRL+C) etc into the Textbox. What should I do to handle this OTHER THAN writing code to capture those on the KeyUp control? This is also the case for RichTextBox control as well. Thanks

    Read the article

  • Emacs and Long Shell Commands

    - by darrint
    Is there a way to run a shell command, have the output show up in a new buffer and have that output show up incrementally? Eshell and other emacs terminal emulators do a find job of this but I see no way to script them. What I'd like to do is write little elisp functions to do stuff like run unit tests, etc. and watch the output trickle into a buffer. The elisp function shell-command is close to what I want but it shows all the output at once when the process finishes.

    Read the article

  • SQL commands generated in Django by running sqlall

    - by k-g-f
    In my Django app, I just ran $ python manage.py sqlall and I see a lot of SQL statements that look like this, when describing FK relationships: ALTER TABLE `app1_model1` ADD CONSTRAINT model2_id_refs_id_728de91f FOREIGN KEY (`model2_id`) REFERENCES `app1_model2` (`id`); Where does "7218de91f" come from? I would like to know because I'd like to manually write SQL statements to accompany models changes in the app so that my db's can be kept up to date.

    Read the article

  • Limit output of all Linux commands

    - by daniel
    I'm looking for a way to limit the amount of output produced by all command line programs in Linux, and preferably tell me when it is limited. I'm working over a server which has a lag on the display. Occasionally I will accidentally run a command which outputs a large amount of text to the terminal, such as cat on a large file or ls on a directory with many files. I then have to wait a while for all the output to be printed to the terminal. So is there a way to automatically pipe all output into a command like head or wc to prevent too much output having to be printed to terminal?

    Read the article

  • Latex "/indent" creating paragraph indentation / tabbing package requirement?

    - by Pareshkumar C. Brahmbhatt
    The Latex code provided below shows the usage of the command "\indent" as it appears in the document,but it does not produce the desired indentation within the document. Is there a specific package associated with the command "\indent" or "\="? I am asking for a step by step method of producing an indentation within a document for only one paragraph, regardless of location within the document. \documentclass[12pt]{article} \usepackage{graphicx} \topmargin -3.5cm \oddsidemargin -0.04cm \evensidemargin -0.04cm \textwidth 16.59cm \textheight 21.94cm \parskip 7.2pt \parindent 8pt \title{Physics} \author{Pareshkumar Brahmbhatt} \date{March 17, 2010} \begin{document} \maketitle \indent Now we are engaged in a great civil war. \end{document}

    Read the article

  • WPF-Prism CanExecute method not being called

    - by nareshbhatia
    I am coding a simple login UserControl with two TextBoxes (Username and Password) and a Login button. I want the Login button to be enabled only when the username and password fields are filled in. I am using Prism and MVVM. The LoginViewModel contains a property called LoginCommand that is bound to the Login button. I have a CanLoginExecute() method in my ViewModel but it fires only when the application comes up and then never again. So the Login button is never enabled. What am I missing? Here's my xaml: <TextBox x:Name="username" Text="{Binding Path=Username, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" /> <TextBox x:Name="password" Text="{Binding Path=Password, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" /> <Button Content="Login" cmnd:Click.Command="{Binding LoginCommand}" /> Here's my ViewModel class LoginViewModel : IDataErrorInfo, INotifyPropertyChanged { public LoginViewModel() { this.LoginCommand = new DelegateCommand<object>( this.LoginExecute, this.CanLoginExecute); } private Boolean CanLoginExecute(object dummyObject) { return (string.IsNullOrEmpty(Username) || string.IsNullOrEmpty(Password)) ? false : true; } private void LoginExecute(object dummyObject) { if (CheckCredentials(Username, Password)) { .... } } #region IDataErrorInfo Members public string Error { get { throw new NotImplementedException(); } } public string this[string columnName] { get { string result = null; if (columnName == "Username") { if (string.IsNullOrEmpty(Username)) result = "Please enter a username"; } else if (columnName == "Password") { if (string.IsNullOrEmpty(Password)) result = "Please enter a password"; } return result; } } #endregion // IDataErrorInfo Members #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } #endregion // INotifyPropertyChanged Members #region Properties private String _username; public String Username { get { return _username; } set { if (value == _username) return; _username = value; this.OnPropertyChanged("Username"); } } private String _password; public String Password { get { return _password; } set { if (value == _password) return; _password = value; this.OnPropertyChanged("Password"); } } public ICommand LoginCommand { get; private set; } #endregion // Properties }

    Read the article

  • Customizing toolbar items in VS2010

    - by Gordon Mackie JoanMiro
    Has the menu & toolbar customization functionality in VS2010 been reduced? I can't seem to be able to select an icon for an added command, nor set it to be icon-only. Previous versions of Visual Studio supported this functionality and even allowed the creation/editing of custom icons. Is this something that has suffered as a result of the move to the WPF-authored UI or am I missing something?

    Read the article

  • WPF TextBox Interceping RoutedUICommands

    - by Joseph Sturtevant
    I am trying to get Undo/Redo keyboard shortcuts working in my WPF application (I have my own custom functionality implemented using the Command Pattern). It seems, however, that the TextBox control is intercepting my "Undo" RoutedUICommand. What is the simplest way to disable this so that I can catch Ctrl+Z at the root of my UI tree? I would like to avoid putting a ton of code/XAML into each TextBox in my application if possible. The following briefly demonstrates the problem: <Window x:Class="InputBindingSample.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:loc="clr-namespace:InputBindingSample" Title="Window1" Height="300" Width="300"> <Window.CommandBindings> <CommandBinding Command="loc:Window1.MyUndo" Executed="MyUndo_Executed" /> </Window.CommandBindings> <DockPanel LastChildFill="True"> <StackPanel> <Button Content="Ctrl+Z Works If Focus Is Here" /> <TextBox Text="Ctrl+Z Doesn't Work If Focus Is Here" /> </StackPanel> </DockPanel> </Window> using System.Windows; using System.Windows.Input; namespace InputBindingSample { public partial class Window1 { public static readonly RoutedUICommand MyUndo = new RoutedUICommand("MyUndo", "MyUndo", typeof(Window1), new InputGestureCollection(new[] { new KeyGesture(Key.Z, ModifierKeys.Control) })); public Window1() { InitializeComponent(); } private void MyUndo_Executed(object sender, ExecutedRoutedEventArgs e) { MessageBox.Show("MyUndo!"); } } }

    Read the article

  • AvalonDock + UserControl + DataGrid + ContextMenu command routing issue

    - by repka
    I have this kind of layout: <Window x:Class="DockAndMenuTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock" Title="MainWindow" Height="350" Width="525"> <ad:DockingManager> <ad:DocumentPane> <ad:DockableContent Title="Doh!"> <UserControl> <UserControl.CommandBindings> <CommandBinding Command="Zoom" Executed="ExecuteZoom" CanExecute="CanZoom"/> </UserControl.CommandBindings> <DataGrid Name="_evilGrid"> <DataGrid.Resources> <Style TargetType="DataGridRow"> <Setter Property="ContextMenu"> <Setter.Value> <ContextMenu> <MenuItem Command="Zoom"/> </ContextMenu> </Setter.Value> </Setter> </Style> </DataGrid.Resources> </DataGrid> </UserControl> </ad:DockableContent> </ad:DocumentPane> </ad:DockingManager> </Window> Briefly: ContextMenu is set for each DataGridRow of DataGrid inside UserControl, which in its turn is inside DockableContent of AvalonDock. Code-behind is trivial as well: public partial class MainWindow { public MainWindow() { InitializeComponent(); _evilGrid.ItemsSource = new[] { Tuple.Create(1, 2, 3), Tuple.Create(4, 4, 3), Tuple.Create(6, 7, 1), }; } private void ExecuteZoom(object sender, ExecutedRoutedEventArgs e) { MessageBox.Show("zoom !"); } private void CanZoom(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = true; } } So here's the problem: right-clicking on the selected row (if it it was selected before the right click) my command comes out disabled. The command is "Zoom" in this case, but can be any other, including a custom one. If I get rid of either docking or UserControl around my grid there are no problems. ListBox doesn't have this issue either. So I don't know what's at fault here. SNOOP shows that in cases when this propagation fails, instead of UserControl, CanExecute is handled by PART_ShowContextMenuButton (Button), which is part of docking header. I've had other issues with UI command propagation within UserControls hosted inside AvalonDock, but this one is the easiest to reproduce.

    Read the article

  • MVVM/WPF: Button is not disabled although the CanExecute says return value is FALSE ??

    - by msfanboy
    Hello, I have a detach and attach button with Command="..." bound to my ViewModel. Although I have only 1 selected pupil but have NOT selected a subject the detach button is not disabled, the attach button is ??? public RelayCommand AttachdSubjecstCommand { get { return _attachSubjectsCommand ?? (_attachSubjectsCommand = new RelayCommand(() => AttachSubjects(), () => CanAttachSubjects)); } } public RelayCommand DetachSubjectsCommand { get { return _detachSubjectsCommand ?? (_detachSubjectsCommand = new RelayCommand(() => DetachSubjects(), () => CanDetachSubjects)); } }

    Read the article

  • MVVM, ContextMenus and binding to ViewModel defined Command

    - by Simon Fox
    Hi I am having problems with the binding of a ContextMenu command to an ICommand property in my ViewModel. The binding seems to be attaching fine...i.e when I inspect the value of the ICommand property it is bound to an instance of RelayCommand. The CanExecute delegate does get invoked, however when I open the context menu and select an item the Execute delegate does not get invoked. Heres my View (which is defined as the DataTemplate to use for instances of the following ViewModel in a resource dictionary): <UserControl x:Class="SmartSystems.DragDropProto.ProductLinkView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Proto"> <UserControl.Resources> <local:CenteringConverter x:Key="centeringConvertor"> </local:CenteringConverter> </UserControl.Resources> <UserControl.ContextMenu> <ContextMenu> <MenuItem Command="{Binding ChangeColor}">Change Color</MenuItem> </ContextMenu> </UserControl.ContextMenu> <Canvas> <Ellipse Width="5" Height="5" > <Ellipse.Fill> <SolidColorBrush Color="{Binding LinkColor}"></SolidColorBrush> </Ellipse.Fill> <Ellipse.RenderTransform> <TranslateTransform X="{Binding EndpointOneXPos, Converter={StaticResource centeringConvertor}}" Y="{Binding EndpointOneYPos, Converter={StaticResource centeringConvertor}}"/> </Ellipse.RenderTransform> </Ellipse> <Line X1="{Binding Path=EndpointOneXPos}" Y1="{Binding Path=EndpointOneYPos}" X2="{Binding Path=EndpointTwoXPos}" Y2="{Binding Path=EndpointTwoYPos}"> <Line.Stroke> <SolidColorBrush Color="{Binding LinkColor}"></SolidColorBrush> </Line.Stroke> </Line> <Ellipse Width="5" Height="5" > <Ellipse.Fill> <SolidColorBrush Color="{Binding LinkColor}"></SolidColorBrush> </Ellipse.Fill> <Ellipse.RenderTransform> <TranslateTransform X="{Binding EndpointTwoXPos, Converter={StaticResource centeringConvertor}}" Y="{Binding EndpointTwoYPos, Converter={StaticResource centeringConvertor}}"/> </Ellipse.RenderTransform> </Ellipse> </Canvas> </UserControl> and ViewModel (with uneccessary implementation details removed): class ProductLinkViewModel : BaseViewModel { public ICommand ChangeColor { get; private set; } public Color LinkColor { get; private set; } public ProductLinkViewModel(....) { ... ChangeColor = new RelayCommand(ChangeColorAction); LinkColor = Colors.Blue; } private void ChangeColorAction(object param) { LinkColor = LinkColor == Colors.Blue ? Colors.Red : Colors.Blue; OnPropertyChanged("LinkColor"); } }

    Read the article

  • How to disable Center Key (CK) and let only Left Soft Key (LSK) be used in j2me

    - by awaghad-ashish
    Hello everyone, I created a custom item in which I need to use the Center Key for the purpose of selecting and I am successfully able to use it with the keyPressed event using the keyCode as -5. The problem is, as soon as I press the CK, it also clicks on the command above the LSK and that causes the menu to pop up. Is there any way that I can disable the CK for a particular command or something like that (because I dont need CK, since I can click on the command through LSK as well, I want to use the CK specifically for the custom item)? Any kind of help will be appreciated, Thanks and regards, Ashish.

    Read the article

  • WPF UserControls - setting the .Command property on button inside UserControl

    - by Judah Himango
    I've got a UserControl that contains a button and some other controls: <UserControl> <StackPanel> <Button x:Name="button" /> ... </StackPanel> </UserControl> When I create a new instance of that control, I want to get at the Button's Command property: <my:GreatUserControl TheButton.Command="{Binding SomeCommandHere}"> </my:GreatUserControl> Of course, the "TheButton.Command" thing doesn't work. So my question is: Using XAML, how can I set the .Command property of the button inside my user control?

    Read the article

  • Bind Command to MenuItem

    - by Neir0
    Hi I have ListView and i am trying to bind command to ContextMenu of ListView. <ListView x:Name="listView1" ItemsSource="{Binding Path=Persons}"> <ListView.Resources> <ContextMenu x:Key="ItemContextMenu"> <MenuItem Header="Add" /> <MenuItem Header="Edit"/> <Separator/> <MenuItem Header="Delete" Command="{Binding Msg}" /> </ContextMenu> </ListView.Resources> <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <!--<EventSetter Event="PreviewMouseLeftButtonDown" />--><!--Handler="OnListViewItem_PreviewMouseLeftButtonDown" />--> <Setter Property="ContextMenu" Value="{StaticResource ItemContextMenu}"/> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> </Style> </ListView.ItemContainerStyle> <ListView.View> <GridView> <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}" /> <GridViewColumn Header="Sur Name" DisplayMemberBinding="{Binding Path=SurName}" /> <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Path=Age}" /> </GridView> </ListView.View> </ListView> <Button Content="Message" Command="{Binding Msg}" /> Binding to Button works well but when i click to delete item in ContextMenu, command is not working! Why?

    Read the article

  • iPhone plist data, large amounts of text and return key?

    - by user278342
    Basicly iv built my app using a plist. But with the data there is a few times when I need to press return and start a new line. The return key doesn't work in the plist. If I did it the older way it would be \n\n but that doesn't work either. Is there a obvious way I'm overlooking? Or will it be a case off just pressing the space bar allot? Thanks

    Read the article

  • CommandManager Executed Events don't fire for custom ICommands

    - by Andre Luus
    The WPF CommandManager allows you to do the following (pseudo-ish-code): <Button Name="SomeButton" Command="{Binding Path=ViewModelCommand}"/> And in the code-behind: private void InitCommandEvents() { CommandManager.AddExecutedEventHandler(this.SomeButton, SomeEventHandler); } The SomeEventHandler never gets called. To me this didn't seem like something very wrong to try and do, but if you consider what happens inside CommandManager.AddExecutedEventHandler, it makes sense why it doesn't. Add to that the fact that the documentation clearly states that the CommandManager only works with RoutedCommands. Nonetheless, this had me very frustrated for a while and led me to this question: What would you suggest is the best workaround for the fact that the CommandManager does not support custom ICommands? Especially if you want to add behavior around the execution of a command? For now, I fire the command manually in code behind from the button click event.

    Read the article

  • Multiple key binding in WPF

    - by nihi_l_ist
    How can i execute some command on, lets say, Ctrl+Shift+E? As i saw we can write the following: KeyBinding kb = new KeyBinding(TestCommand, Key.E, ModifierKeys.Control); this.InputBindings.Add(kb); But how can i add more ModifierKeys or Keys?

    Read the article

  • About the forward and backward a word behaviour in Emacs

    - by janoChen
    I don't know if there's something wrong with my settings but when I press M-f (forward a word) it doesn't matter where I am, it never place the cursor in the next word (just between words). This doesn't happen with M-b which place my cursor in the beginning of the previous word. Is this a normal behavior? How do I place my cursor at the beginning of the following word?

    Read the article

  • WPF: Copy Property to Clipboard

    - by Phil Sandler
    I have a string property in my ViewModel/Datacontext and want a simple button that copies its contents to the clipboard. Is this possible to do from XAML, or I do I need to handle the button click event (or use an ICommand) to accomplish this? I thought the following would work, but my button is always greyed out: <Button Width="100" Content="Copy" Command="ApplicationCommands.Copy" CommandTarget="{Binding MyStringProperty}"/>

    Read the article

  • Using Javascript in Adobe Reader

    - by godleuf
    Hi, I am currently using the following script for a few documents: var pp = this.getPrintParams(); pp.interactive = pp.constants.interactionLevel.automatic; this.print(pp); How do I add another command, say document.close() so that it reads the print function and then follows the close document last? Do I simply add the close command right after the print command so it would read var pp = this.getPrintParams(); pp.interactive = pp.constants.interactionLevel.automatic; this.print(pp); document.close(); Thanks.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >