Domino 9 und frühere Versionen > ND6: Entwicklung

OO Entwicklung mit LotusScript - Frage externer Editor / Eclipse?

<< < (14/23) > >>

JulianBuss:
ich hab mal geguckt; in LS-Bibliothekten ist das Script im Klartext im Feld "$ScriptLib" gespeichert.
D.h. Eclipse könnte das Script einfach in diesem Feld speichern und dann die C-API NSFNoteLSCompile anstossen.

Zusammen mit einem Syntax-Checker für die üblichsten Compile-Fehler direkt in Eclipse wäre das doch ein guter Weg!

In Agenten übrigens scheint das anders auszusehen; dort ist ein eventuelles Script in binärer Form gespeichert. Ich denke aber sowieso, dass LS-Bibliotheken erstmal das wichtigste sind.

Auf jeden Fall kann man von Java aus eine Windows C-Funktion aufrufen; d.h. das Java basierte Eclipse-Plugin kann die NSDNoteLSCompile ausführen.

animate:
so einfach geht das nicht mit dem "im Feld speichern".
Hab ich schon mal probiert (resultierte in Generic LSE failure beim Öffnen der Bibliothek. s. hier)

das war noch zu Notes5 Zeiten, vielleicht hat sich was geändert.

aber die C++-API bietet eine ScriptLibrary-Klasse an mit den Methoden getLotusScript und setLotusScript. Das hört sich zumindest gut an.

Semeaphoros:
Dann muss es aber auch über die C-Api direkt gehen, denn die C++ Api ist "nur" ein Wrapper um das Ganze

JulianBuss:
nö, hat sich nix geändert. Habs grade ausprobiert :-)
So einfach gehts in der Tat nicht.

animate:
hmm, das hier könnte der Grund dafür sein, dass es nicht so einfach geht:

(aus der C++API-Referenz)

--- Zitat ---Also note that you cannot specify the LotusScript for an agent, button, form or view action, or action hotspot by passing an LNLotusScript object that was constructed "from scratch" with a string or LNString containing pure LotusScript code as you would enter it in Notes. This is because the code lacks special comments that are normally inserted and parsed by Notes when you manually create LotusScript. To properly specify LotusScript code, you must get it from an LNLotusScript object that represents LotusScript that was manually created and saved in Notes.
This does not prevent you from using strings containing LotusScript, but it does require some extra steps. For example, if you had a library of scripts, you could add them to agents by doing the following:
  1.   Manually or programmatically create a database that holds a series of LotusScript agents named after your scripts.
  2.   Manually copy and paste your scripts from text files into the new agents.
  3.   Save the new agents so that Notes can insert its special comments.
  4.   Write code that gets the LotusScript code from the agents you just created and adds it to agents in your target database. For example:
LNDatabase    agentDb, targetDb;
LNAgent       agent, newAgent;
LNLotusScript script;

agentDb.GetAgent("Script1", &agent);
agent.Open();
agent.GetLotusScript(&script);

targetDb.CreateAgent("NewAgent", TRUE, &newAgent);
newAgent.SetLotusScript(script);
//set other properties
newAgent.Save();

--- Ende Zitat ---

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln