Re: UITypeEditor must be in the same assembly?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Ben R. Bolton (nqmsdnfb_at_microsoft.com)
Date: 04/08/04

  • Next message: Floyd Burger: "Copying late-binded assemblies"
    Date: Thu, 8 Apr 2004 09:30:43 -0700
    
    

    Thanks Palo,

    1) I've had problems with using typeof to get a type at compile time that
    doesn't work at design time before. Can you explain why using

    [Editor("ClientLib.CustomEditor", typeof(UITypeEditor))]

    works, while

    Editor(typeof(CustomEditor),typeof(UITypeEditor))

    compiles but has problems at run-time?

    2) I don't quite understand the suggestion for a reference. CustomEditor is
    defined in ClientLib and the control is in WebControlLib, therefore there
    must be a reference to ClientLib in the WebControlLib project, creating
    reference to WebControlLib from ClientLib would create an invalid reference.
    Do you mean something different by an *assembly* reference?

    Again, thanks for your assistance.

    Ben

    "Palo Mraz" <palo@x-vbinfozine.com> wrote in message
    news:efp70K8GEHA.1076@TK2MSFTNGP10.phx.gbl...
    > Hi Ben,
    >
    > I've made it work with WinForms designer, but hopefully it will
    > work with WebForms designer as well. Here are the steps I've used:
    >
    > 1. In your WebControlLib library, use the EditorAttribute constructor
    > that accepts the string type name of the type editor, e.g.:
    > [Editor("ClientLib.CustomEditor", typeof(UITypeEditor))]
    >
    > 2. In your ClientLib design library, add an *assembly* reference to
    > your WebControlLib from the appropriate output directory.
    >
    > 3. In order to debug the design time functionality of your editor,
    > you'll have to ensure that VS is able to locate your design assembly.
    > You'll have to either place the ClientLib.dll into the devenv.exe folder.
    > Or you could add the appropriate <dependentAssembly> and
    > <codeBase> settings pointing to your ClientLib assembly to the
    > devenv.exe.config file (this is the approach that I've used with my
    > WinForms design library). (Or you could place the design assembly
    > into GAC (provided it has a strong name), but I wouldn't recommend
    > that.)
    >
    > Best regards,
    >
    > Palo
    > --
    > http://dact.lamarvin.com/
    > AutoComplete component for WinForms applications. Easy to integrate,
    easier
    > to use!
    > http://www.vbinfozine.com/
    > An ordinary VB developer shares his own successes and failures
    >
    >


  • Next message: Floyd Burger: "Copying late-binded assemblies"

    Relevant Pages

    • Sonar Design
      ... This is about the allocation of program resources, and distributed design ... This section is from chapter 2 of the reference book in Advanced ... PowerBuilder 4 Techniques, pp. 6 which describes high-level concepts used to ... when designing an architecture for a application. ...
      (comp.lang.misc)
    • Re: Class Hierarchy design problems...
      ... incorrect design, although I am not entirely sure it is as clean cut as ... exist on that type (which causes the problem of being able to reference the ... ItemEditor via the Items indexer. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: create design time library using vs.net
      ... design version and others are used for the run time version. ... > - copy the runtime library project file to a new design time project file ... You must add a reference to assembly 'System.Windows.Forms'. ... > The dependency 'Accessibility' could not be found. ...
      (microsoft.public.dotnet.framework.compactframework)
    • Re: Call by reference in Java?
      ... > call by reference. ... > public void checkParameter(String strPreisProLiter, ... indicator that there is a flaw in your design. ... abstraction to fit the problem at hand. ...
      (comp.lang.java.help)
    • Re: Textbook text candidate
      ... Archaeologists do it all the time - by reference to known human ... You argue that it is possible to identify design in the abstract without ... But the only investigative programmme references HCMM. ... SETI assumes human-like techniques. ...
      (talk.origins)