Search Results

Search found 715 results on 29 pages for 'dennis allen'.

Page 15/29 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • WPF: How do I debug binding errors?

    - by Jonathan Allen
    I'm getting this in my output Window: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'ListBoxItem' (Name=''); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') This is my XAML, which when run looks correct <GroupBox Header="Grant/Deny Report"> <ListBox ItemsSource="{Binding Converter={StaticResource MethodBinder}, ConverterParameter=GrantDeny, Mode=OneWay}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Label Content="{Binding Entity}"/> <Label Content="{Binding HasPermission}"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </GroupBox>

    Read the article

  • Where Is TShellListView in Delphi 2009?

    - by Toby Allen
    We have recently moved to Delphi 2009. I can't find the TShellListView and TShellTreeView controls. Do I need to install something extra? From searching the web it seems they are shipped with Delphi 2009 but for some reason they havent been installed. Has anyone had a similar problem? Update: This is so unbelivably idiotic. It appears codegear have installed the demos to the allusers section of documents and settings C:\Documents and Settings\All Users\Documents\RAD Studio\6.0\Demos\DelphiWin32\VCLWin32\ShellControls Answer here

    Read the article

  • java UnsatisfiedLinkError awt.image

    - by Allen
    I have a program that makes use of the following method to get a scaled instance of an image icon: public ImageIcon createScaledImageIcon(String filename) { ImageIcon icon = new ImageIcon(filename); Image image = icon.getImage().getScaledInstance(cardWidth, cardHeight, Image.SCALE_SMOOTH); icon.setImage(image); return icon; } I don't know if it's the source of the problem or not. But i get the following error messages: Exception in thread "Image Fetcher 0" java.lang.UnsatisfiedLinkError: sun.awt.image.ImageRepresentation.setBytePixels(IIII[BIILsun/awt/image/ByteComponentRaster;I)V at sun.awt.image.ImageRepresentation.setBytePixels(Native Method) at sun.awt.image.ImageRepresenation.setPixels(Unknown Source) at sun.awt.image.ImageDecoder.setPixels(Unknown Source) at sun.awt.image.GIFImageDecoder.sendPixels(Unknown Source) ... Let me know if there is any other information I could include that might be of use.

    Read the article

  • how to add item to Spinner's ArrayAdapter?

    - by allen-c
    i had a EditText , a button and a spinner . When click the button , the spinner will add a new item with name you entered in the EditText. But here is the question, my adapter.add() method seems doesn't work...here is my code: public class Spr extends Activity { Button bt1; EditText et; ArrayAdapter<CharSequence> adapter; Spinner spinner; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); bt1 = (Button)this.findViewById(R.id.bt1); et = (EditText)this.findViewById(R.id.et); spinner = (Spinner)this.findViewById(R.id.spr); adapter = ArrayAdapter.createFromResource( this, R.array.planets_array, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); bt1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String temp = et.getText().toString(); adapter.add(temp); adapter.notifyDataSetChanged(); spinner.setAdapter(adapter); } }); spinner.setOnItemSelectedListener(new Spinner.OnItemSelectedListener(){ @Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { Toast.makeText(parent.getContext(), "The planet is " + parent.getItemAtPosition(pos).toString(), Toast.LENGTH_LONG).show(); } @Override public void onNothingSelected(AdapterView<?> arg0) { }}); } }

    Read the article

  • ItemsControl ItemsTemplate vs ContentTemplate

    - by Allen Ho
    Hi, Is there any difference between setting the ContentTemplate of a ListBoxItem, compared to setting the ItemsTemplate on the ListBox? Or is it just a preference? Just say you set the ItemsTemplate of the ListBox can you still get the Data Template you assigned to the ListBox ItemsTemplate via the ListBoxItems ContentTemplate? ie. Like below ListBoxItem myListBoxItem = ...; ContentPresenter myContentPresenter = FindVisualChild(myListBoxItem); DataTemplate myDataTemplate = myContentPresenter.ContentTemplate;

    Read the article

  • Building Web Application project using MSBuild from command line on 64-bit: missing targets file

    - by James Allen
    Building a solution containing a web application project using MSBuild from powershell like this: msbuild "/p:OutDir=$build_dir\" $solution_file Works fine for me on 32-bit, but on a 64-bit machine I am running into this error: error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. I am using Visual Studio 2008 and powershell v2. The problem has already been documented here and here. Basically on 64-bit install of VS, the Microsoft.WebApplication.targets needed by MSBuild is in the Program Files(x86) dir, not the Program Files dir, but MSBuild doesn't recognise this and so looks in the wrong place. The two solutions are not ideal: Manually copy the file on 64-bit from Program Files(x86) to Program Files. This is a poor solution - every dev will have to do this manually. Manually edit the csproj file so MSBuild looks in the right place. Again not ideal: I would rather not have to get everyone on 64bit to manually edit csproj files on every new project. e.g. <Import Project="$(MSBuildExtensionsPathx86)\$(WebAppTargetsSuffix)" Condition="Exists('$(MSBuildExtensionsPathx86)\$(WebAppTargetsSuffix)')" /> Ideally I want a way to tell MSBuild to import the target file form the right place from the command line but I can't work out how to do that. Any solutions?

    Read the article

  • NHibernate save / update event listeners: listening for child object saves

    - by James Allen
    I have an Area object which has many SubArea children: public class Area { ... public virtual IList<SubArea> SubAreas { get; set; } } he children are mapped as a uni-directional non-inverse relationship: public class AreaMapping : ClassMap<Area> { public AreaMapping() { HasMany(x => x. SubAreas).Not.Inverse().Cascade.AllDeleteOrphan(); } } The Area is my aggregate root. When I save an area (e.g. Session.Save(area) ), the area gets saved and the child SubAreas automatically cascaded. I want to add a save or update event listener to catch whenever my areas and/or subareas are persisted. Say for example I have an area, which has 5 SubAreas. If I hook into SaveEventListeners: Configuration.EventListeners.SaveEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is only fired once only for area (SubAreas are ignored). I want the 5 SubAreas to be caught aswell in the event listener. If I hook into SaveOrUpdateEventListeners instead: Configuration.EventListeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is not fired at all. Strangely, if I hook into SaveEventListeners and SaveOrUpdateEventListeners: Configuration.EventListeners.SaveEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; Configuration.EventListeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is fired 11 times: once for the area, and twice for each SubArea! (I think because NHIbernate is INSERTing the SubArea and then UPDATING with the area foreign key). Does anyone know what I'm doing wrong here, and how I can get the listener to fire once for each area and subarea?

    Read the article

  • Java Simple Chat Box

    - by Allen
    I am trying to create a very simple chat window that simply has the ability to display some text, which i add to from time to time. However I get the following run time error when attempting to append text to the window: java.lang.ClassCastException: javax.swing.JViewport cannot be cast to javax.swing.JTextPane at ChatBox.getTextPane(ChatBox.java:41) at ChatBox.getDocument(ChatBox.java:45) at ChatBox.addMessage(ChatBox.java:50) at ImageTest2.main(ImageTest2.java:160) Here is the class to handle the basic operations: public class ChatBox extends JScrollPane { private Style style; public ChatBox() { StyleContext context = new StyleContext(); StyledDocument document = new DefaultStyledDocument(context); style = context.getStyle(StyleContext.DEFAULT_STYLE); StyleConstants.setAlignment(style, StyleConstants.ALIGN_LEFT); StyleConstants.setFontSize(style, 14); StyleConstants.setSpaceAbove(style, 4); StyleConstants.setSpaceBelow(style, 4); JTextPane textPane = new JTextPane(document); textPane.setEditable(false); this.add(textPane); } public JTextPane getTextPane() { return (JTextPane) this.getComponent(0); } public StyledDocument getDocument() { return (StyledDocument) getTextPane().getStyledDocument(); } public void addMessage(String speaker, String message) { String combinedMessage = speaker + ": " + message; StyledDocument document = getDocument(); try { document.insertString(document.getLength(), combinedMessage, style); } catch (BadLocationException badLocationException) { System.err.println("Oops"); } } } if there is a simpler way to do this, by all means let me know. I only need the text to be of a single font type, and uneditable by the user. Aside from that, I just need to be able to append text on the fly.

    Read the article

  • How do I use WS-Security with WCF?

    - by Jonathan Allen
    Below is the style of header I need to create. I am expected to use either a public/private key or a SSL style certificate. I don't know for certain, but I think my counter-party is using some form of Java. <soap-env:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <ds:Reference URI="#secinfo"> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <ds:DigestValue>xxxxxxxxxxxxx</ds:DigestValue> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <ds:XPath>//*[@id='secinfo']/child::*/text()</ds:XPath> </ds:Transform> </ds:Transforms> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>xxxxxxxxxxds:SignatureValue> <ds:KeyInfo> <ds:KeyName>xxxxxxx</ds:KeyName> </ds:KeyInfo> </ds:Signature> <t:UsernameToken xmlns:t="http://schemas.xmlsoap.org/ws/2002/04/secext" id="secinfo"> <t:UserInfo>USER=xxxx;CORR=xxxx;TIMESTAMP=201003161916</t:UserInfo> </t:UsernameToken> </wsse:Security> </soap-env:Header>

    Read the article

  • How can I bind a winforms Opacity to a TrackBar (slider)

    - by Allen
    I've got a winform with a BindingSource that has an int property named Opacity in its DataSource. I also have a TrackBar on the winform that I want to use to control the Opacity of the winform. I've bound the Value property on the TrackBar to the Opacity and that functions just fine, sliding the TrackBar will change the variable from TrackBar.Minimum (0) to TrackBar.Maximum (1). I've also bound the Opacity property of the winform to this value, however, since the TrackBar's values only go from Minimum to Maximum in +/-1 rather than +/- .1 or so (like Opacity does), it doesn't properly fade the winform. Instead, 0 will turn it opaque and 1 will turn it fully visible. I need a way to work within the architecture described above, but get the TrackBar to change its value from 0 to 1 in defined increments smaller than 1.

    Read the article

  • Drawing a PDF Right-Side-Up in CGContext

    - by Carter Allen
    I'm overriding the drawRect: method in a custom UIView, and I'm doing some custom drawing. All was going well, until I needed to draw a PDF resource (a vector glyph, to be precise) into the context. First I retrieve the PDF from a file: NSURL *pdfURL = [NSURL fileURLWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"CardKit.bundle/A.pdf"]]; CGPDFDocumentRef pdfDoc = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CGPDFPageRef pdfPage = CGPDFDocumentGetPage(pdfDoc, 1); Then I create a box with the same dimensions as the loaded PDF: CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFArtBox); Then I save my graphics state, so that I don't screw anything up: CGContextSaveGState(context); And then I perform a scale+translate of the CTM, theoretically flipping the whole context: CGContextScaleCTM(context, 1.0, -1.0); CGContextTranslateCTM(context, 0.0, rect.size.height); I then scale the PDF so that it fits into the view properly: CGContextScaleCTM(context, rect.size.width/box.size.width, rect.size.height/box.size.height); And finally, I draw the PDF and restore the graphics state: CGContextDrawPDFPage(context, pdfPage); CGContextRestoreGState(context); The issue is that there is nothing visible drawn. All this code should theoretically draw the PDF glyph into the view, right? If I remove the scale+translate used to flip the context, it draws perfectly: it just draws upside-down. Any ideas?

    Read the article

  • WPF: Databinding and Combo Boxes

    - by Jonathan Allen
    I have two classes Company CompanyKey CompanyName Person FirstName LastName CompanyKey The list items on the combo box is bound to a collection of CompanyObjects. How to I databind the selected item property of the Combobox to the Person.CompanyKey property?

    Read the article

  • WCF ChannelFactory vs generating proxy

    - by Allen Ho
    Hi, Just wondering under what circumstances would you prefer to generate a proxy from a WCF service when you can just invoke calls using the ChannelFactory? This way you wont have to generate a proxy and worry about regenerating a proxy whne the server is updated? Thanks

    Read the article

  • Error connecting to online fossil repository after changing password.

    - by Toby Allen
    I set up a fossil repository on a shared hosting account I have. I created a perl script fossil.pl that points to a cloned repository that I put up on the webspace. I set all the correct permissions (755). When I go to fossil.pl I get the web ui. Everythings cool. However I'm having a problem with pushes and hoping someone could point me to a solution. When I clone a repository it sets a new password for me (Toby) in the new cloned repository. If I push to this repository online without changing the password it works fine, I can push up changes from my local machine to the online repository. However once I change the password for Toby (to something more easily remembered by me) I get the following error. Bytes Cards Artifacts Deltas Send: 1810 9 0 2 1Server Error: not authorized to write fossil: server says: not authorized to write Anyone know why this is happening? Anyone know how to fix it?

    Read the article

  • How to customize the pop up menu in iPhone?

    - by Allen Dang
    The application I'm creating needs a function like user selects some text, a pop up menu shows, and user clicks "search" menu to perform a search directly. Problem is the current pop up menu provided by UIMenuController doesn't support to be extended. So my thought is to subscribe "UIMenuControllerDidShowMenuNotification", get the frame of pop up menu, and display the "search" button right aside. But during the implementation, I met a strange problem, the notification seems never be sent, means after the menu shown, I still cannot be notified, following are the key section of code. - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(menuDidShow:) name:UIMenuControllerWillShowMenuNotification object:nil]; } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIMenuControllerDidShowMenuNotification object:nil]; self.textView = nil; self.searchBar = nil; } - (void)menuDidShow:(NSNotification *)notification { NSLog(@"menu did show!"); } The code is too simple to make mistake, can someone help me to understand what's going on? Or what did I miss?

    Read the article

  • WPF: Setting toolbar button sizes using a Style

    - by Allen Ho
    I have buttons on a toolbar in WPF. When I do the XAML: <ToolBar.Resources> <Style TargetType="{x:Type Button}"> <Setter Property="Width" Value="21"></Setter> <Setter Property="Height" Value="21"></Setter> </Style> </ToolBar.Resources> None of the buttons on the toolbar set their sizes accordingly. I have to go to each button and manually set their widths and heights to the desired values. Any idea why the Style on the toolbar does not work?

    Read the article

  • java simple JPanel management (see screenshot)

    - by Allen
    I have a JPanel that encapsulates two JPanels, one on top of the other. The first holds two JLabels which hold the playing cards. The second holds the player's text (name and score). However, when I remove the player's cards, the lower JPanel moves up to the top, which i would prefer that it not do. Is there a way to keep it in place regardless of whether the top JPanel is occupied or not? Thanks

    Read the article

  • Calling Save on a Configuration obj with a custom sectiongroup of type NameValueSectionHandler

    - by Allen
    I've got aConfiguration object that I can easily read and write settings from and call Save(ConfigurationSaveMode.Minimal, true) on and that typically works just fine. However, I now have a config file that has a custom sectionGroup defined of type System.Configuration.NameValueSectionHandler (I didn't write that part and I can't change it). Now when I call the Save method, it throws a TypeLoadException Message: Type System.Configuration.NameValueSectionHandler does not inherit from System.Configuration.ConfigurationSectionGroup. Callstack: at System.Configuration.TypeUtil.VerifyAssignableType (Type baseType, Type type, Boolean throwOnError) at System.Configuration.TypeUtil.GetConstructorWithReflectionPermission (Type type, Type baseType, Boolean throwOnError) at System.Configuration.MgmtConfigurationRecord.CreateSectionGroupFactory (FactoryRecord factoryRecord) at System.Configuration.MgmtConfigurationRecord.EnsureSectionGroupFactory (FactoryRecord factoryRecord) at System.Configuration.MgmtConfigurationRecord.GetSectionGroup (String configKey) at System.Configuration.ConfigurationSectionGroupCollection.Get (String name) at System.Configuration.ConfigurationSectionGroupCollection. <GetEnumerator>d__0.MoveNext() at System.Configuration.Configuration.ForceGroupsRecursive (ConfigurationSectionGroup group) at System.Configuration.Configuration.SaveAsImpl (String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll) at System.Configuration.Configuration.Save (ConfigurationSaveMode saveMode, Boolean forceSaveAll) at MyCompany.MyProduct.blah.blah.Save () in C:\\projects\\blah\\blah\\blah.cs:line blah For reference, the configuration goes like so <configuration> <configSections> ... normal sections here that work just fine, followed by ... <sectionGroup name="threadSettings" type="System.Configuration.NameValueSectionHandler"> <section name="T1" type="System.Configuration.DictionarySectionHandler"/> <section name="T2" type="System.Configuration.DictionarySectionHandler"/> <section name="T3" type="System.Configuration.DictionarySectionHandler"/> </sectionGroup> </configSections> <applicationSettings /> <threadSettings> <T1> <add key="key-here" value="value-here"/> </T1> ... T2 and T3 here as well, thats not interesting ... </threadSettings> </configuration> If I remove the actual sections and the definition for the custom section groups, I am able to read / write settings just fine and even call Save just fine. Obviously the custom section groups could be setup a little nicer but I can't fix that so I'm wondering: Is it possible to get the Configuration object to save if it has custom sectionGroups of the NameValueSectionHandler type

    Read the article

  • Multiple synonym dictionary matches in PostgreSQL full text searching

    - by Ryan VanMiddlesworth
    I am trying to do full text searching in PostgreSQL 8.3. It worked splendidly, so I added in synonym matching (e.g. 'bob' == 'robert') using a synonym dictionary. That works great too. But I've noticed that it apparently only allows a word to have one synonym. That is, 'al' cannot be 'albert' and 'allen'. Is this correct? Is there any way to have multiple dictionary matches in a PostgreSQL synonym dictionary? For reference, here is my sample dictionary file: bob robert bobby robert al alan al albert al allen And the SQL that creates the full text search config: CREATE TEXT SEARCH DICTIONARY nickname (TEMPLATE = synonym, SYNONYMS = nickname); CREATE TEXT SEARCH CONFIGURATION dxp_name (COPY = simple); ALTER TEXT SEARCH CONFIGURATION dxp_name ALTER MAPPING FOR asciiword WITH nickname, simple; What am I doing wrong? Thanks!

    Read the article

  • VisualStateManager for WPF and Silverlight

    - by Allen Ho
    When you do code like VisualStates.GoToState(this, useTransitions, VisualStates.StateNormal); I believe this code will only work for Silverlight apps. will this affect the way a WPF app works... Trying to incorportae controls that can be shared between both silverlight and WPF apps and was just wondering what were the main pitfalls were...

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >