R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Intermodule Communication with GoMap
Last Post 01 Jan 1900 05:00 AM by . 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
hn1User is Offline
New Member
New Member
Posts:6

--
21 May 2007 09:50 PM  
    Hello,

I'm having problems with IMC between a module of mine and GoMap. I'm new to VB, JS, mostly everything, and I don't know where I'm going wrong.

I made a button on GoMap so that when I click, another module would listen and does the corresponding action, however, it doesn't work.

Whenever I double click on the button, for my other modules, it would go to the vb code, but for the GoMap source currently, it creates a script within the VB, and I don't know the syntax for implementing a class within the script, nor do I know how to call a function from the vb file.

Note: For the two other modules that I've created, IMC works fine.

I'm thinking that this has to do with the difference between CodeFile and CodeBehind in the .ascx file. Is this the case?

I saw this in the code: Protected WithEvents ltlMapData As System.Web.UI.WebControls.Literal, and ltlMapData also appeared in the .ascx file, can you explain this?

Basically,

I need GoMap to

        Implements DotNetNuke.Entities.Modules.Communications.IModuleCommunicator


AND Have these methods:

        Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

            Dim lng As String = DotNetNuke.UI.Utilities.ClientAPI.GetClientVariable(Page, "NEXUS_LONGITUDE")
            Dim lat As String = DotNetNuke.UI.Utilities.ClientAPI.GetClientVariable(Page, "NEXUS_LATITUDE")

           Label1.Text = "Longitude = " & lng & " Latitude = " & lat

            ' Create a New communication event, used for intermodule communication,
            ' This will broadcast the event any time it occurs, and the listeners will have
            ' to check and does the correct thing.

            Dim evt As New DotNetNuke.Entities.Modules.Communications.ModuleCommunicationEventArgs _
            ("Nexus_GoMapIMC", Label1.Text, GetType(bi4ce_gomap_ui_ascx).Name, _
            GetType(bi4ce_gomap_ui_ascx).Name)

            RaiseEvent ModuleCommunication(Me, evt)

        End Sub

        Public Event ModuleCommunication(ByVal sender As Object, ByVal e As DotNetNuke.Entities.Modules.Communications.ModuleCommunicationEventArgs) Implements DotNetNuke.Entities.Modules.Communications.IModuleCommunicator.ModuleCommunication

These Should be in the vb,

And in the .ascx, I will have a button2.

Please Help?
hn1User is Offline
New Member
New Member
Posts:6

--
22 May 2007 01:07 AM  
Found the solution.
mattsweetnamUser is Offline
New Member
New Member
Posts:4

--
19 Jun 2007 02:19 AM  
<img src='desktopmodules/ntforums/images/emoticons/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'>Why don't you post your soln?
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share