Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Nov 2008 01:12 Edited at: 18th Nov 2008 18:10
Originally, I wrote this in DBC for a challenge but thought I'd rewrite it with DBP with a few improvements (UDTs are my friends) and a better look.

Change the setDir() function to a path you want to browse. You can use the scrollbar or the mouse wheel and move the divider bar to resize the split pane. The right side will be used for file preview and info. There's a place for a menu, not yet completed. Can't change directories yet either, that's next on the list.

I wanted to get some early thoughts on the UI from you guys.




Edit: Version 0.2
Be sure to correct the setDir() path.


Nov. 18
Version 0.3 coming soon. Features currently in that build are video preview support and a few minor fixes. Image and Sound support is next on the list before the next release.


Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Nov 2008 14:28
Does it require any plugins? I get an error at line 170.

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Nov 2008 16:52 Edited at: 16th Nov 2008 16:52
No plugins, just plain old DBP 5.8 I believe is what I have.

Blah, looks like not all the code copied to the page. Try the snippet now. If you still get an error, let me know what it says.


Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 16th Nov 2008 17:10
Ok different error than last time at line 234 (Array does not exist or array subscript out of bounds)



A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Nov 2008 17:10 Edited at: 16th Nov 2008 17:54
Phaelax looks good, however trying to run it 7.1. beta 6 it does not like this line

rem display file name
text tx+_listTextOffset, ty, capLength$(fileList(index).name, _listWidth-_listPadding)

comes up with runtime error 118 like out of range or it seeing zero.

edit
snap!

edit 2

seem to need a setdir for it to work first time. will not run if setdir is not used.

Dark Physics makes any hot drink go cold.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Nov 2008 20:25
Ok guys, try changing this line:
_endingIndex = _startingIndex + _showCount-1

To this:
[i]_endingIndex = getMin(_startingIndex+_showCount-1, array count(fileList()))


I'm on my mac until I get home, but I think this might fix the problem.


Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 16th Nov 2008 20:32
Still nothing (same error), I wonder whats cause this, I would dive in and try to find the problem but it would take ages without full understanding of your code. Hope you get home soon, would like to see this in action.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Nov 2008 20:44 Edited at: 16th Nov 2008 20:49
@Sasuke

In line 59 change it to this,


or

replacing ??? with your login name name.

it should then work.

Dark Physics makes any hot drink go cold.
Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 16th Nov 2008 20:55 Edited at: 16th Nov 2008 21:02
Edit,
HowDo your right, if you change it to this "C:/" then it does run, strange. Anyway it look good so far

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 17th Nov 2008 06:55
Quote: "if you change it to this "C:/" then it does run, strange."


It's not that strange, you can only use this unchanged if you have a login on your PC using the same name as Phaelax. If you don't, that folder location does not exist and will error out.

3700+ Athlon 64 - Geforce 7600 GS - 2GbDDR2 RAM - 40Gb Hdd (In this pc) - Windows Vista Ultimate (x86)
Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 17th Nov 2008 19:41
Mobiius, I know, but before I edited my post I changed it to "C:\Documents and Settings", but it didn't run, thats what I though was strange.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Nov 2008 22:10
The problem revolved around directories where the list of files displayed was shorter the the viewable height of the list window (which I hadn't tested). Problem should be fixed and it should also run without the need for calling setDir(). (although the program would appear useless)

Also fixed a bug with the divider bar and changed some other code to make the whole thing a little more modular. Theoretically, you could have multiple windows, however, there's only a single array which holds the file data.

New code is posted in the first post above.


Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Nov 2008 00:59 Edited at: 20th Nov 2008 01:00
Updated code, you can watch previews of movie files. For mp3/wav files you'll get a neat (but fake) spectrum graphic. Can't play the music yet, didn't put in the UI for it yet.

Version 0.2.4



Login to post a reply

Server time is: 2025-08-08 11:54:07
Your offset time is: 2025-08-08 11:54:07