/ Forums / Advansys Formativ / Creating Solutions with Formativ / Different code behavior on different platform (

  • Creator
    Topic
  • #3936
    pasclinaui
    Participant

    I’m building an applet to retrieve an info from an addressbook ! On win2k platf. my code works great but on win9x platf. no way to obtain info required ! Any idea ?

    here ‘s the code:


    Sub Main(Client, GWEvent)

    Dim usr
    Dim Wiz01
    Dim Wiz02
    Dim Instructions1
    Dim Instructions2
    Dim Instructions3
    Dim AddressBooks
    Dim AddressBook
    Dim objAddressBookEntries
    Dim objAddressBookEntry
    Dim objAddressBooks
    Dim objAddressBook

    usr = GroupWise.EnvUserID()
    GroupWise.EnableCommand(638) ‘RuleCreate()
    GroupWise.EnableCommand(639) ‘RuleDelete()
    GroupWise.EnableCommand(62) ‘RuleListDlg()

    Set AddressBooks = GroupWise.AddressBooks
    for Each AddressBook in AddressBooks
    If AddressBook.name = “Rubrica di indirizzi Novell GroupWise” or AddressBook.name = “Novell GroupWise Address Book” then
    ‘MsgBox(AddressBook.Name)
    Set AddressBook = AddressBooks.Item(“Novell GroupWise Address Book”)
    If IsEmpty(AddressBook) then
    MsgBox(“Non trovo: Novell GroupWise Address Book !”)
    Set AddressBook = AddressBooks.Item(“Rubrica di indirizzi Novell GroupWise”)
    If IsEmpty(AddressBook) then
    MsgBox(“Non trovo: Rubrica di indirizzi Novell GroupWise !”)
    Set AddressBooks = nothing
    Exit Sub
    End If
    End If
    End If
    Next

    ‘MsgBox(“Using : “&AddressBook.Name)
    ‘MsgBox(“User : “&usr)

    for each objAddressBookEntry in AddressBook
    if (objAddressBookEntry.Title <> “*”) and (objAddressBookEntry.UserID = usr) then
    FW_TO = objAddressBookEntry.Title
    MsgBox(“Info retrieved ! “&FW_TO)
    end if
    next

    If FW_TO = “” Then
    MsgBox(“Info unavailable !”)
    Exit Sub
    End If



    (*) on win2k I retrieve exactly info stored in TITLE field but on win9x the field FW_TO is empty !!! Maybe I’m wrong ?

  • Author
    Replies
  • #6655
    Support 1a
    Participant

    Thank you for your question below. The applet code is not implemented differently on different operating systems. However, I cannot say how the GroupWise client operates under different versions of Windows.

    If we assume the GroupWise client works the same way under Windows 9x and 2K, something else must be different. To assist further, could you please advise:

    1) Are you accessing the same GroupWise account on both Windows 2000 and 9x?

    2) Do you have the same version of the GroupWise client installed on both machines? What version is it? (Version, Date and Language)

    3) When you say Windows 9x, do you mean 95 or 98?

    4) Do you know if you are actually obtaining the appropriate address book entry on 9x? Perhaps you could simplify that part of your code which locates the user to be something like:

    for each objAddressBookEntry in AddressBook
       if objAddressBookEntry.UserID = usr then
          MsgBox objAddressBookEntry.Title
       end if
    next
    

    As your code stands at the moment, you can’t actually tell if you are first obtaining an address book entry.

    Advansys Support

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.