Quantcast
Channel: patterns & practices - Smart Client Guidance
Viewing all 27 articles
Browse latest View live

Commented Issue: Add View (With Presenter) issue [30411]

$
0
0
<p>The Add View(With Presenter ) used to work for me(till last week). Now when I open the Add View window the Solution Preview is empty and the 'Next' and 'Finish' buttons are disabled. When I try to enter the view name the window closes without throwing any exception. There is no event in the event log.</p>
<p> We are completely stuck.</p>
<p>&#160;</p>
<p>Also If I try to create a new project, the preview and buttons are disabled. And If I try to enter a name for the namespace the window closes without any alert or exception.</p>
<p>&#160;</p>
<p>My Env : Windows 7 ultimate , Visual Studio 2010 Ultimate, SCSF 2010</p>
Comments: ** Comment from web user: Benzie **

I am having this very same problem with VS2010 SP1. I see the last post for this problem was well over a year ago; is there any available guidance for this issue? Thank you.


Commented Issue: Add View (With Presenter) issue [30411]

$
0
0
<p>The Add View(With Presenter ) used to work for me(till last week). Now when I open the Add View window the Solution Preview is empty and the 'Next' and 'Finish' buttons are disabled. When I try to enter the view name the window closes without throwing any exception. There is no event in the event log.</p>
<p> We are completely stuck.</p>
<p>&#160;</p>
<p>Also If I try to create a new project, the preview and buttons are disabled. And If I try to enter a name for the namespace the window closes without any alert or exception.</p>
<p>&#160;</p>
<p>My Env : Windows 7 ultimate , Visual Studio 2010 Ultimate, SCSF 2010</p>
Comments: ** Comment from web user: Benzie **

I've been advised of a workaround (which I have confirmed) by some of my colleagues:

1. Close your current solution
2. Uninstall SCSF 2010, restart VS2010
3. Uninstall Guidance Automation Extensions (GAX 2010)
4. Close VS2010
5. Reboot
6. Install GAX 2012
7. Install SCSF2010
8. Enjoy

Please follow the steps <i>precisely</i>, as failure to uninstall GAX2010 will likely result in disappointment.

New Post: ServiceDependency Order qustion

$
0
0

Hi all,

 

I have used always ServiceDependency Attribute in presenters of view in order to get a pointer to the service. it works nice if when the view is created we already have the Service in the workItem.

But, what if I want to instantiate the screen before the service is created, yhen I want to give the screen the pointer to the service when the service will be created later.

I sought that when the service will be added to the WorkItem it will Execute the set of my ServiceDependency property, but this does not happen. Isn't this what Dependency Injection means?

How can I achieve this behavior? should I register in the presenters to the Added event of the services collection of my WI?

Thanks,

Efy

 

New Post: ServiceDependency Order qustion

$
0
0

Hi,

Based on my understanding when using dependency injection in SCSF, theObjectBuilder will instantiate the required services when the dependent object is created. Hence, this won't be possible if your services have not been already registered. For this cases, I believe you will have to programmatically obtain a reference to the service once you ensure it has been added to the Work Item services collection. In my opinion, as you mentioned subscribing theServices.Added event of your Work Item to define this logic seems like a possible approach. For example in the handler of this event you could check if the content of theData property passed in the EventArgs matches the required Interface, and then retrieve the required service.

Also, if you are interested in more information regarding dependency injection inSCSF, I believe you could find the following resources interesting:

Regards,

Agustin Adami
http://blogs.southworks.net/aadami

New Post: LoadingPanel

$
0
0

Hi,

 

I'm currently working on a project using many different views, that derive from CabXtraUserControl. As some of the calculations need more than a few seconds, I need to implement a DXperience Loading Panel that shoult pop up everytime, the active view is switched. I would like to know, if anyone knows a possibility to implement it using the CabXtraUserControl Base class to provide this instead of creating a new event listener for every view that is implemented yet or will be implemented in the future.

 

Best regards

New Post: Cannot update disconnected service agent

$
0
0

Hi,

I have created a disconnected service agent ,but after I update my webservice and build the solution,the wizard of recipe can not show "Type" and "Solutin Preview" when I update disconnected service agent ,and show“in order to run this recipe,you solution must compile, please build your solution and try again”,but I have built.

Any idea on how to fix this?

New Post: Cannot update disconnected service agent

$
0
0

Hi,

Based on my understanding, after changing a WebService, you will need to update yourDisconnected Service Agent too, like explained in the following section of the documentation:

I this does not help, I believe you could also try to clean your solution manually in order to ensure that your application is being re-builded again from scratch. In order to do so, you could delete thebin and obj folders of all the projects in your solution and after that rebuild the solution again.

I hope this helps,

Damian Cherubini
http://blogs.southworks.net/dcherubini

    New Post: Cannot update disconnected service agent

    $
    0
    0

    Thanks DCherubini,
    I have  deleted the bin and obj folders of all the projects in my solution and after that rebuild the solution again.but it is the same question.I'm using vs2010 and scsf for vs2010, the webservice create by java use Axis2,and return entity from webservice sometimes, i don't know whether that is a question.I wan to know whether scsf recipe supply debug


    New Post: Cannot update disconnected service agent

    $
    0
    0

    Hi,

    Based on my understanding you should be able to debug the SCSF Guidance Package functionalities by opening the SmartClientFactory Guidance Package solution included in theSCSF source (Guidance Packages folder). And by following the steps mentioned in theHowToDebugGP.txt file, as this will let you run an experimental instance ofVisual Studio:

    1) Right Click On SmartClientFactoryPackage -> Properties

    2) Set "Start External Programe:" to

        C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe  (for 64bit VS)
        C:\Program Files      \Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe  (for 32bit VS)

    3) Set "command command line argument:" to
        /rootSuffix Exp

    4) On Windows Start Menu:
       Start -> All Programs -> Microsoft Visual Studio 2010 SDK -> Tools -> Reset the Microsoft Visual Studio 2010 Experimental Instance

    5) Press Ctrl + F5

    I hope you find this handy,

    Agustin Adami
    http://blogs.southworks.net/aadami

    New Post: Visual Studio 2012

    New Post: Smart Client Software Factory active or not

    New Post: how to create a VTK.Net View?

    $
    0
    0
    Hello,

    First of all, I would like to state that I am a newbie using CAB and Smart Client Software Factory.

    I am trying to embeded VTK.Net into a view. But I dont know why. I get an ModuleLoadException.

    I dont know what I am doing wrong.

    Could anyone help me?

    thanks in advance.

    The Error Exception that I get
    
    Microsoft.Practices.CompositeUI.Services.ModuleLoadException was unhandled
      Message="Failed to load module from assembly 7f405271-9377-4d9c-9ed7-141f6b216a13. Error was:\r\nFailed to load module from assembly Module2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Error was:\r\nException has been thrown by the target of an invocation."
      Source="Infrastructure.Library"
      StackTrace:
           at SCFSTest.Infrastructure.Library.Services.DependentModuleLoaderService.ModuleMetadata.ThrowModuleLoadException(Exception innerException) in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Infrastructure.Library\Services\DependentModuleLoaderService.cs:line 434
           at SCFSTest.Infrastructure.Library.Services.DependentModuleLoaderService.ModuleMetadata.InitializeModuleClasses(WorkItem workItem) in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Infrastructure.Library\Services\DependentModuleLoaderService.cs:line 396
           at SCFSTest.Infrastructure.Library.Services.DependentModuleLoaderService.InnerLoad(WorkItem workItem, IModuleInfo[] modules) in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Infrastructure.Library\Services\DependentModuleLoaderService.cs:line 124
           at SCFSTest.Infrastructure.Library.Services.DependentModuleLoaderService.Load(WorkItem workItem, IModuleInfo[] modules) in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Infrastructure.Library\Services\DependentModuleLoaderService.cs:line 79
           at Microsoft.Practices.CompositeUI.CabApplication`1.LoadModules()
           at Microsoft.Practices.CompositeUI.CabApplication`1.Run()
           at SCFSTest.Infrastructure.Shell.ShellApplication.RunInDebugMode() in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Shell\ShellApplication.cs:line 56
           at SCFSTest.Infrastructure.Shell.ShellApplication.Main() in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Shell\ShellApplication.cs:line 47
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: System.Reflection.TargetInvocationException
           Message="Exception has been thrown by the target of an invocation."
           Source="mscorlib"
           StackTrace:
                at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
                at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
                at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
                at Microsoft.Practices.ObjectBuilder.CreationStrategy.InitializeObject(IBuilderContext context, Object existing, String id, ICreationPolicy policy)
                at Microsoft.Practices.ObjectBuilder.CreationStrategy.BuildUpNewObject(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.CreationStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.ReflectionStrategy`1.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.ReflectionStrategy`1.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.ReflectionStrategy`1.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.SingletonStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)
                at Microsoft.Practices.ObjectBuilder.TypeMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)
                at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)
                at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)
                at Microsoft.Practices.CompositeUI.Collections.ManagedObjectCollection`1.BuildFirstTimeItem(Type typeToBuild, String idToBuild, Object item)
                at Microsoft.Practices.CompositeUI.Collections.ManagedObjectCollection`1.Build(Type typeToBuild, String idToBuild, Object item)
                at Microsoft.Practices.CompositeUI.Collections.ManagedObjectCollection`1.AddNew(Type typeToBuild, String id)
                at Microsoft.Practices.CompositeUI.Collections.ManagedObjectCollection`1.AddNew[TTypeToBuild]()
                at SCFSTest.Module2.ModuleController.AddViews() in D:\Projects\Visual Studio 2008\SCFSTest\Module2\Module2\ModuleController.cs:line 65
                at SCFSTest.Module2.ModuleController.Run() in D:\Projects\Visual Studio 2008\SCFSTest\Module2\Module2\ModuleController.cs:line 31
                at SCFSTest.Module2.Module.Load() in D:\Projects\Visual Studio 2008\SCFSTest\Module2\Module2\Module.cs:line 36
                at SCFSTest.Infrastructure.Library.Services.DependentModuleLoaderService.ModuleMetadata.InitializeModuleClasses(WorkItem workItem) in D:\Projects\Visual Studio 2008\SCFSTest\Source\Infrastructure\Infrastructure.Library\Services\DependentModuleLoaderService.cs:line 389
           InnerException: System.BadImageFormatException
                Message="Could not load file or assembly 'Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44' or one of its dependencies. An attempt was made to load a program with an incorrect format."
                Source="Module2"
                FileName="Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44"
                FusionLog="=== Pre-bind state information ===\r\nLOG: User = aisha\\ting\r\nLOG: DisplayName = Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44\n (Fully-specified)\r\nLOG: Appbase = file:///D:/Projects/Visual Studio 2008/SCFSTest/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : Module2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: Using application configuration file: D:\\Projects\\Visual Studio 2008\\SCFSTest\\bin\\Debug\\Shell.vshost.exe.Config\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Post-policy reference: Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44\r\nLOG: Attempting download of new URL file:///D:/Projects/Visual Studio 2008/SCFSTest/bin/Debug/Kitware.VTK.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"
                StackTrace:
                     at SCFSTest.Module2.View1.InitializeComponent()
                     at SCFSTest.Module2.View1..ctor() in D:\Projects\Visual Studio 2008\SCFSTest\Module2\Module2\Views\View1.cs:line 30
                InnerException: 
    

    New Post: how to create a VTK.Net View?

    $
    0
    0
    Hi,

    Looking at the exception, it seems that the key behind the problem is the following one:
     InnerException: System.BadImageFormatException
            Message="Could not load file or assembly 'Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44' or one of its dependencies.  
            An attempt was made to load a program with an incorrect format ."
            Source="Module2"
            FileName="Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44"
    
    Based on my understanding, the " An attempt was made to load a program with an incorrect format" message appears when trying to load a corrupted dll or an unmanaged non-COM 32-bits dll inside a .NET application built for 64-bits architectures. As a starting point, please check that your build configurations a targeted to x86.

    Also, I am not familiar with the Visualization Tooltik (VTK) but I believe the following library could be useful to develop .NET applications with it (in case you are not using it already):
    Regards,

    Damian Cherubini
    http://blogs.southworks.net/dcherubini

    New Post: how to create a VTK.Net View?

    $
    0
    0
    Hi Damian,

    It was as you said. I set my project to target a x84 platform and It works perfect.

    Thank you very much

    New Post: How can I know the ID of a workItem

    $
    0
    0
    Hi,

    I want to know all the IDs of the WorkitemsCollection in the rootworkitem.

    In the debugger I can see the IDs but the value is not the one I declare.

    Ex: To retrieve the module I use this Line:
    WorkItem item = WorkItem.Parent.WorkItems["LookUpsAdmon"];
    but if I put a breakpoint and see the values of "Item" in the ID propertie i see:
    "72366020-95a1-452d-acc7-bab401ec6ba6"

    Is in the Workitem an element that show "LookUpsAdmon"? I wanna make a DB with all my WorkItems ID.

    thx.

    New Post: How can I know the ID of a workItem

    $
    0
    0
    Hi,

    It seems that the WorkItem's ID and the key used to obtain a WorkItem from the collection are not related to each other.
    Based on my understanding, what you are seeing in the default ID of the WorkItem (which is a Guid.)
    If you want to, I believe you can set a custom ID to the WorkItem by simply setting it in its ID property. Like this you could have the same string as the ID and as the collection key.

    I hope this helps,

    Damian Cherubini
    http://blogs.southworks.net/dcherubini

    New Post: How can I know the ID of a workItem

    $
    0
    0
    Hi DCherubini,

    Thank you for fast reply and info

    Well, do you know how can I find the list of Keys?

    New Post: How can I know the ID of a workItem

    $
    0
    0
    Hi,

    Well, looking at the code of the Composite Application Block, it seems that the list of child Work Items is a ManagedObjectCollection, which is a collection of KeyValuePairs rather that a Dictionary. Hence, it doesn't seems to expose a method to obtain the "keys" of the objects. I'm not very familiar with this implementation, so there might be a better approach, but as a quick workaround you could iterate over the WorkItems collection using a foreach statement (as the ManagedObjectCollection class provides an enumerator) and retrieve the key for each KeyValuePair.

    Regards,

    Damian Cherubini
    http://blogs.southworks.net/dcherubini

    New Post: How can I know the ID of a workItem

    $
    0
    0
    I can do it now, it's harder than I expect but finally I got it.

    Thanks DCherubini!

    New Post: Add UIElements from Multiple Modules?

    $
    0
    0
    WorkItem.RootWorkItem.Items.Add(menu, "MainMenu");
    
    #00B050">//registering if you have the RootWorkItem
    
    RootWorkItem.Items.Add(menu, "MainMenu");
    
    #00B050">//When retrieving the MainMenu
    
    #4BACC6">ToolStripMenuItem menu = WorkItem.RootWorkItem.Items.Get<#4BACC6">ToolStripMenuItem>("MainMenu");
    Thanks for the heads up. That's where I got lost. It's great knowing Chicago Escorts.
    Viewing all 27 articles
    Browse latest View live


    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>