<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-37350501</id><updated>2011-06-08T07:12:59.551+01:00</updated><category term='interface'/><category term='Membres statiques'/><category term='Classe statique'/><category term='POO'/><category term='LotusScript'/><category term='Programmation orientée objet'/><category term='SnTT'/><category term='classe abstraite'/><category term='LotusScript V8 DOM SnTT'/><title type='text'>Le Lotus Jaune</title><subtitle type='html'>&lt;a href="http://lotusjaune.blogspot.com/rss.xml" title="Le Lotus Jaune en Rss"&gt;&lt;img src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt=""&gt;&lt;/a&gt; &lt;a href="http://lotusjaune.blogspot.com/atom.xml" title="Le Lotus Jaune avec Atom"&gt;&lt;img src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt=""&gt;&lt;/a&gt;&lt;br/&gt;
Blog-Note autour de Lotus Notes &amp; Domino</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-37350501.post-7488185260943359267</id><published>2007-12-09T12:12:00.000+01:00</published><updated>2007-12-09T13:06:54.470+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LotusScript V8 DOM SnTT'/><title type='text'>Notes/Domino DOM LotusScript Mis à Nu</title><content type='html'>&lt;div align="right"&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://opendom.blogspot.com/2007/12/undocumented-lotusscript-r8loaded.html"&gt;English version&lt;/a&gt; &lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;Voici une courte liste des méthodes et propriétés LotusScript non documentées en version 8, construite à l'aide de la librairie notes32.tlb de Lotus Notes.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;Quelques précautions d'usage s'appliquent puisqu'un tel contenu est &lt;u&gt;non supporté&lt;/u&gt; par IBM. Utilisez cela librement mais sans garantie ni support.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;NotesDatabase&lt;br /&gt;archiveDestinations : Variant&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="left"&gt;NotesDocument&lt;br /&gt;SequenceTime : Variant&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="left"&gt;&lt;a href="http://opendom.blogspot.com/2006/12/plot-undocumented-dom-lotusscript_14.html"&gt;Plot Undocumented DOM LotusScript Using Visual Basic 2005 Express free Edition&lt;/a&gt; et &lt;a href="http://opendom.blogspot.com/2006/11/use-rational-rose-to-identify.html"&gt;Use Rational Rose to Identify Undocumented DOM Properties and Methods&lt;/a&gt; détaillent comment identifier les fonctions cachées du LotusScript de Notes ou Domino, depuis le support de COM dans la version 5. &lt;a href="http://opendom.blogspot.com/2006/11/undocumented-dom-lotusscript-inventory.html"&gt;Undocumented DOM LotusScript Inventory&lt;/a&gt; contient un inventaire détaillé des propriétés et méthodes non documentées en Version 7.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-7488185260943359267?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/7488185260943359267/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=7488185260943359267&amp;isPopup=true' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/7488185260943359267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/7488185260943359267'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2007/12/notesdomino-dom-lotusscript-mis-nu.html' title='Notes/Domino DOM LotusScript Mis à Nu'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-3101245735774646721</id><published>2007-07-25T13:24:00.000+01:00</published><updated>2007-07-25T13:28:33.849+01:00</updated><title type='text'>Lotus Jaune rama</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TwaqrCV_JzI/RqdBpb61VzI/AAAAAAAAADY/a2ygJcKyxkQ/s1600-h/Le+Lotus+Jaune+2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_TwaqrCV_JzI/RqdBpb61VzI/AAAAAAAAADY/a2ygJcKyxkQ/s320/Le+Lotus+Jaune+2.jpg" alt="" id="BLOGGER_PHOTO_ID_5091110083890599730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TwaqrCV_JzI/RqdBhb61VyI/AAAAAAAAADQ/8aQ-l8Nhvx8/s1600-h/Le+Lotus+Jaune+%28M%C3%A9tro%29.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_TwaqrCV_JzI/RqdBhb61VyI/AAAAAAAAADQ/8aQ-l8Nhvx8/s320/Le+Lotus+Jaune+%28M%C3%A9tro%29.jpg" alt="" id="BLOGGER_PHOTO_ID_5091109946451646242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_TwaqrCV_JzI/RqdBY761VxI/AAAAAAAAADI/qnsFWRyB1d0/s1600-h/Le+Lotus+Jaune+3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_TwaqrCV_JzI/RqdBY761VxI/AAAAAAAAADI/qnsFWRyB1d0/s320/Le+Lotus+Jaune+3.jpg" alt="" id="BLOGGER_PHOTO_ID_5091109800422758162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_TwaqrCV_JzI/RqdBS761VwI/AAAAAAAAADA/E7-aNphGNhI/s1600-h/Le+Lotus+Jaune.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_TwaqrCV_JzI/RqdBS761VwI/AAAAAAAAADA/E7-aNphGNhI/s320/Le+Lotus+Jaune.jpg" alt="" id="BLOGGER_PHOTO_ID_5091109697343543042" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-3101245735774646721?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/3101245735774646721/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=3101245735774646721&amp;isPopup=true' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/3101245735774646721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/3101245735774646721'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2007/07/lotus-jaune-rama.html' title='Lotus Jaune rama'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_TwaqrCV_JzI/RqdBpb61VzI/AAAAAAAAADY/a2ygJcKyxkQ/s72-c/Le+Lotus+Jaune+2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-3225979422383469002</id><published>2007-04-06T20:29:00.000+01:00</published><updated>2007-05-04T16:50:26.601+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SnTT'/><category scheme='http://www.blogger.com/atom/ns#' term='classe abstraite'/><category scheme='http://www.blogger.com/atom/ns#' term='POO'/><category scheme='http://www.blogger.com/atom/ns#' term='Programmation orientée objet'/><category scheme='http://www.blogger.com/atom/ns#' term='LotusScript'/><category scheme='http://www.blogger.com/atom/ns#' term='interface'/><title type='text'>Interfaces &amp; Classes Abstraites en LotusScript</title><content type='html'>&lt;div style="text-align: right;"&gt;&lt;a href="http://opendom.blogspot.com/2007/04/interfaces-abstract-classes-with.html#links"&gt;&lt;span style="font-size:78%;"&gt;english version&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TwaqrCV_JzI/Rhaj64eoABI/AAAAAAAAACA/XFAZ05AqRCA/s1600-h/Dominos.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_TwaqrCV_JzI/Rhaj64eoABI/AAAAAAAAACA/XFAZ05AqRCA/s320/Dominos.gif" alt="" id="BLOGGER_PHOTO_ID_5050404264131166226" border="0" /&gt;&lt;/a&gt;Les classes abstraites et les interfaces définissent des propriétés et des méthodes, au même titre que les classes traditionnelles. Il est possible de créer autant d'objets que nécessaire à partir de classes standards, alors que les interfaces ne servent qu'à décrire les fonctions que couvriront de futurs objets. Généralement les interfaces ne contiennent pas de code et ne permettent pas d'instancier des objets. Les classes abstraites, quant à elles, prototypent des propriétés et des méthodes. Il n'est pas permis non plus d'instancier directement des classes abstraites, celles-ci doivent être dérivées afin que leurs sous-classes héritent de leur code. Les compilateurs contrôlent généralement la couverture de toutes les propriétés et méthodes et s'assurent que nul n'instancie des interfaces ou des classes abstraites.&lt;br /&gt;&lt;br /&gt;D'ordinaire les concepteurs utilisent les interfaces et les classes abstraites pour construire des applications à faible couplage au code plus adaptable, plus maintenable et finalement plus robuste. Bien qu'absents du langage LotusScript, ces concepts, issus de la conception orientée objet, sont aisément implémentables en LotusScript.&lt;br /&gt;&lt;br /&gt;Imaginez la classe LotusScript.io.File aux propriétés et méthodes suivantes: canWrite( ), getAbsolutePath( ), length( ), list( ), renameTo( ). Il est envisageable de la construire simplement en LotusScript, mais aussi avec LS2J en s'appuyant sur Java, comme d'utiliser le composant COM Windows Script Host ou bien d'appeler les API 32-bits natives de Windows. Il devient alors tentant de définir une interface iFile décrivant ces propriétés et méthodes indépendamment de la solution finale restant à valider. Vous fabriquez ainsi une application dépendant d'une seule interface stable, alors que l'implémentation concrète peut varier à loisir sans heurts pour le code appelant. Voilà une application Notes ou Domino faiblement couplée.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_TwaqrCV_JzI/RhaoPoeoAEI/AAAAAAAAACY/ULGL2VScLt0/s1600-h/Stopwatches+UML+Class+Diagram.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_TwaqrCV_JzI/RhaoPoeoAEI/AAAAAAAAACY/ULGL2VScLt0/s320/Stopwatches+UML+Class+Diagram.JPG" alt="" id="BLOGGER_PHOTO_ID_5050409018659962946" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-weight: bold;"&gt;Figure 1:&lt;/span&gt; Le diagramme de classes UML de StopWatches&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;Le projet libre &lt;a href="http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM" gping="/GLinkPing.aspx?/_1_9SE/1?http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM&amp;amp;amp;amp;amp;amp;&amp;DI=78&amp;amp;IG=3c3041b4ccb34ab08244176fb8eefb28&amp;POS=2&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;CM=WPU&amp;CE=2&amp;amp;CS=AWP&amp;SR=2&amp;amp;sample=0"&gt;OpenDOM&lt;/a&gt; téléchargeable sur &lt;a href="http://www.openntf.org/"&gt;www.openntf.org&lt;/a&gt; fournit bon nombre d'exemples utilisant les notions de classe abstraite ou d'interface. La bibliothèque LotusScript.langStopWatches définit une interface publique iTicker à partir de laquelle quatre implémentations différentes ont été construites. Elles supportent LotusScript version 3 ou 4+ ainsi que Windows 16-bits ou 32-bits. Les paquetages, ou espaces de nommages, LotusScript.lang.R&lt;span style="font-style: italic;"&gt;n&lt;/span&gt; ou LotusScript.windows.win&lt;span style="font-style: italic;"&gt;nn&lt;/span&gt; hébergent chacun une classe Ticker implémentant concrètement l'interface iTicker. La classe publique StopWatches charge dynamiquement le moteur, construit d'après iTicker, qui est le plus adapté au contexte courant.&lt;br /&gt;&lt;br /&gt;Vous pouvez éviter l'instanciation d'objets et vous assurer que les propriétés et les méthodes sont surchargées ou dérivées. Mais créer un constructeur de classe LotusScript privé comme ..&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; iVehicle&lt;br /&gt;&lt;span style="color:red;"&gt;   Private&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;   End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' iVehicle&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;.. est refusé par le compilateur :&lt;br /&gt;&lt;&lt;span style="font-style: italic;"&gt;notename&lt;/span&gt;&gt;: &lt;&lt;span style="font-style: italic;"&gt;eventname&lt;/span&gt;&gt;: &lt;&lt;span style="font-style: italic;"&gt;linenumber&lt;/span&gt;&gt;: Illegal PRIVATE declaration of: NEW&lt;br /&gt;&lt;br /&gt;Puisque LotusScript ne supporte pas les interfaces ou les constructeurs privés j'utilise une technique différente. Je m'assure qu'aucune instanciation d'interface ou de classe abstraite n'est réalisée &lt;u&gt;à l'exécution seulement&lt;/u&gt; en lançant une exception au sein du constructeur de classe. Je force également la dérivation des propriétés et des méthodes par d'autres exceptions comme suit :&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:pink;"&gt;%INCLUDE&lt;/span&gt; &lt;span style="color:pink;"&gt;"LsErr.lss"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; iVehicle &lt;span style="color:green;"&gt;' &lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; &lt;span style="color:green;"&gt;' This forbids interface instantiation, please derive me ! &lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; &lt;span style="color:blue;"&gt;Typename&lt;/span&gt;&lt;span style="color:blue;"&gt;(&lt;/span&gt; &lt;span style="color:blue;"&gt;Me&lt;/span&gt; &lt;span style="color:blue;"&gt;)&lt;/span&gt; &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:black;"&gt;"IVEHICLE"&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt; &lt;span style="color:blue;"&gt;Error&lt;/span&gt; ErrNotAnObject&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; &lt;span style="color:green;"&gt;' New&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; Color &lt;span style="color:blue;"&gt;As&lt;/span&gt; NotesColor&lt;br /&gt;&lt;span style="color:blue;"&gt;Error&lt;/span&gt; errPropGetNotDefined&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' Color&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Set&lt;/span&gt; Price &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Currency&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Error&lt;/span&gt; errPropSetNotDefined&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' Price&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; starts&lt;span style="color:blue;"&gt;(&lt;/span&gt; &lt;span style="color:blue;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Error&lt;/span&gt; ErrNotAMethod&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; &lt;span style="color:green;"&gt;' starts( )&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' iVehicle &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; aShuttle&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; isFree &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Boolean&lt;/span&gt; &lt;span style="color:green;"&gt;' &lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Error&lt;/span&gt; errPropSetNotDefined&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' isFree &lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' aShuttle&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;Une fois mon interface décrite, je peux réaliser autant de classes concrètes qui l'implémentent et fournir une fabrique de classe ou une routine destinée à distribuer des objets différents selon le contexte :&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; Car &lt;span style="color:blue;"&gt;As&lt;/span&gt; iVehicle&lt;br /&gt;&lt;span style="color:green;"&gt;   ' Your code goes here ..&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' Car As iVehicle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; Truck &lt;span style="color:blue;"&gt;As&lt;/span&gt; iVehicle&lt;br /&gt;&lt;span style="color:green;"&gt;   ' Your code goes here ..&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' Truck As iVehicle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Function&lt;/span&gt; createVehicle &lt;span style="color:blue;"&gt;As&lt;/span&gt; iVehicle&lt;br /&gt;&lt;span style="color:blue;"&gt;   If&lt;/span&gt; &lt;span style="color:blue;"&gt;(&lt;/span&gt; so &lt;span style="color:blue;"&gt;And&lt;/span&gt; so &lt;span style="color:blue;"&gt;)&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;     Set&lt;/span&gt; &lt;span style="color:blue;"&gt;Me&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;createVehicle &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; Car&lt;br /&gt;&lt;span style="color:blue;"&gt;   Else&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;     Set&lt;/span&gt; &lt;span style="color:blue;"&gt;Me&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;createVehicle &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; Truck&lt;br /&gt;&lt;span style="color:blue;"&gt;   End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Function&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;La classe LotusScript.lang.Factory d'&lt;a href="http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM" gping="/GLinkPing.aspx?/_1_9SE/1?http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM&amp;amp;amp;amp;amp;amp;&amp;DI=78&amp;amp;IG=3c3041b4ccb34ab08244176fb8eefb28&amp;POS=2&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;CM=WPU&amp;CE=2&amp;amp;CS=AWP&amp;SR=2&amp;amp;sample=0"&gt;OpenDOM&lt;/a&gt; crée des objets de cette façon. Elle s'inspire d'un redbook d'IBM intitulé « Performance Considerations for Domino Applications » dont l'annexe &lt;a href="http://www.redbooks.ibm.com/abstracts/sg245602.html"&gt;«  B-2 Dynamic Script Library Loading »&lt;/a&gt; décrit d'intelligente manière comment charger dynamiquement des bibliothèques LotusScript dans vos applications orientées objet. Toutefois le code fournit par IBM réalise celà à l'aide de variants, c'est à dire au dépend d'un typage fort des données contrôlable par le compilateur. L'ajout d'interface dans votre code fixe celà et a de multiples avantages :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Il est possible de concevoir des applications à faible couplage en LotusScript qui s'affranchissent des implémentations techniques sous-jacentes&lt;/li&gt;&lt;li&gt;Les données font l'objet d'un typage fort au moment de la compilation, pratique vivement recommandée&lt;/li&gt;&lt;li&gt;L'empreinte mémoire de l'interpréteur LotusScript augmente progressivement à mesure que les bibliothèques sont appelées. Une compilation initiale précède ces appels, mais elle n'est pas notable alors qu'elle est pleinement compensée par une utilisation mémoire minime.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Pour réaliser une reconnaissance des objets dynamiques à la compilation, la classe Factory utilise des interfaces ou des classes abstraites. A contrario de la routine NewObj d'IBM, la classe Factory instancie des objets fortement typés, le contrôle des types lors de l'écriture du code renforce la robustesse et la stabilité des applications.&lt;br /&gt;&lt;br /&gt;Lectures annexes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://trade.hamk.fi/valjakka/work/index.htm"&gt;« Lotus Notes and Object-Oriented System Design »&lt;/a&gt;, Mikko Valjakka&lt;/li&gt;&lt;li&gt;Appendix &lt;a href="http://www.redbooks.ibm.com/abstracts/sg245602.html"&gt;« B-2 Dynamic Script Library Loading »&lt;/a&gt; in Performance Considerations for Domino Applications IBM RedBook&lt;br /&gt;&lt;a href="http://www.hadsl.com/hadslblog.nsf/BlogByMonth?OpenView&amp;RestrictToCategory=11-2006"&gt;«Dynamic loading of LotusScript libraries»&lt;/a&gt; in HADSL blog&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hadsl.com/hadsl.nsf/AD507.pdf"&gt;« Leveraging the Power of Object Oriented Programming in LotusScript »&lt;/a&gt;, Jens-B Augustiny &amp;amp; &lt;span style="color: rgb(192, 192, 192);"&gt;Wild&lt;/span&gt; Bill Buchan&lt;br /&gt;&lt;a href="http://www.hadsl.com/hadsl.nsf/BP301.pdf"&gt;« Object Orientated Programming in LotusScript »&lt;/a&gt;, &lt;span style="color: rgb(192, 192, 192);"&gt;Wild&lt;/span&gt; Bill Buchan&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.assono.de/blog.nsf/Downloads/EC06PDFOOLS/$File/OOLotusScript.pdf"&gt;« Objektorientierung in LotusScript effizient einsetzen »&lt;/a&gt;, Bernd Hort&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-3225979422383469002?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/3225979422383469002/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=3225979422383469002&amp;isPopup=true' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/3225979422383469002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/3225979422383469002'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2007/04/interfaces-classes-abstraites-en.html' title='Interfaces &amp; Classes Abstraites en LotusScript'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_TwaqrCV_JzI/Rhaj64eoABI/AAAAAAAAACA/XFAZ05AqRCA/s72-c/Dominos.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-6081061609109703994</id><published>2007-03-21T20:17:00.000+01:00</published><updated>2007-03-22T10:49:12.038+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SnTT'/><category scheme='http://www.blogger.com/atom/ns#' term='Membres statiques'/><category scheme='http://www.blogger.com/atom/ns#' term='POO'/><category scheme='http://www.blogger.com/atom/ns#' term='Programmation orientée objet'/><category scheme='http://www.blogger.com/atom/ns#' term='LotusScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Classe statique'/><title type='text'>Propriétés et Méthodes Statiques en LotusScript</title><content type='html'>&lt;div style="text-align: right;"&gt;&lt;a href="http://opendom.blogspot.com/2007/03/static-properties-methods-in.html"&gt;&lt;span style="font-size:78%;"&gt;english version&lt;br /&gt;Static Properties and Methods in LotusScript Classes&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TwaqrCV_JzI/RgGFICYojuI/AAAAAAAAABs/nsqA4pJLBPw/s1600-h/Dominos.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_TwaqrCV_JzI/RgGFICYojuI/AAAAAAAAABs/nsqA4pJLBPw/s320/Dominos.gif" alt="" id="BLOGGER_PHOTO_ID_5044459430757306082" border="0" /&gt;&lt;/a&gt;En Java et JavaScript les propriétés et méthodes statiques sont partagés par toutes les instances d'une classe donnée. Les membres non statiques sont liés aux objets d'une classe, ils appartiennent à l'instance d'une classe ainsi les instances de la classe File partagent la propriété statique pathSeparator qui dépend du système d'exploitation, alors que les propriétés getAbsolutePath( ) et canWrite( ) diffèrent d'un objet à un autre et que la méthode delete( ) produit un résultat différent selon l'objet qui l'exécute. Il est inutile d'instancier des objets pour utiliser les membres statiques et la propriété pathSeparator de la classe java.io.File est référençable en codant File.pathSeparator ou bien java.io.File.pathSeparator.&lt;br /&gt;&lt;br /&gt;Il peut être utile de créer en LotusScript des méthodes ou des propriétés de classe. Considérez une classe Platform et ses deux propriétés Newline et supportsCOM. Bien que ces propriétés varient selon le système d'exploitation, elles sont constantes pour toutes les instances de la classe Platform pour un client Notes ou serveur Domino donné. Imaginez la classe Trigo d'un paquetage LotusScript.math ses méthodes sin(), cos() et une propriété statique Pi aux  précisions décimales supérieures à celles offertes nativement en LotusScript par la constante Pi et les fonctions trigonométriques.&lt;br /&gt;&lt;br /&gt;Bien que le langage LotusScript ne dispose pas de membres statiques au niveau où Java et JavaScript les proposent, vous pouvez les implémenter de façon similaire avec une syntaxe très proche. La propriété Release de la classe LotusScript.lang.Interpreter disponible dans le projet libre &lt;a href="http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM" gping="/GLinkPing.aspx?/_1_9SE/1?http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM&amp;amp;amp;amp;amp;amp;amp;&amp;DI=78&amp;amp;IG=3c3041b4ccb34ab08244176fb8eefb28&amp;POS=2&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;CM=WPU&amp;CE=2&amp;amp;CS=AWP&amp;SR=2&amp;amp;sample=0"&gt;OpenDOM&lt;/a&gt; sur le site &lt;a href="http://www.openntf.org/"&gt;www.openntf.org&lt;/a&gt; permet d'illustrer celà.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt; Release &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt;&lt;br /&gt;Release &lt;span style="color:blue;"&gt;=&lt;/span&gt; lsi_info&lt;span style="color:blue;"&gt;(&lt;/span&gt; 6 &lt;span style="color:blue;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;Alors que ces deux lignes initialisent très simplement la version de l'interpréteur LotusScript, je leur préfère le &lt;a href="http://lotusjaune.blogspot.com/2007/02/code-scuris-et-programmation-dfensive.html"&gt;codage défensif&lt;/a&gt; suivant destiné à protéger la variable globale Release de toute modification :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Static&lt;/span&gt; &lt;span style="color:blue;"&gt;Private&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; INTERPRETER_RELEASE &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Static&lt;/span&gt; this &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    If&lt;/span&gt; this &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:black;"&gt;""&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt; this &lt;span style="color:blue;"&gt;=&lt;/span&gt; Lsi_info&lt;span style="color:blue;"&gt;(&lt;/span&gt; 6 &lt;span style="color:blue;"&gt;)&lt;/span&gt;&lt;br /&gt; INTERPRETER_RELEASE &lt;span style="color:blue;"&gt;=&lt;/span&gt; this&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.Interpreter.RELEASE property&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;La version LotusScript réduite de la classe publique Interpreter s'écrit comme suit :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; Interpreter &lt;span style="color:green;"&gt;' &lt;class&gt;&lt;/class&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; RELEASE &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt; &lt;span style="color:green;"&gt;' &lt;static&gt;&lt;/static&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;        Me&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;RELEASE &lt;span style="color:blue;"&gt;=&lt;/span&gt; INTERPRETER_RELEASE&lt;br /&gt;&lt;span style="color:blue;"&gt;    End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.Interpreter.RELEASE&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.Interpreter Class&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;De cette façon tous les objets instanciés de la classe Interpreter partagent une propriété RELEASE qualifiable de statique comme en Java ou JavaScript. La syntaxe Interpreter.RELEASE est implémentable dans la bibliothèque "LotusScript.lang" de la manière suivante :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Static&lt;/span&gt; &lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; Interpreter &lt;span style="color:blue;"&gt;As&lt;/span&gt; Interpreter&lt;br /&gt;&lt;span style="color:blue;"&gt;    Static&lt;/span&gt; this &lt;span style="color:blue;"&gt;As&lt;/span&gt; Interpreter&lt;br /&gt;&lt;span style="color:blue;"&gt;    If&lt;/span&gt; this &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:purple;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt; &lt;span style="color:blue;"&gt;Set&lt;/span&gt; this &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; Interpreter&lt;br /&gt;&lt;span style="color:blue;"&gt;    Set&lt;/span&gt; Interpreter &lt;span style="color:blue;"&gt;=&lt;/span&gt; this&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.Interpreter class&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;Deux courtes classes et deux propriétés supplémentaires suffisent à mentionner le chemin pleinement qualifié d'une classe comme dans LotusScript.lang.Interpreter.RELEASE :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; lang &lt;span style="color:green;"&gt;' &lt;package&gt;&lt;/package&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; Interpreter &lt;span style="color:green;"&gt;' &lt;static&gt;&lt;/static&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:blue;"&gt;    Set&lt;/span&gt; &lt;span style="color:blue;"&gt;Me&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;Interpreter &lt;span style="color:blue;"&gt;=&lt;/span&gt; LANG_INTERPRETER&lt;br /&gt;&lt;span style="color:blue;"&gt;    End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.Interpreter   &lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.* Package&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; LotusScript &lt;span style="color:green;"&gt;' &lt;package&gt;&lt;/package&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; lang &lt;span style="color:blue;"&gt;As&lt;/span&gt; lang &lt;span style="color:green;"&gt;' &lt;static&gt;&lt;/static&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:blue;"&gt;    Set&lt;/span&gt; &lt;span style="color:blue;"&gt;Me&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;lang &lt;span style="color:blue;"&gt;=&lt;/span&gt; LOTUSSCRIPT_LANG&lt;br /&gt;&lt;span style="color:blue;"&gt;    End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.* Package&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Public&lt;/span&gt; io &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Variant&lt;/span&gt; &lt;span style="color:green;"&gt;' As io__ ' &lt;dynamic&gt;&lt;/dynamic&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Public&lt;/span&gt; net &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Variant&lt;/span&gt; &lt;span style="color:green;"&gt;' As net__ ' &lt;dynamic&gt;     &lt;/dynamic&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.* Package&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Static&lt;/span&gt; &lt;span style="color:blue;"&gt;Private&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; LOTUSSCRIPT_LANG &lt;span style="color:blue;"&gt;As&lt;/span&gt; lang&lt;br /&gt;&lt;span style="color:blue;"&gt;    Static&lt;/span&gt; this &lt;span style="color:blue;"&gt;As&lt;/span&gt; lang&lt;br /&gt;&lt;span style="color:blue;"&gt;    If&lt;/span&gt; this &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:purple;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt; &lt;span style="color:blue;"&gt;Set&lt;/span&gt; this &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; lang&lt;br /&gt;&lt;span style="color:blue;"&gt;    Set&lt;/span&gt; LOTUSSCRIPT_LANG &lt;span style="color:blue;"&gt;=&lt;/span&gt; this&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.lang.* package&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Static&lt;/span&gt; &lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; LotusScript &lt;span style="color:blue;"&gt;As&lt;/span&gt; LotusScript&lt;br /&gt;&lt;span style="color:blue;"&gt;    Static&lt;/span&gt; this &lt;span style="color:blue;"&gt;As&lt;/span&gt; LotusScript&lt;br /&gt;&lt;span style="color:blue;"&gt;    If&lt;/span&gt; this &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:purple;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;br /&gt; &lt;span style="color:blue;"&gt;    Set&lt;/span&gt; this &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; LotusScript&lt;br /&gt;&lt;span style="color:blue;"&gt;    End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;    Set&lt;/span&gt; LotusScript &lt;span style="color:blue;"&gt;=&lt;/span&gt; this&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' LotusScript.* package&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;Réutiliser complètement la bibliothèque "LotusScript.lang" dans un agent, un masque ou une vue se résume à :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Use&lt;/span&gt; &lt;span style="color:black;"&gt;"LotusScript.lang"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;Msgbox&lt;/span&gt; LotusScript&lt;span style="color:blue;"&gt;.&lt;/span&gt;lang&lt;span style="color:blue;"&gt;.&lt;/span&gt;Interpreter&lt;span style="color:blue;"&gt;.&lt;/span&gt;RELEASE&lt;span style="color:blue;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;_&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;"LotusScript.lang.Interpreter.RELEASE"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;' OU BIEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;With&lt;/span&gt; LotusScript&lt;span style="color:blue;"&gt;.&lt;/span&gt;lang&lt;br /&gt;&lt;span style="color:blue;"&gt;    Msgbox&lt;/span&gt; Interpreter&lt;span style="color:blue;"&gt;.&lt;/span&gt;RELEASE&lt;span style="color:blue;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;_&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;    "Interpreter.RELEASE"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;With&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-6081061609109703994?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/6081061609109703994/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=6081061609109703994&amp;isPopup=true' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/6081061609109703994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/6081061609109703994'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2007/03/proprits-et-mthodes-statiques-en.html' title='Propriétés et Méthodes Statiques en LotusScript'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_TwaqrCV_JzI/RgGFICYojuI/AAAAAAAAABs/nsqA4pJLBPw/s72-c/Dominos.gif' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-6641529970845362699</id><published>2007-03-11T14:00:00.000+01:00</published><updated>2007-03-11T14:56:42.464+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SnTT'/><category scheme='http://www.blogger.com/atom/ns#' term='LotusScript'/><title type='text'>Eradiquer l'infâmant « Public symbol is declared in another module: V_EMPTY »</title><content type='html'>&lt;div style="text-align: right;"&gt;&lt;span style="font-size:78%;"&gt;english version:&lt;a href="http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87257046004E75BD"&gt; Overcoming the infamous&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87257046004E75BD"&gt;{Public symbol is declared in another module: V_EMPTY}&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Inclure les fichiers *.lss demeure le cauchemar des programmeurs Notes. En effet, de nombreux développeurs ont abandonné la pratique de &lt;span style="padding: 3px; color: pink; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;%INCLUDE &lt;span style="color:pink;"&gt;"LsConst.lss"&lt;/span&gt;&lt;/span&gt; ou d'autres bibliothèques dans leur code. Nombreux son ceux qui redéfinissent des constantes privées dans leurs bibliothèques, masques ou vues, ce qui n'est pas recommandable.&lt;br /&gt;&lt;br /&gt;Une solution aurait été de définir les constantes globales du LotusScript et de Notes au sein d'un fichier .lsx connu de "Domino Designer". Mais IBM/Lotus n'a apparemment pas envisagé celà.&lt;br /&gt;&lt;br /&gt;Jusqu'à maintenant, ma solution consiste à créer une bibliothèque "LsConst" référençable au sein des éléments de conception. Les constantes ne doivent être déclarées ni publiques ni privées et la bibliothèque débute par &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color:blue;"&gt;Option Public&lt;/span&gt;&lt;/span&gt;. Les bibliothèques, les masques ou les vues la référencent par &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color:blue;"&gt;Use&lt;/span&gt; &lt;span style="color:black;"&gt;"LsConst"&lt;/span&gt;&lt;/span&gt; et incluent indifféremment &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color:blue;"&gt;Option&lt;/span&gt; &lt;span style="color:blue;"&gt;Private&lt;/span&gt; &lt;span style="color:black;"&gt;| &lt;/span&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt;&lt;/span&gt; et/ou &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color:blue;"&gt;Option&lt;/span&gt; &lt;span style="color:blue;"&gt;Explicit&lt;/span&gt; &lt;span style="color:black;"&gt;| &lt;/span&gt;&lt;span style="color:blue;"&gt;Declare&lt;/span&gt;&lt;/span&gt;; notez cependant que &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color:blue;"&gt;Option Declare&lt;/span&gt;&lt;/span&gt; est vivement recommandé !&lt;br /&gt;&lt;br /&gt;Les avantages sont multiples :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"LsConst" est référençable SIMULTANEMENT dans les bibliothèques, les masques, les vues etc.. elle est INTEGRALEMENT réutilisée.&lt;/li&gt;&lt;li&gt;Les constantes présentes au sein des bibliothèques liées SONT accessibles e.g. je peux référencer la constante LSI_THREAD_CALLPROC dans mon code avec USE "LsConst" puisque la bibliothèque "LsPrcVal" est enchâssée dans "LsConst".&lt;/li&gt;&lt;li&gt;La taille des bibliothèques de script est réduite, (code source et code objet) en référençant "LsConst" comme décrit précédemment.&lt;/li&gt;&lt;li&gt;Aucune Option de compilation n'est imposée au développeur.&lt;/li&gt;&lt;li&gt;La bibliothèque "LsConst" n'est pas nécessaire en production (sauf dans les rares cas où les bibliothèques de script sont dynamiquement chargées à l'exécution...)&lt;/li&gt;&lt;/ul&gt;Quelques inconvénients demeurent:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;L'installation d'une nouvelle version de Notes ou Domino nécessite une relecture attentive des librairies Lsconst.lss, Lserr.lss, Lsxbeerr.lss et lsxuierr.lss.&lt;/li&gt;&lt;/ul&gt;Les bibliothèques "LotusScript.exceptions" et "LotusScript.lang.Lsconst", du project public &lt;a href="http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenDOM"&gt;OpenDOM&lt;/a&gt;, exploitent ce mécanisme et sont consultables sur &lt;a href="http://www.openntf.org/"&gt;www.openntf.org&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-6641529970845362699?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/6641529970845362699/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=6641529970845362699&amp;isPopup=true' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/6641529970845362699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/6641529970845362699'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2007/03/eradiquer-linfmant-message-de.html' title='Eradiquer l&apos;infâmant « Public symbol is declared in another module: V_EMPTY »'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-3332885238221163271</id><published>2007-02-25T15:04:00.000+01:00</published><updated>2007-02-25T15:56:03.954+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SnTT'/><category scheme='http://www.blogger.com/atom/ns#' term='POO'/><category scheme='http://www.blogger.com/atom/ns#' term='Programmation orientée objet'/><category scheme='http://www.blogger.com/atom/ns#' term='LotusScript'/><title type='text'>Code Sécurisé et Programmation Défensive</title><content type='html'>Alors que la programmation orientée objet est devenue inévitable de nos jours, de nombreuses applications Notes &amp; Domino demeurent écrites ou sont développées en utilisant une programmation procédurale traditionnelle.&lt;br /&gt;&lt;br /&gt;Ce billet illustre comment les variables globales présentes dans les masques, les vues ou les bibliothèques de script peuvent profiter des techniques de modélisation et de programmation objet afin de produire des programmes plus sûrs.&lt;br /&gt;&lt;br /&gt;Les variables globales servent à partager et à réutiliser les données ou routines entre masques, vues ou bibliothèques de script. Examinons les 3 variables que contient "ma Bibli" :&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; directory &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesDatabase&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;br /&gt;Dim&lt;/span&gt; user &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesName&lt;br /&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; location &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesDocument&lt;/span&gt; &lt;/div&gt;&lt;/pre&gt; Ces trois variables sont initialisées dès que possible et représentent respectivement le carnet d'adresses d'entreprise, l'utilisateur courant et le contexte applicatif tel que "Bureau", "Déplacement", "Local" ainsi de suite. Les applications Domino peuvent réutiliser à faible coût les trois variables de "ma Bibli" au sein de masques, de vues ou d'agents. Cependant ces trois variables sont trop exposées, en effet tout développeur à tout moment, en tout lieu peut réinitialiser celles-ci par mégarde en codant par exemple :&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Delete&lt;/span&gt; directory&lt;span style="color:green;"&gt;&lt;br /&gt;' OU&lt;br /&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;Set&lt;/span&gt; user &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:purple;"&gt;Nothing&lt;br /&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;' OU&lt;/span&gt;&lt;br /&gt;location&lt;span style="color:blue;"&gt;.&lt;/span&gt;&lt;span style="color:blue;"&gt;Remove&lt;/span&gt; &lt;span style="color:purple;"&gt;True&lt;/span&gt; &lt;/div&gt;&lt;/pre&gt; De telles failles sont d'ordinaire détectées à l'exécution des tests mais parfois également en production. Ces trois instructions génèrent la trop fameuse exception "Object variable not set" lorsque l'on tente de référencer les variables directory, user ou bien location. Dans leur livre "Writing Secure Code", édité par Microsoft, Michael Howard et David LeBlanc mentionne ce point: « Ne supposez jamais que votre application s'exécutera dans un nombre limité de contextes. Il y a de grandes chances qu'un utilisateur l'exécutera dans un environnement encore inconnu de vous. Supposez au contraire que votre code s'exécutera dans un context des plus hostiles, et concevez, codez et testez vos programmes en conséquence ». Aussi désagréable que cette recommandation paraisse, une bonne nouvelle est que le langage LotusScript permet de réaliser cet objectif.&lt;br /&gt;&lt;br /&gt;Une manière efficace de protéger nos variables est de les déclarer en lecture seule, malheureusement un telle instruction n'existe pas en LotusScript. Une solution à ce problème existe cependant depuis la première mouture du Langage LotusScript implémentée dans Notes version 4, bien qu'elle n'ait rarement sinon jamais été publiquement exposée sur la Toile. En effet, la documentation LotusScript dissimule le fait que les propriétés peuvent être implémentées dans les bibliothèques de script au même titre que les fonctions et les routines. Il n'est pas nécessaire de passer par une classe pour définir une propriété comme le montre le code suivant :&lt;br /&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; directory &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesDatabase&lt;br /&gt;&lt;/span&gt;     &lt;span style="color:blue;"&gt;Set&lt;/span&gt; directory &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; &lt;span style="color:black;"&gt;NotesDatabase&lt;/span&gt;&lt;span style="color:blue;"&gt;(&lt;/span&gt; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;server&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;filepath&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:blue;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' directory&lt;br /&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;' OU&lt;br /&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt; m_user &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesName&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;br /&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; user &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesName&lt;br /&gt;&lt;/span&gt; &lt;span style="color:blue;"&gt;    Dim&lt;/span&gt; session &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; &lt;span style="color:black;"&gt;NotesSession&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;   Set&lt;/span&gt; m_user &lt;span style="color:blue;"&gt;=&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; &lt;span style="color:black;"&gt;NotesName&lt;/span&gt;&lt;span style="color:blue;"&gt;(&lt;/span&gt; session&lt;span style="color:blue;"&gt;.&lt;/span&gt;UserName &lt;span style="color:blue;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;   Set&lt;/span&gt; user &lt;span style="color:blue;"&gt;=&lt;/span&gt; m_user&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' user&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt; Lors d'un déréférencement accidentel de variables globales définies ainsi dans les bibliothèques de script, les développeurs sont alertés lors de la compilation. Ainsi l'instruction &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color: blue;"&gt;Delete&lt;/span&gt; directory&lt;/span&gt; est interceptée par le compilateur qui affiche "Agent: Routine: n° ligne: &lt;agent&gt;&lt;routine&gt;&lt;n°&gt;&lt;agent&gt;&lt;routine&gt;&lt;n°&gt;DELETE not valid on: DIRECTORY" alors que l'instruction &lt;span style="padding: 3px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9;"  &gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt; user &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: purple;"&gt;Nothing&lt;/span&gt;&lt;/span&gt; génère le message "&lt;bibliothèque&gt;&lt;bibliothèque&gt;Bibliothèque: Routine: n° ligne: &lt;routine&gt;&lt;n°&gt;&lt;routine&gt;&lt;n°&gt;PROPERTY SET not defined for: USER", sauf à définir l'accesseur suivant :&lt;br /&gt;&lt;/n°&gt;&lt;/routine&gt;&lt;/n°&gt;&lt;/routine&gt;&lt;/bibliothèque&gt;&lt;/bibliothèque&gt;&lt;/n°&gt;&lt;/routine&gt;&lt;/agent&gt;&lt;/n°&gt;&lt;/routine&gt;&lt;/agent&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property &lt;/span&gt;&lt;span style="color:blue;"&gt;Set&lt;/span&gt; user &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesName&lt;br /&gt;&lt;/span&gt;  &lt;span style="color:blue;"&gt;   Set&lt;/span&gt; m_user &lt;span style="color:blue;"&gt;=&lt;/span&gt; user&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' user&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt; Cette technique répond à toutes les situations excepté celle de &lt;span style="PADDING:3px; FONT-FAMILY:sans-serif; FONT-SIZE:9pt; COLOR:black; BACKGROUND-COLOR:#ffffee"&gt;&lt;font style="COLOR:blue"&gt;&lt;span style="COLOR:#000000"&gt;&amp;lt;object&amp;gt;&lt;/span&gt;.Remove&lt;/font&gt;&lt;/span&gt;. Des cas particuliers existent pour chaque application et nécessitent le recours à la programmation défensive afin de protéger les objets d'un déréférencement involontaire par instruction &lt;span style="PADDING:3px; FONT-FAMILY:sans-serif; FONT-SIZE:9pt; COLOR:black; BACKGROUND-COLOR:#ffffee"&gt;&lt;font style="COLOR:blue"&gt;Delete&lt;/font&gt;&lt;/span&gt; ou &lt;span style="PADDING:3px; FONT-FAMILY:sans-serif; FONT-SIZE:9pt; COLOR:black; BACKGROUND-COLOR:#ffffee"&gt;&lt;font style="COLOR:blue"&gt;Set&lt;/font&gt;&lt;/span&gt; , ou bien à travers la méthode &lt;span style="PADDING:3px; FONT-FAMILY:sans-serif; FONT-SIZE:9pt; COLOR:black; BACKGROUND-COLOR:#ffffee"&gt;&lt;font style="COLOR:blue"&gt;&lt;span style="COLOR:#000000"&gt;&amp;lt;object&amp;gt;&lt;/span&gt;.Remove&lt;/font&gt;&lt;/span&gt;.&lt;br /&gt;En recourant aux propriétés dans les bibliothèques de script, il est possible d'implémenter une logique applicative complexe :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;La propriété "directory" peut traduire une recherche au sein d'une concaténation de carnet d'adresses d'entreprise ou bien des répertoires agrégés et/ou partiels&lt;br /&gt;&lt;/li&gt;&lt;li&gt;La propriété "location" peut se ré-initialiser seule chaque fois que nécessaire alors que le dé-référencement par &lt;span style="PADDING:3px; FONT-FAMILY:sans-serif; FONT-SIZE:9pt; COLOR:black; BACKGROUND-COLOR:#ffffee"&gt;location&lt;font style="COLOR:blue"&gt;.&lt;/font&gt;&lt;font style="COLOR:blue"&gt;remove&lt;/font&gt;&lt;/span&gt; demeure indétecté à la compilation comme à l'exécution :&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;div   style="border: 1pt dotted black; padding: 15px; color: black; background-color: rgb(255, 255, 238);font-family:sans-serif;font-size:9pt;"&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:blue;"&gt;Get&lt;/span&gt; location &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:black;"&gt;NotesDocument&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; m_location &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:purple;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt; &lt;span style="color:green;"&gt;' instancions une copie mémoire de location&lt;br /&gt;&lt;/span&gt;  &lt;span style="color:blue;"&gt;       Set&lt;/span&gt; m_location &lt;span style="color:blue;"&gt;=&lt;/span&gt; directory&lt;span style="color:blue;"&gt;.&lt;/span&gt;createDocument&lt;br /&gt;&lt;span style="color:blue;"&gt;       Call&lt;/span&gt; directory&lt;span style="color:blue;"&gt;.&lt;/span&gt;GetView&lt;span style="color:blue;"&gt;(&lt;/span&gt; &lt;span style="color:black;"&gt;"Locations"&lt;/span&gt; &lt;span style="color:blue;"&gt;)&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;getDocumentByKey&lt;span style="color:blue;"&gt;(&lt;/span&gt; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;Value&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:blue;"&gt;)&lt;/span&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;CopyAllItems&lt;span style="color:blue;"&gt;(&lt;/span&gt; m_location &lt;span style="color:blue;"&gt;)&lt;br /&gt;&lt;/span&gt;    &lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;br /&gt;&lt;/span&gt; &lt;span style="color:blue;"&gt;   Set&lt;/span&gt; location &lt;span style="color:blue;"&gt;=&lt;/span&gt; m_location&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Property&lt;/span&gt; &lt;span style="color:green;"&gt;' location&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt; N'attendez pas plus longtemps ! Introduisez dès maintenant ces pratiques simples de la programmation orientée objet au sein de vos bibliothèques de scripts en code procédural !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-3332885238221163271?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/3332885238221163271/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=3332885238221163271&amp;isPopup=true' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/3332885238221163271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/3332885238221163271'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2007/02/code-scuris-et-programmation-dfensive.html' title='Code Sécurisé et Programmation Défensive'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-116413904931126505</id><published>2006-11-21T20:53:00.000+01:00</published><updated>2007-02-25T15:27:52.345+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LotusScript'/><title type='text'>Histoire oubliée du LotusScript</title><content type='html'>&lt;div align="right"&gt;&lt;strong&gt;ou LotusScript en Mode Console&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Préambule&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;La version 4 de LotusScript, intégrée au sein de Lotus Notes et Domino depuis la version 5, mentionne les deux constantes LSI_THREAD_MODULE et LSI_THREAD_CALLMODULE comme arguments de la fonction GetThreadInfo(), Cependant elles ne permettent aucunement l'affichage du module courant ou du module appelant comme le stipule la documentation de Domino. Elles semblent n'avoir d'utilité ni dans Notes/Domino ni dans SmartSuite, au moins à la lumière des essais que j'ai réalisés. La seule situation ou ces constantes fonctionnent est le LotusScript en mode console. Lancer LotusScript en mode console signifie exécuter des fichiers .lss hors des environnements de Notes ou de SmartSuite. J'ai créé des interpréteurs de LotusScript - pour les plateformes Windows 16-bits et 32-bits - en ayant recours aux kits d'installation des versions précédentes de Lotus qui utilisaient initialement le LotusScript. Vous trouverez ci-après comment construire ces interpréteurs.&lt;br /&gt;&lt;br /&gt;Le fichier .zip ci-joint contient les fichiers et instructions permettant l'installation d'un « lnterpréteur LotusScript 2.01 pour Windows/16 » qui fonctionne encore sous Windows/32. Lisez les documents A propos et Aide et constatez comme les instructions lsi_info(3) et lsi_info(13) fonctionnent parfaitement ! Ouvrez le contenu du fichier .zip avant de lire plus avant. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.openntf.org/Projects/codebin/codebin.nsf/CodeByDate/0EFBF2E859F3862B8625722D006BB832/$file/LotusScript.lang%202.01%20for%20Windows16.zip"&gt;LotusScript.lang 2.01 for Windows16.zip&lt;/a&gt; (795 Kbytes)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Exécution de l'Exemple&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Le document A Propos contient l'aide en ligne "en anglais" de la version 2.01 de LotusScript.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Le document Aide contient les binaires de l'interpréteur à extraire en C:\LSI comme suggéré.&lt;/li&gt;&lt;li&gt;Exportez la bibliothèque « Module » dans ce même répertoire sous le nom Module.lss&lt;/li&gt;&lt;li&gt;Lancez la commande « LSIRUN Module.lss » et observez le résultat&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Histoire Oubliée du LotusScript&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;lsi_info(3) et lsi_info(13) sont documentées depuis la version 4 de LotusScript - c'est à dire Notes/Domino version 5 - en tant que GetThreadInfo(LSI_THREAD_MODULE) et GetThreadInfo(LSI_THREAD_CALLMODULE). Vous avez constaté, et tous les développeurs Domino avec vous, que ces deux valeurs produisent des résultats inutilisables, que l'on se serve de Notes/Domino ou de SmartSuite. Cependant rappelez-vous que le LotusScript fut initialement intégré dans le produit Lotus Improv maintenant disparu, alors que dans sa version 2 il accompagnait un autre produit défunt appelé Notes ViP. Je suis porté à croire que lsi_info(3) et lsi_info(13), bien que jamais documentées, servaient en mode console et devinrent inutiles par la suite au sein de la version 4 de Notes, alors qu'IBM/Lotus ne remarquait pas leur utilité disparue lors des développements des IDEs de SmartSuite et Domino Designer.&lt;br /&gt;&lt;br /&gt;Vous suivez toujours ! Voici comment construire un interpréteur LotusScript - Aussi RIDICULE que celà soit !&lt;br /&gt;&lt;br /&gt;Récupérez de vieux CDs d'installation des versions 4.5 ou 4.6 de Notes - je ne suis plus très sur à propos de la version 5 - et interrompez l'installation de Domino après la décompaction des premiers binaires et avant de répondre aux options de configuration. Vous avez maintenant, présents sur votre disque, les fichiers temporaires constituant le moteur d'un interpréteur de LotusScript avec lequel jouer. Copiez le répertoire temporaire d'installation en C:\LSI, annulez l'installation et vous voilà prêt à écrire des sources .lss que vous exécuterez avec LSIRUN.EXE.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PS:&lt;/strong&gt; Notez comme le sujet de la programmation orientée objet (POO) était très proprement documenté dans l'aide en ligne pour cette version 2 de LotusScript, alors qu'il disparut de l'aide de Domino: Une autre omission malheureuse d'IBM/Lotus lors de l'inclusion du LotusScript dans Domino version 4.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-116413904931126505?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/116413904931126505/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=116413904931126505&amp;isPopup=true' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/116413904931126505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/116413904931126505'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2006/11/histoire-oublie-du-lotusscript.html' title='Histoire oubliée du LotusScript'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37350501.post-116299251090836626</id><published>2006-11-08T14:28:00.000+01:00</published><updated>2006-11-10T16:56:58.860+01:00</updated><title type='text'>Lotus corniculatus</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/1966/3676/1600/lotusjaune.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/1966/3676/320/lotusjaune.jpg" border="0" /&gt;&lt;/a&gt; Le Lotus Jaune est un blog communautaire sur Notes &amp; Domino, Sametime, SmartSuite et/ou les technologies collaboratives jaunes d'IBM. Le Lotus Jaune n'est pas un journal personnel.&lt;br /&gt;&lt;br /&gt;Le Lotus Jaune est communautaire car partageable avec toute personne, tout utilisateur ou développeur, souhaitant communiquer librement ses connaissances ou découvertes à propos des solutions Lotus.&lt;br /&gt;&lt;br /&gt;Commentez cette note en précisant votre adresse e-mail, par exemple pierre POINT dupont AT domaine POINT fr. Vous pourrez alors diffuser vos trucs ou astuces dans ce blog.&lt;br /&gt;&lt;br /&gt;PS: &lt;a href="http://pages.infinit.net/francg/jaunes_ete_1.htm"&gt;Plus sur les fleurs de nos jardins&lt;/a&gt; et un &lt;a href="http://www.tintin.free.fr/aventures/voirbd.php?choix=lotus"&gt;petit clin d'oeil à un autre Lotus&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37350501-116299251090836626?l=lotusjaune.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lotusjaune.blogspot.com/feeds/116299251090836626/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37350501&amp;postID=116299251090836626&amp;isPopup=true' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/116299251090836626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37350501/posts/default/116299251090836626'/><link rel='alternate' type='text/html' href='http://lotusjaune.blogspot.com/2006/11/lotus-corniculatus.html' title='Lotus corniculatus'/><author><name>Alain H Romedenne</name><uri>http://www.blogger.com/profile/02870481308516705695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
