Kathleen Tillman

Greenhorn
+ Follow
since May 09, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kathleen Tillman

I’m so sorry. I’m working in PDF. Editor software - Nuance Power PDF.  I put the question here because it’s the closest I could find that related to JavaScript.
I am creating a fillable pdf form. This script came from researching what code could be used to format multiple fields at once. Right now, if I want to update the number format I have to go to each form field’s property tab and update it. I am trying to create a code that will format the fields all at once when they are listed in an array.
My apologies.  When I originally wrote this, I thought I was just missing something simple.

What I'm trying to do is set a document level script that will automatically find an array of text fields and format them to currency as opposed to having to click on each text field and change the property.  

Everything I read said this was the function to use at the document level.  Basically, I'm trying to save myself a good amount of time since I have an exorbitant amount of fields that require a change to currency format.
I'm pretty new to this so I'm not surprised I missed that.  How do I call the function?
Hello,

So I've got the script figured out (I think) and entered into the document functions tab.  I didn't get any syntax errors, however the script doesn't actually seem to be running anything.  Here is how the code looks, can anyone see why it's not actually doing anything?



Thanks!


I'm currently trying to figure out a way to format multiple form fields in Nuance Power PDF. I found AFNumber_Format, but it's not working and I'm wondering if that's because it is proprietary to Adobe.

Does anyone know of a general way through JavaScript to do this? I have multiple fields that I need to format as currency and would rather not do this one at a time.

Thank you so much for your help!
Ok, I added the Guesses = 0 and the Guesses++ to my program. The problem I'm having (at least I think) is I can't figure out where to put the JLabel so that the integer "Guesses" will actually move up. Right now, it just shows Number of Guesses = 0 when I run the program and the number never changes. Here's what I have.
Constructor portion:


Program portion:


Any help given would be appreciated! Thanks!
Kat
14 years ago
Thank you all for your help!

I finally got the program working meaning that it actually recognizes the different numbers.

I have only one more problem and I'm hoping someone can lead me in the right direction:
I need to post how many guesses the person has attempted and I'm kind of at a loss as to how to do that.

Any insight would be great, thanks!

Kat
14 years ago
Ok, so I changed the guess problems. Thanks for the help on that!!
The problem I seem to be having though is that the program won't recognize that I've put a different number in. (i.e. I'll put the number 45 in and the program will say "Too High", so I'll put the number 33 in and it'll again say "Too High", all the way down to number 1, which will again say "Too High". Obviously my program is not working correctly somewhere, but I cannot for the life of me figure out where.

Also, I'm not quite sure I understand what you mean with the button



What would that be used for and where?

Thanks,
Kat
14 years ago
Ok, so here's the issue. I can compile and run it fine, but when I load the game, it will only take one guess and will let me go no further. In other words, it asks for my guess and I enter say "45", and it says "Too high." Well, I enter another number, but then it won't go anywhere. Can you look at the code below and help me? Also, if anyone could give me any hints as to how to show the number of guesses a user has made so far, it would be greatly appreciated. Thanks!
I was wrong, it will let me move, but the number is constantly "Too High" and won't change. Any help would be appreciated.


Add the section that makes the program run...

14 years ago
Thank you so much! That took care of the line problem.

Is there any possible way someone can also help me with the swaps and passes portion of the problem? Like I said, I have portions showing up, but I'm not sure if they are correct.

Thank you so much!

Kat
14 years ago
Thanks all for your help. I'm hoping that I'm doing this right by posting a continuing question for the same problem.
I've worked on this code all weekend to try to get it to work and I think I got most of it correct. The problem I'm having is I don't think I'm getting the passes working correctly and I'm not sure about the swaps either, though I finally am making it work as showing an answer.
The other problem I'm having is that I can't seem to get everything to print on separate lines. Can you please look at my code below and see if you see anything wrong?



This is my output...


Before sorting, the list elements are:
23 17 5 90 12 44 38 84 77 Total number of Swaps: 12
Total number of Passes: 12
After sorting, the list elements are:
5 12 17 23 38 44 77 84 90
----jGRASP: operation complete



Any help anybody could give me would be greatly appreciated.

Kat
14 years ago
Ok, I got that. Thank you. It was just a matter of moving that bracket up. One more question on this. I cannot seem to make the next line print separately. Right now the code looks like this:



and the return when I run looks like this


Before sorting, the list elements are:
23 17 5 90 12 44 38 84 77 After sorting, the list elements are:
5 12 17 23 38 44 77 84 90
----jGRASP: operation complete.



Why is it not separating the line of numbers and the "after sorting, the list elements are:"

Sorry, to ask so many questions.

Also, can you lead me to a website or somewhere that can help me when it comes to inserting a counter to count swaps and passes?

Thanks so much, Kat
14 years ago
Sure. No problem. I'm trying to post everything, right, sorry.

Here's the code. I'm not sure where the mistake is.
14 years ago
I tried that.

I copied



All I added was to change System.out.print to System.out.println instead to separate and I got this:


----jGRASP exec: java Program7
Before sorting, the list elements are:
23
After sorting, the list elements are:
5 12 17 23 38 44 77 84 90



I'm not at all sure why none of this isn't working.

14 years ago