On 5 Oct 2010, at 16:53, George Hovey wrote: Connor, David The answer, briefly, is that we can't tell you what are the more useful objects, because only you know what interests you. I'm sure that some objects are used more than others and that a few are used particularly often. Someone somewhere ought to have an idea on the 2% top used java objects. You don't need to read Java code. You do need to explore the Java API by reading it's Javadoc documentation. You don't use the Javadoc program itself, you just look at its HTML output files describing the API, which can be downloaded from Sun/Oracle, with your browser. Ah, another one of those 'manuals' This requires that you know how the find you way around the browser display to locate packages, classes, properties and methods. You also have to understand the nature of Java's data types, both native and Object. Here we go again. It's all very well telling me that I have to understand something. But where is the straight to the point piece of documentation that tells me just what I need to know without all the platitudes, adverts for how wonderful everything Java is, masses of irrelevant info, and java programs? Then you are ready to invoke any Java class that strikes your fancy None of them 'strike my fancy'. I need an easy method of identifying which ones do what I need. from NetRexx and without the use of Java code (you are using only NetRexx objects which are, with a few weasel words, identical to Java's). Absolutely!!!!!! If success of NetRexx is what we want to achieve we need to create a relatively painless way to use java's objects, not just a painless language that invokes Java's objects. Re-read the last three paragraphs a few times, and then some more times, and do the same tomorrow. This is the important issue. If we don't get this right, we may as well accept the inevitable demise of NetRexx. (although the old IBM Red Book could be so described). The information in the previous paragraph should be there but in much expanded form, with screen shots etc. If you would be willing to contribute time to advancing this cause, I am available, and I think others, certainly David, will contribute. I propose that we find out what is require to "bootstrap" you into Java API awareness by doing it step by step. This will give us the information to produce a fair stab at the article "Using the Java Class Library in NetRexx" in "The NetRexx Cookbook". I would be glad to act as recording secretary in collecting materials. I also have Adobe Acrobat (writer) to produce a PDF. That is the most positive statement I have heard on this forum. I don't really have the time, but I am good at critiquing books, and this is an important and worthwhile activity. So yes, I'll do it in byte sized pieces. A gui equivalent of the Hello World program (okay with a bit more functionality) might be the place to start. On 5 Oct 2010, at 17:19, Quique Britto wrote: I ended up purchasing a Java Book as I find the Javadoc too much for my eyes. Looks useful. However we handle this, I think that we need ONE Guide that contains everything the new user needs, rather than a whole bunch of documents and tutorials that partly overlap each other, and leave gaps between them. That guide could be online if we need online functionality, but my preference would be for a printable guide that is not competing for screen real estate when we are trying to work, and allows the user to see how much material there is (rather than it seeming as if there is no end in sight as with online tutorials). Also, one can write notes on printed guides. I would suggest that we use some form of online document that allows multiple people to edit so that it can be a collaborative effort, eg if I see an easy change or addition, I can make it myself, if something is not clear enough, I can say so (perhaps in another colour). Any contributor could add clarity where necessary. I think that Google Documents is supposed to be a bit like that, but there may be a better mechanism (one that tells everyone what has changed, when it has changed). In a way, we are in a good starting position. Since I last downloaded NetRexx, jEdit etc, I have purchased a new laptop. So there is nothing to do with NetRexx installed. The Guide can therefore start from scratch and I can test whether it takes me painlessly form zero to everything working. Last time I suffered pain to do with classpaths. Perhaps the guide can ensure that the pain is removed. My laptop is a Mac, I also have a PC running XP and one running Windows7, so I can test the system setup on three common environments. We should seek permission to use whatever existing materials (eg red book) there are. In the guide, we should not leave the newbie thinking "what the h*** does that do" eg: menubar_he = [ "File", "Edit", "Info" ] loop i=0 to 2 menubar[i] = JMenu( menubar_he[i] ) mb.add( menubar[i] ) end The comment is fine for the block of code. But is does not explain what the function JMenu is doing or why. Lets make this happen, Connor. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
The code:
-- define menu headers (use loop) menubar_he = [ "File", "Edit", "Info" ] loop i=0 to 2 menubar[i] = JMenu( menubar_he[i] ) mb.add( menubar[i] ) end gives this in jEdit Program test.nrx Program current.nrx [C:\Program Files\jEdit\Untitled-1 4 10 7] Error: Cannot assign to a term that is not a variable or property [C:\Program Files\jEdit\Untitled-1 5 10 2] Error: The method 'mb.add(java.awt.MenuBar[])' cannot be found in class 'current' or a superclass [C:\Program Files\jEdit\Untitled-1 2 6 10] Warning: Variable is set but not used Program testbin.nrx === class testbin === function main(String[]) Program iosample.nrx Bobh PS: I have nothing to contribute except 'time on my hands.' AND I CERTAINLY THINK IT'S A WORTHWHILE PROJECT. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by FreeFall
--- Saludos / Kind regards. David Requena El 06/10/2010 12:34, Connor Birch escribió:
I fail to see in which way the scene you describe resembles what I'm proposing you. You keep implying you'll need several books while I'm proposing a single source of information for the java class library: The library specification.
I support George's point. Which classes are useful to you depends on what you are trying to accomplish. That said, I suppose the more often used classes might be the ones at package java.lang. That includes String, Vector, HashTable, etc. Bear in mind that this does not mean these are the more useful by any means.
NO. Just the ONE manual. Will you bother yourself to point your browser to http://download.oracle.com/javase/6/docs/api/index.html and see what's in there? You'll be shown a list of all packages in the library with short descriptions. For instance: java.lang Provides classes that are fundamental to the design of the Java programming language. Clicking the package name will bring a documentation page for the package and present a similar list for the classes in the package. When you click on a class name... well, you know the drill...
It's called The NetRexx Language, by MFC With this and the java library specification you should be all set.
And how could that be? what "strikes your fancy" at any given time depends on what you actually need to do. Lets say you wanted to write something to a file. You open the spec, go to index and lookup the word "file" which brings the class "File" in package java.io. There you go!
Looks like you are asking a lot from us while simultaneously stating that you don't have time and that you are good at critiquing other people's work. Let me ask you.. Are you also good at arranging reasonable salaries for people doing the things you want? ;-)
Your example would just reveal a lack NetRexx knowledge, not java or its library. Having no "something." in front, that "function" is a constructor (note 1). It's building an instance of some class which could be one defined in other NetRexx file, in some third party jar file included in the classpath, or even a java library class (which it happens to be). Until any individual acquires the NetRexx proficiency to see this, there is no point in trying to explain how class javax.swing.JMenu works. At this point, that individual will be able to check which imports are in effect and make his way to http://download.oracle.com/javase/6/docs/api/javax/swing/JMenu.html Note 1: Could also be some static method in some class when the appropiate "uses" clause appears at the definition of the class where it's being used. Again, this is pure NetRexx.
Let me insist. IMO GUI programming is a no-go for any introductory text to any programming language. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Robert L Hamilton
Bob,
This seems to be a tiny excerpt from a bigger program. It certainly cannot compile by itself. --- Saludos / Kind regards. David Requena El 06/10/2010 13:19, Robert Hamilton escribió: The code: _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by FreeFall
How about taking this off line/list.
From: [hidden email] <[hidden email]> To: IBM Netrexx <[hidden email]> Sent: Wed Oct 06 08:23:54 2010 Subject: Re: [Ibm-netrexx] Learning Java's Objects This seems to be a tiny excerpt from a bigger program. It certainly cannot compile by itself. --- Saludos / Kind regards. David Requena El 06/10/2010 13:19, Robert Hamilton escribió: The code: _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Hi all,
part 1 in this series reads clearly. This series will show how Java programs can be written in Netrexx using the Java Swing package, this series is not a Netrexx or Java language tutorial, these can be found easily on the internet. It is assumed that some object oriented programming and Netrexx background is known, I have only been using Netrexx for less than a year and I do not consider myself an expert but someone who reads, searches and is always willing to learn therefore feel free to correct anything you believe that should be done another way in any of the examples by sending an [hidden email] to me. The code shown is part of the program, again at the bottom of the page is clearly shown. Full code to the above can be seen here, this concludes the "using the JMenuBar in Netrexx", part 4 will show how create and add a Toolbar to our program. The series is as short cut to know how to do it and not to how it works, there is a big difference. When I started to learn Netrexx these type of shortcuts were very helpful to me and I hope these can be helpful to others. Quique On 6 October 2010 14:27, Measel, Mike <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by David Requena
With the test pgm working -- I would like to display the date but NetRexx has no date function. So at the Oracle page 'Date' didn't help and I found Calendar. So where and what do I add to get the date ??? It's still not clear to me where on the import statement you use .* or just .
bobh On Wed, Oct 6, 2010 at 7:22 AM, David Requena <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
currentdate = Date()
say currentdate On 6 October 2010 16:10, Robert Hamilton <[hidden email]> wrote: With the test pgm working -- I would like to display the date but NetRexx has no date function. So at the Oracle page 'Date' didn't help and I found Calendar. So where and what do I add to get the date ??? It's still not clear to me where on the import statement you use .* or just . _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by FreeFall
Connor,
Everyone here wants to help, but you are a hard case because you adamantly refuse to credit the experience of others who have acquired the knowledge you crave . Please allow me to provide a (constructive) critique of your views, as I understand them. It seems to me a chicken and egg situation: you ask for implausible means of getting control of GUI code because you have an incorrect view of the relationship between these matters, but reject the one means that would clear up the misconceptions, namely acquiring some Java basics. You want a special manual, containing no extraneous matter, to tell you how to construct a GUI under NetRexx. David has explained on more than one occasion that a GUI is absolutely the wrong thing to attack first, because it has tricky aspects that are unrelated to Java or NetRexx, and implies lots of invisible infrastructure. But let us take GUI programming to be the goal. You show a GUI program fragment and remark "The comment is fine for the block of code. But it does not explain what the function JMenu is doing or why." Correct, but that is because JMenu is a complicated entity. Since you are OO-aware, you know that objects have associated methods (functions). A quick check of JMenu's javadoc shows 54 methods. Also, JMenu has to mesh with a complicated framework involving other Java classes. There is no way we could provide you with an account boiling them down to "just the ones you need to know," because all are needed in some context or other. There have been several well intentioned efforts here to help you and others "kick start" GUI programming by providing small annotated examples that purportedly demystify it. But IMO they all have the drawback of inevitably leaving out more than they explain, with the result that your efforts to extend them will fail for no obvious reason and require further explanations, seemingly ad infinitum. I know you have been pointed at more comprehensive efforts at this, but they are beyond my competence to evaluate. Perhaps one will answer your prayers. However, that need for a more methodical way to acquire the requisite Java knowledge is real, and there may be a way out. That is to construct your manual as links to available resources, ordered logically, and with a running commentary putting them in context. I think, but have not explored the issue in any detail, that the main component of these links, at least the early ones, should be selected elements of Sun's Java Tutorial. Sun has a pecuniary interest in promoting Java, and this concentrates minds. They have been working at attempting to convert the programming world for a long time (with resounding success), and I suspect their tutorial has received a lot of feedback which they have taken under advisement. So this strikes me as the most promising avenue. We cannot provide a printable version because Sun/Oracle does not allow redistribution, but you can print anything you like for your own use. We could try to construct such a "virtual manual" on our own, but it would suffer from our lack of a fresh perspective. The result would be much better if it had feedback from its target audience as it is constructed in real time. I think you and Bob Hamilton have an opportunity to make a valuable contribution to NetRexx 3.0 But this can't be sugar coated. To reach the point of writing GUI code you must acquire specific knowledge and skills. All we can do is reduce the noise level as you do so. Pace Euclid, there is no royal road to GUI. Do you want to proceed? On Wed, Oct 6, 2010 at 6:34 AM, Connor Birch <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Robert L Hamilton
you might want to download Rexx2Nrx from www.Rexx2Nrx.com, which *does have* the Rexx Date Function in it's run-time-package... Thomas. ========================================================= Am 06.10.2010 16:10, schrieb Robert Hamilton: With the test pgm working -- I would like to display the date but NetRexx has no date function. So at the Oracle page 'Date' didn't help and I found Calendar. So where and what do I add to get the date ??? It's still not clear to me where on the import statement you use .* or just . --
Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com _______________________________________________ Ibm-netrexx mailing list [hidden email]
Tom. (ths@db-123.com)
|
Free forum by Nabble | Edit this page |