|
Craig, sorry for the delay in answering. Let me try to build on what Edmund provided. First, to get help for the framework, the easiest way is to edit a java file, even a new one via CODEEDIT DUMMY.java, and then select Help, Java help, SmartGuide Framework. There is a tutorial there to get you going. The source for the smartguides IBM ships is in samples.jar, in the wdsc\java directory. The easiest way to expand a jar file, is to configure Windows so WinZip is listed as one of its editors, and just use WinZip on it. Do this from the options pulldown in the Windows explorer, if I recall correctly. Else, the readme file that Edmund mentions describes how to use the jar command from the jdk for this. Now, all this being said, and while I commend you for looking to learn the new stuff, the smartguide framework may or may not be the best strategic thing to learn if your goal is to write macros for the Java lpex inside WDSC. First, a little history on editor macros. The classic lpex editor (which the CODE Editor is based on) has always had support for writing macros in REXX. These are really rexx files that use embedded editor commands (the editor has a couple hundred commands). With the exception of the one LINEREAD command the editor supplies, there is no UI capability with these macros. CODE adds to the base editor commands support for accessing remote iSeries commands and lists via the CODESRV command. It is a windows executable launchable using a command in rexx for running external executables, or using the start command supplied by lpex. Late in CODE's life, we added support to write macros using Java. This entailed making all the editor's commands available as Java methods in a single class the editor supplies. These, under the covers, call the existing editor commands written in C. This Java ability works pretty good, and offers the ability to exploit all of Java's GUI support for writing user interfaces. However, it is just a Java graft onto the underlying C code. The SmartGuide framework is merely an extension of the Java support to help you "get going" quickly when you want a UI in the form of a wizard. In WDSC, we have re-written the lpex editor completely from scratch, in Java. That means that all those editor commands are available as pure Java methods in a series of Java classes. There is documentation in WDSC about these methods. However, compared to the classic Java, there are some major differences: #1. These methods are not identical to what they were in classic Java, due to the fact they now adhere to Java naming standards, and because we took the opportunity to re-architect some stuff based on what we have learned over the years in the classic editor. #2. For writing GUI, you do not use the Java-supplied Swing classes as was the case in the classic editor. Instead, WDSC is based on Eclipse, which comes with its own very robust (and much faster) set of UI classes. These include basic widgets as well as frameworks for writing wizards and dialogs and so on. So, if you ultimate goal is to write macros in the classic editor that can be used in the new WDSC lpex editor, I am afraid that is not possible. Due to the significant changes, you will have to write these new macros from scratch. Once you do though, you will start down the path of learning to write plugins to contribute cool extensions to all of WDSC, not just the editor. You see, in this new world, we have opened up the entire thing! Not just the editor. So you can add an "action" to the popup menu of a database file, for example, the presents a wizard for generating RPG source to access the database, as a tiny example. There is no limit to what you can do now! However, it can also be argued that learning to write Java macros in the classic CODE editor will help you learn some transferrable skills... eg, the list of methods supplied by the editor, while slightly different in the new editor, are still similar enough that you'll know what to look for. The smartguide framework, however, being based on Swing, will not offer too much opportunity for skills transfer. The new Eclipse wizard framework is extremely different, and much much better. However, the SmartGuide framework is still very much useful for the classic editor, so if that is where you plan to stay for awhile, then by all means learning to write smartguides is worth the investment. Hope all this helps! Phil Coulthard, iSeries Software Architect, IBM Canada Ltd. coulthar@ca.ibm.com. 905-413-4076, t/l 969-4076 ----- Forwarded by Phil Coulthard/Toronto/IBM on 09/13/2002 08:19 PM ----- Edmund Reinhardt/Toronto To: code400-l@midrange.com /IBM@IBMCA cc: Sent by: Subject: Re: Converting ReXX macros to Java macros (again) code400-l-admin@m idrange.com 09/13/2002 03:12 PM Please respond to code400-l This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hi Craig, Phil, the original author of Smart Guides, who would helped you immediately is out of the country. So let me just fill in for Phil. (pun intended) and point you to the <wdsc install dir>/java directory where all these goodies reside. You will find, not only sample.jar but also a readme.htm that will get you started. Phil has written an extensible smart guide framework with the hope that others would pick it up and make a third party industry out of all these neat GUI extensions to CODE. I am sure he could tell you a lot more when he is back about how this will integrate with JLPEX. I am afraid I am out of my depth there. hth Edmund Reinhardt, AS/400 AD Tools, reinhard@ca.ibm.com Dept 607, IBM Canada Lab TL 969-4392 Phone 905-413-4392 Oops! No subject. Let's try that again. I posted to the WDSC list about getting help writing Java macros or converting ReXX to Java for the CODE/400 Editor and mostly for the new LPEX Editor. I haven't gotten any responses in a week so I will try this list. If you are from IBM, please let me know if you don't know. I should be able to learn on my own if someone can point me in the right direction. Please help. Here is my exact post below: I am interested in converting most of my ReXX macros in CODE/400 to Java SmartGuides, Java macros, or whatever you are supposed to call them. I have found a help tutorial in WDSC\JAVA (on WDSC 4.0 SP2) on writing SmartGuides but most of the links appear to be out of date. They don't go anywhere. I see a sample.jar the help mentioned there but windows can't find it to run it. I hope that in converting to SmartGuides, I can use my macros in the LPEX editor along with CODE. I am most interested in seeing the source for the RPG Procedure SmartGuide and others. I can usually learn best by seeing working examples, like when I learned to write ReXX macros. Does my plan make sense? Anyone know where I might find help? Some of the ReXX macros written by me and others are on the midrange.com CODE FAQ. Thanks, Craig Strong
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.