Forum Replies Created

Viewing 15 replies - 31 through 45 (of 45 total)
  • Author
    Replies
  • in reply to: Max Attachment Path Length? #8053
    ctaleck
    Participant

      Good suggestion on copying it to a temp directory. Thank you.

      in reply to: Organizing Code with Classes #5630
      ctaleck
      Participant

        Thank you for all your suggestions. I am already utilizing the methods described, but I wanted to push it further to help organize my ever-increasing code base more.

        in reply to: Fix Invalid Name for a Form #8051
        ctaleck
        Participant

          The error I spoke of actually appears when I click on the Rename button, not only the Edit button. So that did not work for me.

          The solution I figured out was to use a binary editor to edit the .VBF and .VB~ files to change the name in the XML code. That worked for me. Notepad did not work as it destroyed the binary form data.

          Backups of forms (using export) and copying the VBF files is now a regular part of my work process. 🙂

          in reply to: Drag and Drop #8040
          ctaleck
          Participant

            The OpenFileDlg is the method I am currently using. The drag and drop feature was a user request which I thought would be useful.

            I have made a little progress on a solution using the DynamicWrapper ActiveX control that allows me to call Windows API.

              Dim UserWrap
              Set UserWrap = CreateObject("DynamicWrapper")
            
              UserWrap.Register "SHELL32.DLL", "DragAcceptFiles", "i=Hl","f=s"
              UserWrap.DragAcceptFiles Dlg.Handle, True
            

            This successfully shows a drag cursor on my Formativ form suggesting it can accept files dragged to it. However, I am still working on the code which allows me to capture the WM_DROPFILES messages from Windows to decode the actual file path using another Windows API: DragQueryFile.

            I see that most controls (including the form) have a method called WindowProc, but I am unsure how to override it in VBScript. Perhaps it is not even exposed in Formativ? Is there any way I can tap into the WindowProc so that I can receive those messages?

            I am using the following article as guide to my efforts: Drag and Drop from Windows Explorer

            [This message was edited by ctaleck on September 11, 2008 at 06:25 AM.]

            in reply to: Message Reference from Reply #7997
            ctaleck
            Participant

              I’m not sure why I had the ItemSaveMessageDraft commented out. Tired mistake…

              I tried using your cleaned up code and finally got a message ID. However, I got the message ID of the “original” message, not the “reply” message.

              It turns out that I’ve had the “integration” setup incorrectly.

              In all my tests, I’ve had integrations set to run the code BEFORE the “OnReply” event.

              I changed it to run AFTER “OnReply” and it successfully retrieves the “reply” message ID.

              I guess the moral of this exchange is that no assumptions should be made about which integrations are being used during tests.

              [This message was edited by ctaleck on July 17, 2008 at 06:15 AM.]

              in reply to: Message Reference from Reply #7994
              ctaleck
              Participant

                For the record, here is the code I was working with. The result is a still “X00” during the iterations.

                 Sub Main(Client, GWEvent)
                
                dim iWIPFolderPath
                  dim oMsg
                  dim iMsgID
                  dim iWIPPath
                  Dim iBreakCount
                
                 ' Save the draft message to the Work in Progress folder
                  Call Groupwise.ItemSetText("X00", itfSubject, " COMPLETED", TRUE) ' TRUE = Append
                  Utilities.Trace "iWIPPath=" & iWIPPath
                  'Groupwise.ItemSaveMessageDraft(iWIPPath)
                  Call Groupwise.throwtoken("ItemSaveMessageDraft(""" & iWIPPath & """)", iReturnVal)
                  MsgBox "ItemSaveMessageDraft returns " & iReturnVal
                
                  ' Calling ItemMessageIDFromView immediately after GroupWise.ItemSaveMessageDraft
                  ' can result in an X00 ID.
                  iMsgID = GroupWise.ItemMessageIDFromView
                
                  iBreakCount = 0
                  while (iMsgID = "Token failed execution!") or (iMsgID = "X00")
                     Application.ProcessMessages
                     utilities.Timer(1)
                     Application.ProcessMessages
                     iMsgID = GroupWise.ItemMessageIDFromView
                     iBreakCount = iBreakCount + 1
                     Utilities.Trace iBreakCount & ": " & iMsgID
                     if (iBreakCount > 10) then
                       exit sub
                     end if
                  wend
                
                  set oMsg = GroupWise.Account.GetMessage(iMsgID)
                  msgbox oMsg.subject.plaintext
                
                End Sub
                
                
                
                '-------------------------------------------------------------------------------
                ' Get full path of the Work-In-Progress folder where Drafts are saved
                '-------------------------------------------------------------------------------
                Function GetWIPFolderPath(aGWFolder, byref aPath)
                  Dim sHome
                  sHome = ""
                  Utilities.Trace "aGWFolder.Name=" & aGWFolder.Name & " aPath=" & aPath
                  If (Cint(Left(GroupWise.EnvVersionName,1)) >= 7) Then
                    If aGWFolder.Name = GroupWise.Account.Owner.DisplayName Then
                      sHome = " Home"
                    End If
                  End If
                  If aGWFolder Is Nothing Then
                    Exit Function
                  End If
                  If (aPath <> "") Then
                    aPath = aGWFolder.name & sHome & "" & aPath
                  Else
                    aPath = aGWFolder.name
                  End If
                  If (aGWFolder.objtype = fgwRoot) Then
                    Exit Function
                  Else
                    Call GetWIPFolderPath(aGWFolder.ParentFolder, aPath)
                  End if
                End Function 
                in reply to: Message Reference from Reply #7998
                ctaleck
                Participant

                  I just reviewed again the thread on this forum about this problem and I’ve decided to tackle it in a different manner as there appears to be no resolution to the “custom field in a draft message” problem.

                  Too bad, as I was trying to avoid having to re-create an e-mail form just to send a reply with some data attached to a custom field.

                  There was a suggestion to put the data in the body of the message at the bottom, which I might consider, but does not seem as clean.

                  in reply to: Message Reference from Reply #8002
                  ctaleck
                  Participant

                    You are right, I am using GW 7. But, I get the string “7.0.2 HP” for the EnvVersionName so that the following code returns FALSE for me.

                    (GroupWise.EnvVersionName > "7")
                     

                    I had to modify it to make it thusly:

                      (Cint(Left(GroupWise.EnvVersionName,1))) >= 7)
                    

                    However, I then had to deal with the fact that the “Work In Progress” folder was in another folder. So I used the code above combined the “GetWIPFolderPath” function found elsewhere on these forums for that.

                    But then… I figured out that you need to modify the draft message before it can be saved so I used this code:

                    Call Groupwise.ItemSetText("X00", itfSubject, " COMPLETED", TRUE)  

                    Now the message is saved in the “Work In Progress” folder. Yeah!

                    But alas, I still get an “X00” message ID for all the iterations. What else am I missing? Is some sort of “refresh” needed?

                    in reply to: Message Reference from Reply #7996
                    ctaleck
                    Participant

                      I found this code, but it does not work also. I get “X00” as the ID during the while loop.

                         
                        dim oMsg
                        dim iMsgID
                        dim iWIPPath
                        Dim iBreakCount
                      
                        ' Save the draft message to the Work in Progress folder
                        iWIPPath = GroupWise.Account.Owner.DisplayName & "" & GroupWise.Account.WorkFolder.Name
                        Utilities.Trace "iWIPPath=" & iWIPPath
                        Groupwise.ItemSaveMessageDraft(iWIPPath)
                      
                        ' Calling ItemMessageIDFromView immediately after GroupWise.ItemSaveMessageDraft
                        ' can result in an X00 ID.
                        iMsgID = GroupWise.ItemMessageIDFromView
                        iBreakCount = 0
                        while (iMsgID = "Token failed execution!") or (iMsgID = "X00")
                           Application.ProcessMessages
                           utilities.Timer(1)
                           Application.ProcessMessages
                           iMsgID = GroupWise.ItemMessageIDFromView
                           iBreakCount = iBreakCount + 1
                           Utilities.Trace iBreakCount & ": " & iMsgID
                           if (iBreakCount > 10) then
                             exit sub
                           end if
                        wend
                      
                        set oMsg = GroupWise.Account.GetMessage(iMsgID)
                      
                      in reply to: How to call code in another applet? #7294
                      ctaleck
                      Participant

                        I am fairly new to Formativ and I do not see how the ChainApplet() method would allow you to call a function in another applet and then return a value.

                        It seems to me that things could get very messy trying to pass values through the Utilities.TransferData property and the whole business of the first applet having to quit before the other one can start and then start up the calling applet to receive the value would really affect performance.

                        Can you elaborate more on the technique?

                        in reply to: How to call code in another applet? #7295
                        ctaleck
                        Participant

                          Is this still true for version 2.0 of Formativ? It would certainly be a very helpful feature for code reuse.

                          in reply to: Object API and ActiveX – Create a message #7988
                          ctaleck
                          Participant

                            I’m sorry, I guess I should have put this under the forum called “Free Solutions from GroupWise Cool Solutions or Advansys” as it is the exact code you supplied for the “TUT333 – Object API ActiveX – Message Store.

                            Specifically, when this code is executed:

                            Sub btnSpellCheckClick(Sender)
                              call GroupWise.InvokeSpellerForWindow(NewMsgDlg.mBody.Handle, false)
                            End Sub
                            in reply to: Toolbar Implementation for Rich Text Box #5608
                            ctaleck
                            Participant

                              How would I go about getting the source code for the Stationery sample? The version I have is Flexlocked.

                              in reply to: Toolbar Implementation for Rich Text Box #5612
                              ctaleck
                              Participant

                                I created a sample form from your suggestion and got it working. Although the Font Dialog is not exactly similar to the toolbar concept I was looking for, it does get the job done in those rare cases where someone would want to format their text.

                                I tried looking for more documentation on the THTMLEditorEx but was not successful. I found other references to “THTML” but none of them with “EditorEx.” Specifically, I would like to know how to get the text of out the control and either into a variable or back into the text file in the temp dir.

                                I searched each of these help files in the Delphi help files as suggested in the readme.txt:
                                dbxpress.hlp
                                del6com.hlp
                                del6cw.hlp
                                del6dap.hlp
                                del6dbd.hlp
                                del6iota.hlp
                                del6new.hlp
                                del6op.hlp
                                del6prog.hlp
                                del6vcl.hlp <- I assume this is the file to search, but I tried all of them anyway…
                                delphi6.hlp
                                dlx1clx.hlp
                                ibx.hlp

                                Also, your button code should be htmlEditor:

                                  
                                Sub btnFontClick(Sender)
                                    Maindlg.htmlEditor.Fontdialog
                                End Sub
                                

                                [This message was edited by ctaleck on May 28, 2008 at 12:54 PM.]

                                in reply to: Documentation also #5524
                                ctaleck
                                Participant
                                Viewing 15 replies - 31 through 45 (of 45 total)