Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 90/604 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • Why won't VS2010 RC use my existing types when I add a service reference?

    - by Johan Driessen
    I have a huge problem getting services references in VS2010 RC to use existing assemblies. Even though I have a class library with all the data contracts (classes marked with DataContract and properties with DataMember) that is shared between the service project and the consuming project (which is a class library), when I add a service reference, the data contracts are regenerated withing the service reference instead of using the existing types. When I was using VS2010 beta 2, this worked fine, and I have existing service references using the very same data contracts. But if I add a new service reference, or even update an old one, it won't use the existing types anymore. I have made a mini-test-solution, with one service, one data contract type and one console app as a consumer (all in the same solution), and there it seems to work, but that's no great comfort to me. Is there any way to see why it can't use the existing types? Edit to clearify. It works to generate the proxy classes with svcutil.exe, and point to the data contracts dll, like this: svcutil.exe http://localhost/MyService.svc /reference:[Path To DataContracts]\DataContracts.dll /n:*,MyProject.MyServiceReference /ct:System.Collections.Generic.List`1 The question is, what possible reason could there be for Visual Studio to generate its own datacontracts instead of using the existing ones even though the "reuse" checkbox is checked and the datacontracts assembly is referenced.

    Read the article

  • What's the "proper" way to retrieve a reference to a ribbon object?

    - by Nick
    For a VSTO workbook project, is there a best practice for retrieving a reference to the Ribbon object from the ThisWorkbook class? Here's what I'm doing: In my Ribbon class, I created a public method called InvalidateControl(string controlID). I need to call that method from the ThisWorkbook class based on when a certain workbook level event fires. But the only way I can see to "get" a reference to that Ribbon object is to do this... // This is all in the ThisWorkbook class Ribbon ribbon; protected override IRibbonExtensibility CreateRibbonExtensibilityObject() { this.ribbon = new Ribbon(); return this.ribbon; } ...which seems a little smelly. I mean, I have to override CreateRibbonExtensibilityObject() regardless; all I'm doing beyond that is maintaining a local reference to the ribbon so I can call methods against it. But it doesn't feel right. Is there another, better way to get that reference in the ThisWorkbook class? Or is this pretty acceptable? Thanks!

    Read the article

  • TFS Build Server not finding 'Microsoft.Expression.Interactions&rsquo;

    - by Chris Skardon
    We’ve been trying to get the build server to pick up the Microsoft.Expression.Interactions.dll needed so we can use things like the ExtendedVisualStateManager and the DataStateBehavior. Adding the DataStateBehavior in Blend adds the reference to the project, so it all compiles fine on the local machine. Checking in the code into a CI server throws up some ugliness: d:\Builds\6\Source\MyFile.xaml (290): The tag 'DataStateBehavior' does not exist in XML namespace 'http://schemas.microsoft.com/expression/2010/interactions'. Errr, it should do…?? The reference is there, so… ahhhhh! A quick check of the properties and we’re using the dll from the c:\program files (x86)\ location, no wonder the build server can’t find it – let’s add the dll into our (ever expanding) ‘lib’ folder, reference that version, and check that bad boy in… No. Still No. Still get the same error. What the??? The reference is still pointing to the program files location?? Ok, so let’s modify the csproj file using the wonderful notepad, changing the reference from <Reference Include="Microsoft.Expression.Interactions, /* loadsa shizzle here */ /> to <Reference Include="Microsoft.Expression.Interactions">     <HintPath>..\Lib\Microsoft.Expression.Interactions.dll</HintPath> </Reference> Check that in, aaaand… Success!!! The reason for this (from what I can gather from here) is that we’re using the Productivity Power Tools, and they try to be clever about referencing dlls, and changed what we’d asked (i.e. for the local version) to use the original program files location.. Editing the file in notepad (sweet sweet notepad) gets around this issue… Irritating, took a while to figure this out… Meh :)

    Read the article

  • Reference custom list form fields from code behind and automatically fill them with values.

    - by Janis Veinbergs
    Hello. I`v made my custom NewForm.aspx for my list and I want to add some custom code to it. So I inherit that form from my own class: public class MyCustomNewForm : Microsoft.SharePoint.WebPartPages.WebPartPage Now I want to reference some of available fields to automatically fill them for user. (Javascript won't help here as I have to get some data from other lists). But I have no idea how do I reference these fields from codebehind files. The code for control field is written (well, it was generated by Sharepoint Designer when using command Insert SharePoint Controls Custom List Form...) in .aspx page like this: <SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="Title" __designer:bind="{ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}"/> When looking at id at runtime, it is insanely long So how do i reference fields, so I could set Text property on them in my codebehind file?

    Read the article

  • Why does HTTP::Message::decodable complain about "Can't use an undefined value as a HASH reference"?

    - by scarba05
    I'm getting a Can't use an undefined value as a HASH reference error trying to call HTTP::Message::decodable() using Perl 5.10 / libwww installed on Debian Lenny OS using the aptitude package manager. I'm really stuck so would appreciate some help please. Here's the error: Can't use an undefined value as a HASH reference at (eval 2) line 1. at test.pl line 4 main::__ANON__('Can\'t use an undefined value as a HASH reference at enter code here`(eval 2)...') called at (eval 2) line 1 HTTP::Message::__ANON__() called at test.pl line 6 Here's the code: use strict; use HTTP::Request::Common; use Carp; $SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; print HTTP::Message::decodable();

    Read the article

  • How to add reference an assembly that is not in the GAC from a t4mvc template (.tt)

    - by stephen
    I have found the place near the very top in a T4MVC template file (.tt) where assembly references can be added, which looks like: <#@ assembly name="System.Core" #> <#@ import namespace="System.Collections.Generic" #> However, it seems that I can only reference assemblies that are in the GAC. i.e. if I have an assembly MyProject.Stuff.dll (not in the GAC) added as a reference to the VS project containing the template then I expected to be able to add something like the following: <#@ assembly name="MyProject.Stuff" #> <#@ import namespace="MyProject.Stuff" #> If I do this then I get the following error: Error 1 Compiling transformation: Metadata file 'MyProject.Stuff' could not be found C:\Work\Development\DotNetSolution\MyProject\Utils\T4MVC\T4MVC.tt 1 1 How can I add a reference to an assembly that isn't in the GAC?

    Read the article

  • How do I get a reference to the current project in an Eclipse plugin?

    - by Martin Doms
    I'm creating an editor for Eclipse. Right now the editor fires up with the user creates a new file with the appropriate extension. My question is, how can I get a reference to the project in which the file resides? For example, say I have a workspace with 2 projects, P1 and P2. I right click P2 and create a new file, can I get a reference to P2 from this somehow? Ultimately I need to reference the AST or Java Model of the project but even a String identifying the project would work.

    Read the article

  • M2Crypto: Is PKey a reference to a Public or a Private key?

    - by Andrea Zilio
    In the PKey class documentation of the M2Crypto python package (an OpenSSL wrapper for Python) it is said that PKey is a reference to a Public key. My opinion is instead that it's a reference to a Private Key because the init method of the PKey class calls the evp_pkey_new openssl function that, from this link: http://linux.die.net/man/3/evp_pkey_new , should allocate a new reference to a private key structure! There are two only possible explaination: The M2Crypto documentation is wrong or the link I've reported has wrong informations. Can someone help me to find the truth?

    Read the article

  • Javascript - cannot make static reference to non-static function ....

    - by Ankur
    I am making a reference to the Javascript function splice() on an array and I get the error: "Cannot make a static reference to the non-static function splice()" What's going on - how is this a static reference, aren't I referencing an instance of an Array class and its method - how is that static? $(document).ready( function() { var queryPreds = new Array(); var queryObjs = new Array(); function remFromQuery(predicate) { for(var i=0; i<arrayName.length;i++ ) { if(queryPreds[i]==predicate) queryPreds.splice(i,1); queryObjs.splice(i,1); } } }

    Read the article

  • Visual Studio adds a circular reference when I drag and drop a user control from the Toolbox

    - by JoelFan
    I have a user control C that is defined inside project P. C is present as a ".NET Framework Component" in my Visual Studio Toolbox. I open a form F (also defined inside project P) and drop C onto F. Once I do that drop, Visual Studio adds a reference under P pointing to P's own DLL. This is unnecessary and causes tons of build errors like The call is ambiguous between the following methods or properties... after which it lists the exact same method twice. If I go into References and delete the added reference, it builds correctly. Can I prevent VS from adding this unnecessary reference?

    Read the article

  • How do you reference a custom object outside of the function it was created in with JavaScript?

    - by Jack Roscoe
    Hi, I'm currently using JavaScript and jQuery. I have an function which executes once the document is ready, and inside that I am creating objects which contain various attributes. Within the same function, I can access these new object's attributes no problem, however once I'm inside a different function I can't seem to reference them properly and therefore cannot access the objects or the information inside them. What's the correct way to reference the attributes of an object which was created in a different function to the one looking for the information?

    Read the article

  • How do I add a reference to an assembly?

    - by Gold
    I am trying to run some PDF to text C# code. I have references to 2 DLLs and I get this error when I try to run the program: the type 'java.io.File' is defined in an assembly that is not referenced. You must add a reference to assembly 'IKVM.GNU.Classpath, Version=0.20.0.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58'. How do I add a reference to this assembly?

    Read the article

  • Delphi: how to efficently read a big binary file, converting it to hexadecimal for passing it as a v

    - by user193655
    I need to convert a binary file (a zip file) into hexadecimal representation, to then send it to sql-server as a varbinary(max) function parameter. A full example (using a very small file!) is: 1) my file contains the following bits 000011110000111 2) I need a procedure to QUICKLY convert it to 0F0F 3) I will call a sql server function passing 0x0F0F as parameter The problem is that I have large files (up to 100MB, even if average file size is 100KB files are possible), so I need the fastest way to do this. Otherwise stated: I need to create the string '0x'+BinaryDataInHexadecimalRepresentation in the most efficient way. Related question: passing hexadecimal data to sql server

    Read the article

  • Can you change/redirect a django form's function by passing in your own function?

    - by Derek
    I'm dealing with django-paypal and want to change the button src images. So I went the the conf.py file in the source and edited the src destination. However, I really want to leave the source alone, and I noticed that the class PayPalPaymentsForm(forms.Form): has def get_image(self): return { (True, self.SUBSCRIBE): SUBSCRIPTION_SANDBOX_IMAGE, (True, self.BUY): SANDBOX_IMAGE, (True, self.DONATE): DONATION_SANDBOX_IMAGE, (False, self.SUBSCRIBE): SUBSCRIPTION_IMAGE, (False, self.BUY): IMAGE, (False, self.DONATE): DONATION_IMAGE, }[TEST, self.button_type] which handles all the image src destinations. Since changing this def in the source is worse than changing conf, I was wondering if there was a way to pass in customized defs you make like passing in initial arguments in forms? This way no source code is changed, and I can customize the get_image def as much as I need. passing in def something like this? def get_image(self): .... .... paypal = { 'amount': 10, 'item_name': 'test1', 'item_number': 'test1_slug', # PayPal wants a unique invoice ID 'invoice': str(uuid.uuid4()), } form = PayPalPaymentsForm(initial=paypal, get_image) Thanks!

    Read the article

  • How do I dynamically reference incremented properties in C#?

    - by Jeff Blankenburg
    I have properties called reel1, reel2, reel3, and reel4. How can I dynamically reference these properties by just passing an integer (1-4) to my method? Specifically, I am looking for how to get an object reference without knowing the name of the object. In Javascript, I would do: temp = eval("reel" + tempInt); and temp would be equal to reel1, the object. Can't seem to figure this simple concept out in C#.

    Read the article

  • Why is a c++ reference considered safer than a pointer?

    - by anand.arumug
    When the c++ compiler generates very similar assembler code for a reference and pointer, why is using references preferred (and considered safer) compared to pointers? I did see Difference between pointer variable and reference variable in C++ which discusses the differences between them. EDIT-1: I was looking at the assembler code generated by g++ for this small program: int main(int argc, char* argv[]) { int a; int &ra = a; int *pa = &a; }

    Read the article

  • jquery - How to reference two div elements for a single function?

    - by Ben
    I Have a function that references a specific input text box. I would like to extend the function to be used by two specific input text boxes. Rather than duplicate the code for the other text box, can anyone advise on how to reference the other? Here it uses #Tags, but if i wanted it to reference #Tags2 also, how could I do that? $(function () { $('#Tags').tagSuggest({ separator: ", ", tagContainer: 'div', tags: ["tag1","tag2"] }); });

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >