Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 8th, 2025, 9:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Don't Understand ..to disc file and Write to Text file? Help
PostPosted: February 4th, 2010, 11:19 pm 
Offline

Joined: January 20th, 2010, 10:10 pm
Posts: 10
Sorry to be a pain... just confused as to which I should use as they both seem to do a similar thing..

the action of..
Write to Disc File
or
Write Text to File

Whats the difference. Ive tried both to store info from a quiz and they both appear to do a similar thing.. Which should I use and is one better than the other???

btw.. I have noticed that I can ONLY save Text Input field text that is stored in a variable to the Disc File as there is no option for transferring the content of a variable to the Text to File option!!!

thanks

I have 5.5 XE


Top
 Profile  
 
 Post subject:
PostPosted: February 5th, 2010, 4:20 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
btw.. I have noticed that I can ONLY save Text Input field text that is stored in a variable to the Disc File as there is no option for transferring the content of a variable to the Text to File option!!!

here is what the Help File (useful) has to say.
Quote:
The Write to Disk File action allows you to write information in a variable to a disk file. A disk file is a plain text file (a file with the .txt file extension).

Note:

You can write to the same disk file as often as you like. In other words, information from a variety of variables (or even the same variable which may have new data in it) can be appended to the end of the disk file. Alternatively, new data can overwrite the existing data on the disk file.

There is also a Write Text to File action if you want to enter text in a file without using a variable to store the data.

My take on it is that the creators of Opus products realized that having a way to handle these subtly different situations... would help developers.

Maybe I can explain it another way, although the following references using opusscript... you may get the idea.
I can have a TextObject. If I originally set it up using 'Insert Variable' when I am building a Page... then all I have to do it change the value of the variable and ALL the text in the box will be updated.
However, another method or approach I may choose to use is to initially fill the Text Object with some static text. Later when the Pub is running, I may use textObject.SetSelection( Start, End ) and textObject.GetSelection( ) commands --- to select a portion of whatever text is in the object... and then use textObject.ReplaceSelection( StringValue ) to 'insert' or 'append' etc. whatever changed text I want. That could be a few characters, or many pages of text.
The point being.... how much granularity do I want for this operation.

That is the nice thing about Opus, there is a great level of detailed control if I want it, and then there are simplified actions in this case to replace the whole content simply with a change of the variable.

I think that is analogous to your situation with writing to a file (or to disk).

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: thanks
PostPosted: February 5th, 2010, 3:35 pm 
Offline

Joined: January 20th, 2010, 10:10 pm
Posts: 10
thx for the explaination. I think I was reading too much into them. Simple when you know how. thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group