Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: stitze am 28.03.06 - 10:29:32

Titel: Document command is not availible
Beitrag von: stitze am 28.03.06 - 10:29:32
Hallo liebe Notes Entwickler

ich hab folgendes Problem

Ich rufe mit folgenden Code ein Dialogfenster auf

Zitat
Sub Click(Source As Button)
   Dim uiws As New Notesuiworkspace
   Dim db As NotesDatabase
   Dim uidoc As Notesuidocument
   Dim doc As NotesDocument
   Dim dialogdoc As Notesdocument    
   Dim varOk As Variant
   
   Set db = uiws.currentdatabase.database
   Set uidoc = uiws.Currentdocument   
   Set doc = uiws.currentdocument.document
   Set dialogdoc = db.createdocument
   
   dialogdoc.DocArt = "hinzufügen"
   
   Forall entry In doc.getItemValue("Supportgroup")
      dialogdoc.DocInhalt = dialogdoc.getItemValue("DocInhalt")(0) + entry + Chr(10)
   End Forall
   
   varOk = uiws.DialogBox( "dlgSupportgruppen" , False , False  , True  , False , False , False , "Supportgruppen bearbeiten",  dialogdoc, True, True )
   
   If ((varOk = True)) Then
      
      doc.Supportgroup = ""
      
      Forall entry In dialogdoc.getitemvalue("DocInhalt")
         doc.Supportgroup = doc.getitemvalue("Supportgroup")(0) + entry + Chr(10)
      End Forall
      
   End If
   
   Call uidoc.Refresh
   Call uidoc.Refresh
End Sub

an der rot markierten Stelle bekomme ich immer die Fehler Meldung

Zitat
Document command is not availible

Ich habe keinen Plan was Notes von mir will.

Hat den jemand anderes ;)

Mfg

Sebastian
Titel: Re: Document command is not availible
Beitrag von: eknori am 28.03.06 - 10:37:56
wg:

This method is valid only when the document is in Edit mode

bekommst du den Fehler
Titel: Re: Document command is not availible
Beitrag von: stitze am 28.03.06 - 10:45:26
Nee ganau so wie ichs oben geschrieben habe "Document command is not availible".

Merkwürdig ist auch, wenn ich das Formular direkt aus dem Designer öffne, nicht über einen Button in der Ansicht, funktioniert der ganze Spass  ???
Titel: Re: Document command is not availible
Beitrag von: stitze am 28.03.06 - 10:47:08
Antwort aber dein Tipp war nicht schlecht, wenn das Dokument im Edit Modus ist, funktioniert der ganze Spass, warum ist das so?

Bzw. wie muss ich das Dokument denn dann öffnen die Aktion sieht im Mom so aus

Code
@Command([Compose];"frmProblem")
Titel: Re: Document command is not availible
Beitrag von: eknori am 28.03.06 - 10:49:05
wg:

This method is valid only when the document is in Edit mode
Titel: Re: Document command is not availible
Beitrag von: stitze am 28.03.06 - 10:50:36
Argh *HAUKOPFAUFTISCHPLATTE* ^^

Okay das mit dem lesen übe ich dann nochma ;)