使用 Real Studio 创建某种类型的文件
我正在使用 Real Studio 为一种特殊的文件类型制作一个编辑器。我使用文件类型编辑器创建了文件类型,但是如何为该文件类型创建文件输出流?目前我正在使用:
DIM f AS FolderItem
DIM t AS TextOutputStream
f = GetFolderItem(fileName)
t = TextOutputStream.Create(f)
t.Write theData
t.Close
但这不会创建可由我的编辑器打开的文件。我正在寻找这样的东西:
DIM f AS FolderItem
DIM t As FileTypes1.MyFileType.OutputStream
f = GetFolderItem(fileName)
t = FileTypes1.MyFileType.OutputStream.Create(f)
t.Write theData
t.Close
I am making an editor with Real Studio for a special kind of file type. I made the file type with the File Type Editor, but how can I make a file output stream for that file type? Currently I am using:
DIM f AS FolderItem
DIM t AS TextOutputStream
f = GetFolderItem(fileName)
t = TextOutputStream.Create(f)
t.Write theData
t.Close
But that doesn't create a file openable by my editor. I am looking for something like this:
DIM f AS FolderItem
DIM t As FileTypes1.MyFileType.OutputStream
f = GetFolderItem(fileName)
t = FileTypes1.MyFileType.OutputStream.Create(f)
t.Write theData
t.Close
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
TextOutputStream 只会创建文本。您需要找出您尝试创建的格式定义类型,并使用 BinaryStream 复制它。有关 BinaryStream 的更多信息,请访问 http://docs.realsoftware.com/index.php/二进制流。
The TextOutputStream will only create text. You'll need to find out what the format definition is of type you're trying to create and duplicate it using the BinaryStream. More information about the BinaryStream can be found at http://docs.realsoftware.com/index.php/BinaryStream.
我刚刚将其添加到我的代码中:
以便我的应用程序识别这些文件。
I just added this to my code:
so that my application recognizes the files.