![]() |
SourceResource ?
hy all,
i have seen that in most of the XML files we have a referer value named SourceResource but sometimes like : SourceResource="images/..." and SourceResource="/images/..." or Source="images/..." and Source="/images/..." what is really the difference ? i assume that normally, the xml files seems to make like HTML and in case of ="Images/" point to UI/[personnal ui folder]/Images" but if it's not the same think is the ="/" point to /UI ? the goal of this question is what SourceResource= i must used to point to the Iages directory of the default UI if i don't have changed images ? hope to be enough clear :p |
Sometimes "Images/" doesn't work for me, but "/Images/" always does. *shrug*
|
"images/" is what's called a relative reference. In theroy the UI looks for a child object named "images". I'm guessing the UI is smart enough to know some paramaters are only refering to external images and looks in the images directory, but on many things it doesn't know if you're refering to a child UI object or the images directory.
"/images/" is what's called a root reference. The begining slash tells the UI to go to the root first, then look for a child named "images". Presumably it understands all root references to "images" as an external directory reference. Might get confused if you made a page off of root called "Images". Source appears to be reserved for ImageFrames. SourceResourse appears to be used for every other image reference /shrug. Probably just a coding inconsistancy in the rendering engine. |
In my coding experience:
Images/ /Images/ ./Images is all the same ../Images is one directory under the current, then to images. |
Quote:
In virtually every other pathing scheme I've seen ../ takes you up 1 lvl to the parent directory. Doesn't seam to work in EQ2 land, but "parent" does. |
Code:
Base FolderIf I was inside File1 and I wanted to use icons1.tga from the Icons folder, it would be like this: ../Images/Icon/icon1.tga If I wanted to call upon File 1.ini I could use: /INI FIles/FIle 1.ini INI FIles/FIle 1.ini ./INI FIles/FIle 1.ini /shrug |
Wow, that totaly doesn't jive with my Perl, UNIX, JavaScript, HTML, or DOS experience. In all those cases
"/" is top of tree "./" is same branch "../" is parent. In your example ../images would result in busted image links since the Images directory is off the root, not off the subfolder containing your file. Likewise /INI Files would break since that directory isn't off the root. |
Maybe I'm explaining it wrong, but what you said confuses me :D
|
| All times are GMT -5. The time now is 06:16 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI