Source language: Translate to:

Embedded files - ca nt find them

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Embedded files - ca nt find them

Postby Hans » Tue Mar 19, 2002 3:54 am


I made a pub which is working as a helpfile.
It contains 3 windows
Window1 = a RTF file with the main menu keywords and will always show up
Window2= a VAR [file2] with the sub-menu keywords
Window3= a VAR [file3] with the actual explanation
The keywords in the RTF files are hyperlinks, calling a new file to show up either in [file2] or in [file3]
All files are embedded into the pub as an article window ( hidden0 , so when compiling all files are compiled within the exe.
Normally, compiling the pub, all references to call a file are set to [PubDir], unless it’s a fix reference with the   “!” in front of the reference.
However, using hyperlinks in the RTF files, the reference will remain as it is written in the hyperlink.
Even when I change the reference in the hyperlink ,f.e. C:\Neobook\project\help.rtf,  into [PubDir]help.rtf, the file will not be found when compiled.
I’am doing something wrong and it must  be obvious, but I ca’nt figure out at this moment
Who can give me the solution ?
Thanks in advance.


Embedded files

Postby HPW » Tue Mar 19, 2002 10:02 am

Hi Hans,

I am not sure what you want to do.

In neobook we are working internal with pages. From an embedded RTF file you can use a "gotopage" action or a "bookmark". Therefor no external path is required. An other problem would be to load an external RTF into an article object with hyperlinks/pathnames relativ to the pub. Therefor it would be necessary to write the RTF at runtime from neobook to a file.

(Edited by HPW at 12:03 pm on Mar. 19, 2002)

Embedded files

Postby Jim Brammer » Tue Mar 19, 2002 10:31 am

It looks like you're trying to combine two different methods. Internal & External. If each of your RTF articles are in their own text object then they are embedded and the way to display them would be to Move & Show that particular text object into view.

Using a [Var] to accomplish this is an External method. The RTF files, as HPW pointed out, would need to remain outside the publication. In this case, use a single text object that contains a variable instead of a path and use SetVar to display that article in the text object.

Using the External method, again like HPW noted, you could FileWrite each RTF file as needed, or simply use the ExtractFile command to extract all your pre-made RTF files at runtime. (Check first to see if they exist - if False then Extract - if True then skip...)

I hope that made sense.
Jim Brammer

Embedded files

Postby Hans » Wed Mar 20, 2002 1:10 am

Hans-Peter, Jim,

Yes, I mixed up Internal/External.
Lets say, it was one of those days..............

Thanks for puting me back on the rails.


Embedded files

Postby Carlos Torres » Wed May 22, 2002 7:47 am

It will be nice to have a file.RES posibility in NB as it is used in VB.
I was trying to build an app loading differents text files depending on different parameters and they are allways out of the app.
The answer was to use different hidden articles but they don't work properly. Using a new page for each one seems to me a waste of resources.
Carlos Torres

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 0 guests