Search Results

Search found 5349 results on 214 pages for 'override'.

Page 8/214 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How do you override ProgramFilesFolder in an msi?

    - by Mark
    I have an msi file that I am trying to install in a place other than C:\Program Files. The directory table shows that ProgramFilesFolder is used as the default install directory. From reading this blog post I understand that ProgramFilesFolder is a standard directory so passing TARGETDIR as a property to the installer will not change the install location even through the directory table has it as the parent of ProgramFilesFolder. How can I override the install location? I am a total novice in this area.

    Read the article

  • Override single attribute in machine.config

    - by Steffen
    I was wondering if it's possible to override just an attribute of a tag in machine.config ? More exactly I want to set the domain attribute of in machine.config, as it differs from my production server and my development server. I tried just adding the tag to machine.config, but alas it doesn't seem to have an effect. in machine.config I added: <authentication> <forms domain=".foo.com" /> </authenticaion>

    Read the article

  • How to override a related sets "add" method?

    - by MB_
    I am working on a django project and i want to send a signal when something get's added to some models related set, e.g. we have an owner wo has a set of collectables and each time the method owner.collectable_set.add(something) is getting called i want signal like "collectable_added" or something. signals are clear to me, but in which manager(?) the "add" method sits that i want to override is unclear to me.

    Read the article

  • Override generic methods in c#

    - by Pascal
    I thought I can not override generic methods of a derived class. http://my.safaribooksonline.com/book/programming/csharp/9780071741163/generics/ch18lev1sec13 The code in this link runs fine. The overriden method is called although the instance type of the base class is used and not the instance of the derived type. Now I am confused because a former question of mine Type parameter declaration must be identifier not a type is about calling the overriding generic method with the instance of base type which did NOT work!

    Read the article

  • WPF textbox derived control override drag&drop OnPreviewDrop (C sharp)

    - by Petr Klus
    Hi, I have been working on my custom control derived from the TextBox and I have encountered a problem I can not solve right now. Brief description of the problem: my textbox contains plain text which contains tags which I want to keep consistent - so far I have overriden text selection so they can be selected only as a whole tag etc. Right now I have moved to processing of drag&drop. If any text is dropped on the textfield and it is dropped on the tag, I want the insertion to be moved before or after the tag. The actual problem is with setting of the e.Handled=true. If I set it to true, it almost works - the text is inserted via my routine, but it is not removed from the source. If I set it to false, after executing my method the original textbox's insertion method is run. Is there any way to alter event routing? Or am I approaching this wrong from the start? Code of my method: protected override void OnPreviewDragEnter(DragEventArgs e) { base.OnPreviewDragEnter(e); e.Handled = true; // let us draw our very own caret... } protected override void OnPreviewDrop(DragEventArgs e) { base.OnPreviewDrop(e); fieldsReady = false; int selStart = this.SelectionStart; int selLength = this.SelectionLength; string droppedData = (string)e.Data.GetData(DataFormats.StringFormat); // where to insert Point whereDropped = e.GetPosition(this); int droppedIndex = GetCharacterIndexFromPoint(whereDropped, true); if (droppedIndex == this.Text.Length - 1) { double c = GetRectFromCharacterIndex(droppedIndex).X; if (whereDropped.X > c) droppedIndex++; } // only if the source was us, do this: if (this.SelectionLength > 0) // this means that we are dragging from our textbox! { // was there any selection? if so, remove it! this.Text = this.Text.Substring(0, selStart) + this.Text.Substring(selStart + selLength); e.Handled = true; // 2DO!! alter the indices depending on the removed selection // insertion this.Text = this.Text.Substring(0, droppedIndex) + droppedData + this.Text.Substring(droppedIndex); } }

    Read the article

  • Symfony - Override sf_format when calling get_partial.

    - by deadwards
    I'm making an AJAX call in my symfony project, so it has an sf_format of 'js'. In the actionSuccess.js.php view, I call get_partial to update the content on the page. By default it looks for the partial in 'js' format since the sf_format is still set as 'js'. Is it possible to override the sf_format so that it uses the regular 'html' partial that I already have (so that I don't have to have two identical partials)?

    Read the article

  • How to override 'where' in rails 3

    - by Zakwan Alhajjar
    I have upgraded my application from rails 2.3.8 to 3.0.3 . But I'm facing a problem. I was using 'find' but the overriding doesn't work in rails 3: # override activerecord's find to allow us to find by name or id transparently def self.find(*args) if args.is_a?(Array) and args.first.is_a?(String) and (args.first.index(/[a-zA-Z\-_]+/) or args.first.to_i.eql?(0) ) find_by_login_slug(args) else super end end I'm wondering if there is a way to make this work in rails 3 or even by using where instead. thanks

    Read the article

  • Custumizing Syntax Highlighting in Vim

    - by sixtyfootersdude
    Hey I have defined a few custom file types for vim. I have done this like this: In vimrc: au BufWinEnter,BufRead,BufNewFile *.jak set filetype=jak And then in jak.vim syn match arrows /<-/ syn match arrows /->/ syn match arrows /=>/ syn match arrows /<=/ highlight arrows ctermfg=brown ... This works. (Formatting applies to any file opened with vim with file extension .jak) My question is how I can keep all the current formatting for a file type but add functionality. For example I would like to add this functionality for .vim files: syn keyword yellow yellow highlight yellow ctermfg=yellow ... (so that I can see how my terminal interpenetrates different colors before choosing them.) I have created ~/.vim/syntax/vim.vim (file only contains the above) and put this into my vimrc: au BufWinEnter,BufRead,BufNewFile *.vim set filetype=vim This has no effect. The word yellow is not colored yellow. I have also tried putting my vim.vim file into ~/.vim/after/syntax/vim.vim As suggested here This is the approach that I would like to take. Seems clean and easily maintainable.

    Read the article

  • How to strip out a -D for just one file in a gnu makefile?

    - by WilliamKF
    I have '-Wredundant-decls' in my CXXFLAGS but for one file, I want it removed. In my GNU makefile, how can I structure a rule to remove just that part of the CXXFLAGS. I know how to add only for that file, I would do something like this: $O/just_one_file.o: CXXFLAGS += -Wredundant-decls So, ideally I'd do something like this (which doesn't work) to remove it: $O/just_one_file.o: CXXFLAGS -= -Wredundant-decls However, maybe with some $ magic, I can construct some kind of sed or perl script to strip out the -Wredundant-decls and set CXXFLAGS to the stripped value: $O/just_one_file.o: CXXFLAGS = $(shell strip magic here for $CXXFLAGS)

    Read the article

  • Java/BlackBerry build error overriding too many classes

    - by behrk2
    Hey everyone, Has anyone ever heard of overriding too many classes in Java? Perhaps this issue is just related to BlackBerry development, but I was wondering if it is an issue in Java, too. Let's say I have the following: LabelField lblTitle = new LabelField(title) { protected void paint(Graphics graphics) { graphics.setColor(0x00FFFFFF); graphics.clear(); super.paint(graphics); } }; LabelField lblSubTitle = new LabelField(releaseYear + ", " + rating) { protected void paint(Graphics graphics) { graphics.setColor(0x00FFFFFF); graphics.clear(); super.paint(graphics); } }; This code works. However, I've noticed that by overriding the paint() method multiple times in many different classes throughout my project, I receive the error: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified My only solution thus far is to clean up my GUI code...minimize it and reuse it. Perhaps its good that this happened so I can be less careless about creating GUI code all over my classes. Anyways, I was just wondering if anyone has heard of this before. If you are interested in reading more about the issue I have been facing, check out the following link: BlackBerry Java Development Forums

    Read the article

  • Overriding Constructors in F#

    - by kim3er
    How would I write the following C# code in F#? namespace Shared { public class SharedRegistry : PageRegistry { public SharedRegistry(bool useCache = true) : base(useCache) { // Repositories ForRequestedType<IAddressRepository>().TheDefaultIsConcreteType<SqlAddressRepository>(); ForRequestedType<ISharedEnquiryRepository>().TheDefaultIsConcreteType<SharedEnquiryRepository>(); // Services ForRequestedType<IAddressService>().TheDefaultIsConcreteType<AddressService>(); ForRequestedType<ISharedEnquiryService>().TheDefaultIsConcreteType<SharedEnquiryService>(); } } } As is as far as I have managed, but I can't work out to inherit from PageRegistry at the same time as declaring my own default constructor. type SharedRegistry(useCache: bool) = inherit PageRegistry(useCache) new() = new SharedRegistry(true) Rich

    Read the article

  • Overriding classes/functions from a .dll.

    - by Jeff
    Say I have class A and class B. B inherits from class A, and implements a few virtual functions. The only problem is that B is defined in a .dll. Right now, I have a function that returns an instance of class A, but it retrieves that from a static function in the .dll that returns an instance of class B. My plan is to call the created object, and hopefully, have the functions in the .dll executed instead of the functions defined in class A. For some reason, I keep getting restricted memory access errors. Is there something I don't understand that will keep this plan from working?

    Read the article

  • dedicated template for a Drupal module

    - by ernie
    I have a Drupal module, that I want to present in a clean page - with no headers, menus, footer ect. I think all I need is a version of page.tpl.php that contains HTML page headers and <?php print $content ?> How can I point my module to such a page?

    Read the article

  • Java How to call method of grand parents?

    - by Arkaha
    Let's assume I have 3 classes A, B and C, each one extending the previous one. How do I call the code in A.myMethod() from C.myMethod() if B also implements myMethod? class A { public void myMethod() { // some stuff for A } } class B extends A { public void myMethod() { // some stuff for B //and than calling A stuff super.myMethod(); } } class C extends B { public void myMethod() { // some stuff for C // i don't need stuff from b, but i need call stuff from A // something like: super.super.myMethod(); ?? how to call A.myMethod(); ?? } }

    Read the article

  • Over ride default look and feel Java

    - by Aizaz
    I want to over ride java look and feel. I just want to show the buttons differently. I want all the features of Windows Look and Feel but only buttons differently. I hope you get my point. Color color = new Color(220, 220, 220, 200); UIManager.put("OptionPane.background", color); UIManager.put("Panel.background", color); UIManager.put("Button.foreground", new Color(255, 255, 255, 255)); List<Object> gradients = new ArrayList<Object>(5); gradients.add(0.00f); gradients.add(0.00f); gradients.add(new Color(0xC1C1C1)); gradients.add(new Color(0xFFFFFF)); gradients.add(new Color(0x5C5D5C)); UIManager.put("Button.gradient", gradients); UIManager.put("Button.highlight",Color.RED); UIManager.setLookAndFeel(com.sun.java.swing.plaf.windows.WindowsLookAndFeel);

    Read the article

  • Returning superclass of return type from remote EJB method

    - by fish
    Let's say I have remote interface A: @Remote public interface A { public Response doSomething(); } And implementation: @Stateless public class B implements A { public BeeResponse doSomething() {...} } Where: BeeResponse extends Response. Response is located in the EJB-API jar and BeeResponse is in the implementation jar. Response and BeeResponse have different serialVersionUID. My assumption is that the unmarshalling of the response from B will fail, am I correct?

    Read the article

  • Where in the standard is forwarding to a base class required in these situations?

    - by pgast
    Maybe even better is: Why does the standard require forwarding to a base class in these situations? (yeah yeah yeah - Why? - Because.) class B1 { public: virtual void f()=0; }; class B2 { public: virtual void f(){} }; class D : public B1,public B2{ }; class D2 : public B1,public B2{ public: using B2::f; }; class D3 : public B1,public B2{ public: void f(){ B2::f(); } }; D d; D2 d2; D3 d3; EDG gives: sourceFile.cpp sourceFile.cpp(24) : error C2259: 'D' : cannot instantiate abstract class due to following members: 'void B1::f(void)' : is abstract sourceFile.cpp(6) : see declaration of 'B1::f' sourceFile.cpp(25) : error C2259: 'D2' : cannot instantiate abstract class due to following members: 'void B1::f(void)' : is abstract sourceFile.cpp(6) : see declaration of 'B and similarly for the MS compiler. I might buy the first case,D. But in D2 - f is unambiguously defined by the using declaration, why is that not enough for the compiler to be required to fill out the vtable? Where in the standard is this situation defined?

    Read the article

  • Different return value of an overridden class

    - by Samer Afach
    I have a simple but confusing question here. Is it legal to have a different return value type for overridden methods than the abstact ones defined in the base class?? I did that and the compiler didn't complain... could someone please explain? class MyBaseClass { int value; public: virtual int getValue() = 0; }; class MyClass : public MyBaseClass { double value; public: virtual double getValue(); // here!!! return is double, not int }; double MyClass::getValue() { return this->value; } The compiler totally accepted something similar (MSVC und MinGW)... could anyone please exaplain to what extent this is legal?

    Read the article

  • How do you call a method for an Objective-C object's superclass from elsewhere?

    - by executor21
    If you're implementing a subclass, you can, within your implementation, explicitly call the superclass's method, even if you've overridden that method, i.e.: [self overriddenMethod]; //calls the subclass's method [super overriddenMethod]; //calls the superclass's method What if you want to call the superclass's method from somewhere outside the subclass's implementation, i.e.: [[object super] overriddenMethod]; //crashes Is this even possible? And by extension, is it possible to go up more than one level within the implementation, i.e.: [[super super] overriddenMethod]; //will this work?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >