View Single Post
  #1 (permalink)  
Old 03-28-2008, 01:10 AM
Azndaddy Azndaddy is offline
Member
 
Join Date: Mar 2008
Posts: 24
Azndaddy is on a distinguished road
[SOLVED] Delete Current line from file
Hi, can some one help me out
First of all, how do i call a command from a class
eg. my class is called Util and it contain all the necessary information to readFile and writeFile etc.

I want this class to call a command, so when i type delete in the console it would delete the current line in the file that has been open. the code for this i have at the moment are:

public class Delete extends Command2
{

public Delete(Buffer buffer)
{
super("delete", buffer);
}

public void execute()
{
Util util = new Util();
--> don't know what to do afterward
}
}

in the public void execute()
{
}
i want to be able to delete a current line from a file, but don't know how to implement it

help would be great

kind regards
Reply With Quote
Sponsored Links