Page 1 of 1

Define embedded files with [PubDir]

PostPosted: Sun Nov 06, 2005 11:57 pm
by HPW
It would help to be able to define an entry in the embedded file list instead of hard coded path with a path variable.

Example:

D:\NeoBook5\Plugins\hpwImage\Drag4.png

would become:

[PubDir]Drag4.png

Would allow to move to another Path-structure without redefining all embedded files.

PostPosted: Mon Nov 07, 2005 2:20 am
by domino
I agree with HPW. This would be very useful

Cheers
Dave

PostPosted: Mon Nov 07, 2005 2:51 pm
by Neosoft Support
Interesting idea. I'll add it to the list of things to consider.

PostPosted: Sun Sep 10, 2006 11:08 pm
by HPW
Also subpaths should be possible:

[PubDir]media\Drag4.png

Any chance to get into the next release?

PostPosted: Mon Sep 11, 2006 4:57 am
by smartmedia
Hi...

Very good idea...

Thanks

PostPosted: Mon Sep 11, 2006 6:05 am
by Gaev
It would make the application source (.pub) "portable" again ... as it stands, if you copy/send/upload a project (and its associated files) to another (base) folder, definitions of [Embedded] files have to be removed and re-added to reflect the new (absolute) location of the files in question ... being able to define relative (to [PubDir]) locations would be a huge improvement.

Also, someone had once suggested the need for efficiently defining Embedding of large number of files ... perhaps being able to also define something like [PubDir]Images\*.jpg would be great too.

PostPosted: Mon Sep 11, 2006 6:14 am
by HPW
...perhaps being able to also define something like [PubDir]Images\*.jpg would be great too.


When you mean that this would be only one entry in the pub source and the compiler/binder resolves the wildcard during compile time, then you got definatly my vote.

I had made test during NB5 beta phase to embedded 20000 files which was no problem for the compiler. Only the IDE has problems when editing the list. So I work out a procedure to add such huge filelist after finishing the pub-source with external tools to insert the final list.

Such a wildcard feature would eliminate such work, since only one entry would compile a huge number of file into the final app.
It would also keep the pub-size small and managable.

PostPosted: Mon Sep 11, 2006 10:35 am
by Neosoft Support
What do you envision the IDE interface for something like this would look like?

PostPosted: Mon Sep 11, 2006 11:19 am
by HPW
Maybe something like this:

Image

[Pubdir] including subdirs would get optional in standard embedding.
Wildcard embedding would be its own section.
How comfortable the wildcard can be, is also a question:
*.jpg
My*.jpg
MyTest??.jpg
etc.

Added later:
[Pubdir]media\*.jpg

PostPosted: Mon Sep 11, 2006 1:00 pm
by Gaev
The separate grid for wildcard definitions seems like a good way of specifying such items.

I am not sure how one would specify [PubDir] ... the current response from NeoBook is to pop up a FileOpen dialog box ... which demands a valid filename to be entered for the OK button.

Might be a better idea to just have an icon called "Advanced Options" (like with some other command/IDE wizards) ... and then let people enter wildcards (like *.jpg, abc*.xy*) as well as [PubDir]abc.txt and [PubDir]path1\*.jpg



However, while investigating this, I came across a problem with the current setup ... which will be compounded if/when the other methods are introduced i.e. duplicate file names ... today, you can not add to the list both of ...

c:\path1\somefile.jpg
c:\path2\somefile.jpg

... tells you that "a file with this name already exists"

Assuming [PubDir] was c:\Neo5\Project1, specifying files like ...

[PubDir]abc.txt
c:\Neo5\Project2\abc.txt
c:\Neo5\Project3\*.txt

... and assuming abc.txt existed in the c:\Project3 folder ... they would all try to embed/resolve to [Embedded]abc.txt ... resulting error message could be confusing to neophites.

Too late to change the current name transformations ... but perhaps the "Advanced Option" might allow developer to also specify a prefix string for [Embedded] files e.g.

[PubDir]*.jpg ---> [Embedded]PubDir_*

c:\Project3\abc.txt ---> [Embedded]Project3_*

... i.e. prefix string would be inserted between the [Embedded] and a separator (like _ ) ... in arriving at the name/reference of the embedded file

PostPosted: Mon Sep 11, 2006 10:25 pm
by HPW
Gaev,

good suggestions to the concept. Depends how far neosoft want to go to extend the [Embedded] feature into a faked internal filesystem.

For my big projects in the past with huge amount of embedded data, I have exactly done what you suggest. With a seperate programm I copy all content from different directorys to one directory using a naming sheme where a directory prefix make them usable for the embedded feature. Only the loader have to know what to load from which prefix.

PostPosted: Tue Sep 12, 2006 10:32 am
by Neosoft Support
Thanks very much for the detail. This is a good starting point.

PostPosted: Tue Jul 05, 2011 10:39 pm
by HPW
Since I got finally a WIN7 system I installed my neobook to a different path as of my old XP-system.
Now I have the known problem that all my embedded paths gets invalid.
In the embed-dialog a entry it is not possible to edit an entry.
Only way is a FindAndReplace with an external editor.

Any plans to add this wish here in the future?
(Relativ paths,wildcards etc.)

PostPosted: Wed Jul 06, 2011 9:44 am
by Neosoft Support
It's still on the list, but for now search and replace is your best bet.