Search Results

Search found 28345 results on 1134 pages for 'custom event'.

Page 173/1134 | < Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >

  • Google Maps v3, custom control with textbox: can't perform input

    - by Mike Sviridoff
    Hi, I am trying to add a custom control to my google map (v3): want to have search box just near the other map controls. So I add a div with <input type="textbox"> on it, and it's being shown on the map. But the porblem is that the textbox is inaccessible: i can't type anything inside it, or even focus on it. function SearchBox() { var searchTextBox = $('<input type="text" id="txtGeoSearch" />'); var div = $('<div class="geoSearchBox"></div>') .append($('<span>Search:</span>')) .append(searchTextBox); return div.get(0); } // inside init() geoMap.controls[google.maps.ControlPosition.TOP_LEFT].push(new SearchBox()); So what should I do to make my textbox behave like normal one?

    Read the article

  • WCF CreateMessage from custom body xml

    - by Cecil
    I have the following code: string body = "<custom xml>"; XDocument doc = XDocument.Parse(body); MemoryStream stream = new MemoryStream(); XmlWriter writer = XmlWriter.Create(stream); if (writer != null) { doc.Save(writer); writer.Flush(); writer.Close(); } stream.Position = 0; XmlReader rd = XmlReader.Create(stream); Message output = Message.CreateMessage(msg.Version, msg.Headers.Action, rd); output.Headers.CopyHeadersFrom(msg); output.Properties.CopyProperties(msg.Properties); When I try to use the message I get the following error: hexadecimal value 0x02, is an invalid character. Line 1, position 2. Any idea why? And what I can do to fix this?

    Read the article

  • Catches communication exception instead of custom fault exception - WCF

    - by Ismail S
    On Server I'm throwing the exception like this. catch(SqlException exception) { if (exception.Message.Contains("Custom error from stored proc")) { //Exception to be thrown when authentication fails. throw new FaultException<MyServiceFault>(new MyServiceFault { MessageText = exception.Message }); } } And on client end I'm catching the exception catch(FaultException<MyServiceFault> faultException) { } Here is my MyServiceFault [DataContract] public class MyServiceFault { [DataMember] public string MessageText { get; set; } [DataMember] public Guid Id { get; set; } } The problem is that on client, it doesn't go to MyServiceFault catch block instead it goes to communication exception catch block and throws this error System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly. ---> System.Net.WebException I've also decorated my service method [FaultContract(typeof(MyServiceFault))] in the interface which is implemented by my service. In my web.config servicebehaviour tag consist <serviceDebug includeExceptionDetailInFaults="true" /> Any idea where I'm going wrong

    Read the article

  • Custom UISlider Image disappearing?

    - by Silent
    Hello all i have a custom image to replace the UISLider defult button image, all works fine image shows, it does not clip off. The problem is when i use the slider to move up and down the image dissapears and some how doesnt show up anymore only sometimes. could someone have a fix? CGRect rect = CGRectMake(16.0, 390.0, 297.0, 35.0); slider.frame = rect; UIImage* thumbImage = [UIImage imageNamed:@"thumb.png"]; [slider setThumbImage:thumbImage forState:UIControlStateNormal]; UIImage* leftImage = [UIImage imageNamed:@"SliderLeft.png"]; [slider setMinimumTrackImage:leftImage forState:UIControlStateNormal]; UIImage* rightImage = [UIImage imageNamed:@"SliderRight.png"]; [slider setMaximumTrackImage:rightImage forState:UIControlStateNormal];

    Read the article

  • Headers to set for AJAX calls in a custom webserver

    - by ErJab
    I'm writing a custom web server. When I enter the URL of my server in the browser, I get the sample text I write out to the socket in my browser correctly. This is the HTTP response that I write: HTTP/1.1 200 OK\r\n Server: My Server\r\n Date: Blah\r\n \r\n This is some sample text. This appears in my browser correctly when I connect directly to the server entering the URL. However, if I use Ajax (jQuery) to access the same URL and then set the innerHTML of an element on the HTML page, I do not get any data printed. Is there any other header I need to set on my web server so that the browser's XMLHttpRequest object detects the response?

    Read the article

  • Django-Registration & Django-Profile, using your own custom form

    - by Issy
    Hey All, I am making use of django-registration and django-profile to handle registration and profiles. I would like to create a profile for the user at the time of registration. I have created a custom registration form, and added that to the urls.py using the tutorial on: http://dewful.com/?p=70 The basic idea in the tutorial is to override the default registration form to create the profile at the same time. forms.py - In my profiles app from django import forms from registration.forms import RegistrationForm from django.utils.translation import ugettext_lazy as _ from profiles.models import UserProfile from registration.models import RegistrationProfile attrs_dict = { 'class': 'required' } class UserRegistrationForm(RegistrationForm): city = forms.CharField(widget=forms.TextInput(attrs=attrs_dict)) def save(self, profile_callback=None): new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], password=self.cleaned_data['password1'], email=self.cleaned_data['email']) new_profile = UserProfile(user=new_user, city=self.cleaned_data['city']) new_profile.save() return new_user In urls.py from profiles.forms import UserRegistrationForm and url(r'^register/$', register, {'backend': 'registration.backends.default.DefaultBackend', 'form_class' : UserRegistrationForm}, name='registration_register'), The form is displayed, and i can enter in City, however it does not save or create the entry in the DB.

    Read the article

  • Enums for Build Flavor and Build Platform in Custom TFS 2010 Build Activities

    - by Ben Hughes
    Are there enums available in the .NET framework that have values for build flavor (Debug, Release) and build platform (Any CPU, x86, x64 etc)? I haven't been able to find anything on MSDN or Google. It seems unnecessarily cumbersome to create my own. For context: I'm creating a custom TFS2010 workflow activity that requires flavor and platform info. Currently these are entered in the build definition as free-from strings. The default TFS build template has a dialog box (accessible in the build definition editor under Process\1.Required\Items to Build\Configurations to Build) that provides drop-down menus with this info pre-populated. I'd like to do something similar.

    Read the article

  • Custom Model binder not firing

    - by mare
    This is my custom model binder. I have my breakpoint set at BindModel but does not get fired with this controller action: public ActionResult Create(TabGroup tabGroup) ... public class BaseContentObjectCommonPropertiesBinder : DefaultModelBinder { public new object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { if (controllerContext == null) { throw new ArgumentNullException("controllerContext"); } if (bindingContext == null) { throw new ArgumentNullException("bindingContext"); } BaseContentObject obj = (BaseContentObject)base.BindModel(controllerContext, bindingContext); obj.Modified = DateTime.Now; obj.Created = DateTime.Now; obj.ModifiedBy = obj.CreatedBy = controllerContext.HttpContext.User.Identity.Name; return obj; } My registration: // tried both of these two lines ModelBinders.Binders[typeof(TabGroup)] = new BaseContentObjectCommonPropertiesBinder(); ModelBinders.Binders.Add(typeof(TabGroup), new BaseContentObjectCommonPropertiesBinder());

    Read the article

  • VS2010 Custom Code Analysis Rule

    - by devlife
    I'm trying to write a custom fxcop rule for mstest projects VS2010. I'd like to debug it but keep getting an exception when it tries to load the dll for the mstest project it fails stating that it can't find referenced assembly: Microsoft.FxCop.Common.AssemblyLoadException Could not load C:\Users\Administrator\Documents\Visual Studio 2010\Projects\20100106-CodeAnalysisRulesBlogDemo\BlogDemo\TestProject1\bin\Debug\TestProject1.dll. Microsoft.FxCop.Sdk.InvalidMetadataException The following error was encountered while reading module 'TestProject1': Assembly reference cannot be resolved: Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Does anyone have any idea how to resolve this? If I just run the code analysis it works fine but as soon as I try to debug it fails. Thanks

    Read the article

  • OData and custom WCF WebGet methods

    - by reinier
    I've created an OData endpoint (using entity framework, WCF data service) and added a custom test WebGet test method like so: [WebGet(UriTemplate = "{text}")] public IQueryable<string> SplitString(string text) { if (text == null) throw new DataServiceException("text not specified"); var result = (from s in text.Split('-') orderby s select s); return result.AsQueryable(); } and a config line: config.SetServiceOperationAccessRule("SplitString", ServiceOperationRights.All); However, no matter how I specify the url, I can not get the text param to be filled out. (it is always null). so: http://localhost/myservice.svc/SplitString/testtext does not work. What is the correct url format (or UriTemplate) one should use? The only examples I found of odata and WebGet only have an example method which doesn't have any parameters.

    Read the article

  • How to popViewController from button click of custom UITableViewCell

    - by Chi Rod
    I have a button in a custom UITableViewCell. Its UITableView is controlled by a UIViewController. I would like to return to the RootView when that button is clicked. I am trying to use [self.superview.navigationController popViewControllerAnimated:YES]; in the target Action of the button, which is in the UITableViewCell.m file. However, it doesn't recognize "navigationController" because it is not in the stack. How can I return to the RootView when that button is clicked?

    Read the article

  • ASP.NET MVC Class level custom data-annotation and ModelState keys

    - by Neil
    Hi, I have custom class level validation attribute, inheriting from ValidationAttribute, on my model. How come it doesn't register a key in the ModelState when its IsValid is false? I can see the the error message in the ModelState.Values collection, but the ModelState.Keys collection only shows an empty string "". Can I provide a key for it - presumably this is because its not assigned to a property? I wanna be able to use ModelState.Remove in my controller to remove this error upon a certain condition, but I have no Key! Any ideas?

    Read the article

  • Can I create a custom plist structure definition?

    - by Ed Marty
    When editing plist files in XCode, it can detect the type of plist and show human-readable strings to make it more easy to edit the file. The Info.plist, for example. Thanks to This question, I found the (or a) place where it stores that structure definition, as InfoPlistStructDefs.xcodeplugin. If I put my own file in there, however, nothing interesting happens. That is, it doesn't show up in the list of possible property list types. So does anybody know how to make XCode or the external property list editor application recognize a custom plist structure definition?

    Read the article

  • How to modify IIS handler mapping permissions via Wix or a Custom Action

    - by Finch
    Hi, I'm using Wix to create an installer for a Silverlight application. When I install the application the virtual directory that has been created has the execute permission checked for the *.dll handler mapping (IIS 7 Web site VDir Handler Mappings *.dll Edit Feature Permissions Execute). When I browse to the application it cannot download its satellite assemblies in ClientBin. If I uncheck the execute permission in IIS the handler becomes disabled and the application now works. I don't want to have to do this manually. Does anybody know how to modify the handler mapping permissions in Wix or a Custom Action? Thanks

    Read the article

  • Google maps API : custom infowindow : V2 : Input element not clickable : G_MAP_FLOAT_PANE

    - by PlanetUnknown
    I'm trying to make a custom infowindow. Version = 2. I have added my DIV to the map as follows - $("#infoWindowClass").appendTo(map.getPane(G_MAP_MARKER_MOUSE_TARGET_PANE)); The infoWindowClass is - #infoWindowClass { position:absolute; padding:10px; height: 155px; width: 225px; background-color: #E7F8CD; color: #3F3F3F; border:0.5px solid #8D8D8D; font-size:80%; } Per documentation, this is above all other DIV layers. This DIV has two input fields, however I can't click on any of them. I manually added the z-index to 990 for this DIV but the input fields are still not clickable. Any pointers ?

    Read the article

  • Custom MediaStreamSource and MediaElement.Naturalduration property

    - by Tilo Skomudek
    i have written a custom mediastreamsource, that can play media from growing source files (mpeg transport streams). Once it reaches the end of its mediastream, it reads the new duration from the mediafile and continues to deliver samples. The MediaElement plays continously. Unfortunately i haven´t found a way to update the MediaElement.NaturalDuration property. Hence i cannot seek into the “reloaded” area, because ME doesn´t know about it and sets my position change to its NaturalDuration value. I tried to call ReportOpenMediaCompleted after getting the new stream length. Then Naturalduration get´s updated, but i cannot play anymore. Is there any other way to deal with it ?

    Read the article

  • How do I implement IDataServiceMetadataProvider and tell my Data Service to use that custom provider

    - by Pwninstein
    There's no obvious entry point for implementing a custom provider for an ADO.NET Data Service using IDataServiceMetadataProvider, and then telling a Data Service to use that provider. Has anyone had any luck in this area? I've tried implementing this interface on my Data Source class, but none of my breakpoints are hit. There is also no (obvious) way to set the provider from the Data Service's DataServiceConfiguration parameter passed in to the InitializeService function. Any help would be appreciated. Thanks! Data Services Providers (ADO.NET Data Services) IDataServiceMetadataProvider Members

    Read the article

  • reporting services: use a custom assembly with a local (RDLC) report

    - by JMarsch
    Hello: I am designing a report that will be used in local mode (an RDLC file) in a Winform app. I have a custom assembly with a static class that has some functions that I want to use inside of the report (as expressions). I have found all sorts of help for doing this with RDL reports, but I'm running into a permissions problem with my RDLC report. I get the following error at runtime: "The report references the code module (my module), which is not a trusted assembly". I know that this is some kind of a code security issue, but I'm not sure what to do to fix it. The documentation that I have seen online is aimed at RDL reports, and it instructs me to edit a SQL Server-specific policy file. I'm using RDLC, so there is no sql server involved. What do I need to do to acquire the appropriate permissions?

    Read the article

  • Use of Distinct with list of Custom Object

    - by Burnzy
    How can I make the Distinct() method work with a list of custom object(Href in this case), here is what the current object looks like: public class Href : IComparable, IComparer<Href> { public Uri URL { get; set; } public UrlType URLType { get; set; } public Href(Uri url, UrlType urltype) { URL = url; URLType = urltype; } #region IComparable Members public int CompareTo( object obj ) { if(obj is Href) { return URL.ToString().CompareTo( ( obj as Href ).URL.ToString() ); } else throw new ArgumentException("Wrong data type."); } #endregion #region IComparer<Href> Members int IComparer<Href>.Compare( Href x , Href y ) { return string.Compare( x.URL.ToString() , y.URL.ToString() ); } #endregion }

    Read the article

  • How to add custom SOAP header in Spring WS using Axiom and XmlBeans

    - by java_pill
    I'm using Spring WS 1.5.8, XmlBeans for marshalling/unmarshalling and AxiomSoapMessageFactory. My app. needs a custom SOAP header. The data that needs to be in the SOAP Header is a XmlBean (i.e sessionContext in the code below). How can I construct the SOAP Header with this XmlBeans XmlObject element in it? I've mentioned the code of my WebServiceMessageCallback that I'm using and executing this code results in "'Content is not allowed in prolog.' error. Thanks, public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException { SoapMessage soapMessage = (SoapMessage) message; SoapHeader header = soapMessage.getSoapHeader(); StringSource headerSource = new StringSource(XmlBeanUtils.getValue(sessionContext) ); transform(headerSource, header.getResult()); }

    Read the article

  • how to code referral system in wordpress ?

    - by justjoe
    I'm just asking about custom feature I'm working on. If you have experience creating similar projects, what are things that need to be considered when creating similar features? PS: this is broad general question. And not something that focuses on a particular web system. And mostly will be code in PHP and wordpress. And frankly, I tend to code this not using Wordpress built-in functions.

    Read the article

  • keeping references to inflated custom views

    - by darren
    Hi While researching how to create custom compound views in Android, I have come across this pattern a lot (example comes from the Jteam blog) : public class FirstTab extends LinearLayout { private ImageView imageView; private TextView textView; private TextView anotherTextView; public FirstTab(Context context, AttributeSet attributeSet) { super(context, attributeSet); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.firstTab, this); } } I mostly understand how this is working, except for the part where inflate() is called. The documentation says that this method returns a View object, but in this example the author does not store the result anywhere. After inflation, how is the new View created fromt eh XML associated with this class? I thought about assigning it to "this", but that seems very wrong. thanks for any clarification.

    Read the article

  • Control JSON Serialization format of a custom type in .NET

    - by mrjoltcola
    I have a PhoneNumber class that stores a normalized string, and I've defined implicit operators for string <- Phone to simplify treatment of the PhoneNumber as a string. I've also overridden the ToString() method to always return the cleaned version of the number (no hyphens or parentheses or spaces). In any MVC.NET code where I explicitly display the number, I can explicitly call phone.Format(). The problem here is serializing an entity that has a PhoneNumber to JSON; JavaScriptSerializer serializes it as [object Object]. I want to serialize it as a string in (555)555-5555 format. I've looked at writing a custom JavaScriptConverter, but JavaScriptConverter.Serialize() method returns a dictionary of name-value pairs. I don't want PhoneNumber to be treated as an object with fields, I want to simply serialize it as a string.

    Read the article

  • Json.NET - How to serialize a class using custom resolver

    - by Mendy
    I want to serialize this class: public class CarDisplay { public string Name { get; set; } public string Brand { get; set; } public string Year { get; set; } public PictureDisplay[] Pictures { get; set; } } public class PictureDisplay { public int Id { get; set; } public string SecretKey { get; set; } public string AltText { get; set; } } To this Json test: { Name: "Name value", Brand: "Brand value", Year: "Year value", Pictures: ["url1", "url2", "url3"] } Note that each Car have an pictures array with only url string, instead of all the properties that Picture class have. I know that Json.NET have the notion of Custom Resolver, but I don't sure exactly how to use it.

    Read the article

< Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >