Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md is pretty incomplete. #62

Closed
jon-m-craig opened this issue Apr 25, 2022 · 7 comments
Closed

README.md is pretty incomplete. #62

jon-m-craig opened this issue Apr 25, 2022 · 7 comments

Comments

@jon-m-craig
Copy link
Contributor

In README.md, in the "Creating and Writing an X12 File" section there are numerous lines of the form "addElement(segment, "01", "00");" ... There is no such method (and the object upon which the method is supposed to exist is left off) - may want to fix this, as users of this library will find themselves stuck (as I am).

@ctmay4
Copy link
Member

ctmay4 commented Apr 25, 2022

Sorry about that. Looks like the code was refactored and the README didn't get updated. It currently says:

Segment segment = new Segment("ISA");
addElement(segment, "01", "00");

and should be

Segment segment = new Segment("ISA");
segment.addElement("01", "00");

I'll update the README.

@jon-m-craig
Copy link
Contributor Author

Sorry about that. Looks like the code was refactored and the README didn't get updated. It currently says:

Segment segment = new Segment("ISA");
addElement(segment, "01", "00");

and should be

Segment segment = new Segment("ISA");
segment.addElement("01", "00");

I'll update the README.

Excellent - I was in the process of creating a helper method in the class I'm using to play with the library, but I'll convert to segement.addElement instead.

@ctmay4
Copy link
Member

ctmay4 commented Apr 25, 2022

I just updated the README.

@ctmay4 ctmay4 closed this as completed Apr 25, 2022
@jon-m-craig
Copy link
Contributor Author

Actually, there is no addElement method on Segment that takes 2 Strings as arguments. :D

@ctmay4 ctmay4 reopened this Apr 25, 2022
@ctmay4
Copy link
Member

ctmay4 commented Apr 25, 2022

Ugh. You are correct. You need to pass an Element, which does have a 2 string constructor. I will fix the README.

@ctmay4
Copy link
Member

ctmay4 commented Apr 25, 2022

By the way, you can look at the file SegmentTest.java to see examples.

@ctmay4
Copy link
Member

ctmay4 commented Apr 25, 2022

I updated the README and added a helper method to Segment that takes two strings. However I am not ready to do a release. So for now you will need to do the new Element constructor.

@ctmay4 ctmay4 closed this as completed Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants