File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

save object?

 
Berty Ahern
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again, this is my last Q for today.
I wish to make an object for saving, called saving i supose but my code doesn't work for some reason. It says that it can't resolve the class saving. I can't figure it out, any ideas?Thanks
code:



Error Text:
--------------------Configuration: <Default>--------------------
C:\JAVA\TabDemo.java:129: cannot resolve symbol
symbol : class saving
location: class TabDemo
saving bookCurrent = new saving(titleTxt.getText(),descTxt.getText());
^
C:\JAVA\TabDemo.java:129: cannot resolve symbol
symbol : class saving
location: class TabDemo
saving bookCurrent = new saving(titleTxt.getText(),descTxt.getText());
^
2 errors

Process completed.


[ March 03, 2005: Message edited by: Berty Ahern ]
[ March 03, 2005: Message edited by: Berty Ahern ]
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the exact error message you get. Copy and paste is your friend. Also, this will reduce the chance of miscommunication. Many of the important details are lost when you just summarize the error you get.

Also, it would help if you use theUBB code tags when posting your code. This will preserve formatting which makes your code much easier to read. Feel free to go back and edit your original post to do this.

Layne
[ March 03, 2005: Message edited by: Layne Lund ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Berty,

In order for this code to work, you must have already written a class called saving and it must exist in the same subdirectory or package where TabDemo resides. Incidentally, java standard naming conventions indicate that the name of the class should be "Saving", not "saving", as class names are to be capitalized. If you do have a class named "Saving", then your problem is simply spelling the class name wrong, as capitalization does matter in java.

If the "saving" class is in another package such as com.mycompany.util, you must declare an import for the class as in "import com.mycompany.util.saving;"

Merrill
 
Nigel Browne
Ranch Hand
Pie
Posts: 682
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also you should change your main method so it does what your comment suggests
 
Berty Ahern
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh I see,
I was copying the code from an example which had the Saving class set up in a seperate file. I shoulda known
Thanks for the help!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic