从 netbeans 打开现有文件
我在 Netbeans 6.9 中创建了一个应用程序,我的最终目标是创建一个 .tcl 文件(或文本文件即可)。当我运行应用程序时,我创建了 .tcl 文件并将其保存在某个位置。当我第二次运行时,如果我在应用程序中打开该文件,那么我将无法获取该文件。我的意思是数据没有附加到文件中,而是替换文本。我的主要目标是仅使用创建的文本文件。但为了在我的应用程序中创建该文件,我有很多选择。任何人都可以建议我应该做什么,这样当我第二次或更晚运行我的应用程序时,我之前选择的选项(在上一次运行中)应该存在(选择),并且文本也应该附加到该文件中的更换。
我没有直接编写文本。我在应用程序中创建了按钮。如果我单击“新节点”按钮,则会出现一个对话框并询问节点名称。当我单击“确定”按钮时,会在其中写入一些文本文件,状态显示在创建节点的文本字段(在我的应用程序中)中。我希望当我打开现有文件时,我的所有状态都会显示为“已创建新节点”、“已创建新链接”等。应该在那里。另外,在我的链接按钮中,我已经创建了所有节点的名称,因此我希望当我打开现有文件时所有这些节点名称都应该存在。
I've created an application in Netbeans 6.9 where my ultimate aim is to create a .tcl file(or text file will do). When i run my application once I create the .tcl file and save it at a location. When I run the 2nd time and if I open that file in my application, then I am not able to get that file.I mean the data is not appending to the file,it is replacing the text.My main aim is to use just that text file that is created. But for creating that file in my application I've many options. Can anyone suggest what should I do,such that when I run my application the 2nd or later times then my options whatever I selected before(in the previous run) should be present(selected) and also the text should be appended to that file instead of replacing.
I am not writing the text directly.I have created buttons in my application.If i click on "new node" button then a dialog box appears and asks for the node name.When I click ok button, then some text is written in that file and the status is shown in a text field(in my application) that the node is created. I want that when I open an existing file then all my statuses like "new node created","new link created",etc. should be there. Also in my link button,I've got names of all the nodes created,so I want that all those node names should be present when I open an existing file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它与netbeans无关
Ref
It has nothing to do with netbeans
Ref