Cannot convert from 'CuteChat.ChatPortal' to 'CuteChat.AppPortal' .

Last post 04-28-2009, 2:23 AM by gbpatel. 1 replies.
Sort Posts: Previous Next
  •  04-21-2009, 10:54 AM 51318

    Cannot convert from 'CuteChat.ChatPortal' to 'CuteChat.AppPortal' .

    i create my custom class for integrate with my existing application.
    class TaxTrustProvider: ChatProvider
    class TaxTrustDataManager : AppDataManager
       ... my business logic is implemented here
    now i want to create  ["TaxTrustDataManager"] into my web page to call my functions.
    but when i try to create object of  TaxTrustDataManager using following code it give me error.
    TaxTrustProvider Provider = new TaxTrustProvider();

            if (!CuteChat.ChatSystem.HasStarted)
                CuteChat.ChatProvider.Instance = new TaxTrustProvider();
                CuteChat.ChatSystem.Start(new CuteChat.AppSystem());

            TaxTrustDataManager obj = new TaxTrustDataManager(Provider.CreateDataManagerInstance(CuteChat.ChatSystem.Instance.GetCurrentPortal()));

    1] cannot convert from 'CuteChat.ChatPortal' to 'CuteChat.AppPortal'   
    2] The best overloaded method match for 'CuteChat.ChatProvider.CreateDataManagerInstance(CuteChat.AppPortal)' has some invalid arguments.

  •  04-28-2009, 2:23 AM 51591 in reply to 51318

    Re: Cannot convert from 'CuteChat.ChatPortal' to 'CuteChat.AppPortal' .

    hi, i solve this issue,
    solution is if you are creating you own custom class for DataManager  then you have to cast it when you are creating object.
    following is the sample code.
    TaxTrustMessanger.Components.TaxTrustDataManager objDataManager = (TaxTrustMessanger.Components.TaxTrustDataManager)CuteChat.ChatSystem.Instance.GetCurrentPortal().DataManager;
View as RSS news feed in XML