What's up, RMers?
Dir.chdir should only be used whenever you're dealing with separate Ruby Ruby files like pure Ruby or Rails projects do. That's something I learned while working with Gosu. Yet, require works normally so there's no real need to use it more than once at best. HiddenChest uses an open source library to create a fake file system that only includes your game files, meaning it's not hard to find them no matter if you're talking about Graphics or Audio stuff.

I guess that's why I was curious Thinking about why you'd be interested in giving a shot to Dir.chdir even temporarily.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply
Your statement doesn't show much in curiosity into why the use of Dir.chdir. The bulk of it is actually a statement showing that you had learned to limit its use when you began working with Gosu and insight into Hiddenchest's file system. It appears your curiosity is an afterthought.

But as towards your curiosity, I will answer.

I was not the first to use Dir.Chdir. Others had in the past. When DerkJan (or MeTm at HBGames/CreationAsylum) created his initial McSendString music looping system, it came with an editor written in Ruby that allowed the user to set loop start and stop points. And as it could affect audio within the four audio subfolders (BGM, BGS, ME, SE), he used Dir.chdir to allow switching between those subfolders.

In 2012, DuongCool inquired if anyone had the required Audio.dll file used by an ATOA(Victor Sant) script entitled "Não reinciar Música do mapa após uma batalha" (or "Do not restart Map Music after a battle") which used an audio module provided by Poccil.

There are plenty other scripts out there that use Dir.Chdir. That is not a justification of its use. It is solely an explanation as to why I first used it within my widgets project. And I will not rebuke other scripts that put it to use.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply
Now we're REALLY working!

[Image: attachment.php?aid=2883]
Clearly showing I have a lot of RM2K games filed away somewhere on Drive G

Drive List box status: CHECK
Folder List box status: FUNCTIONAL

I only give it 'functional' because I believe I need to set up something to re-adjust the scroll bar params when switching between one list of folders and another, the quantity change and all.

Meanwhile, the folder list will 'not' show folders with file extensions (RB_System.logs, AVSys.Bak, etc.) and any folder with a '$' at the start, these typically assumed to be important system directories and should be left alone.

Next up? The Files Widget...... Joe Cool


Attached Files Thumbnail(s)
   
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply
Well, I got FILES working  Joe Cool

[Image: attachment.php?aid=2885]

I superimposed a closeup of the Drive, Folder and Files box to show image graphic functionality.  You can see nice orange circles around the graphics to the left of the filenames, and matching file extensions.  Indeed, a Zip file graphic is displayed when any file with the zip. gz and zipx formats are used.  Likewise, jpg and variations have their own image format.   

If no file has a recognized format, a blank doc-like glyph will show.

AND for the unaware, you may notice that the Glyph next to my E: Drive has a faint red dot displayed rather than the green dot for drives C: and D:.   This because it is a Flash drive, and neither an internal nor external hdd/ssd.

There is more work to be done of course.   Creating an option to set file parameters such as having the filebox keyed only to search .rxdata files, or a list of files (.bmp, .png, .jpg)..  File limters. :D   And likely a dropdown just for that as well.

And I do need to see about removing the condensed text appearance in the boxes.  It is annoying.


Attached Files Thumbnail(s)
   
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply




Users browsing this thread: 14 Guest(s)