PDA

View Full Version : Linked List Tool / Helper



kryton9
24-05-2008, 08:17
I made a new tool tonight to help with what I am working on and liked it enough to want to share it with you guys.
There is a help.html file that shows how to use it.

This app helps you generate linked list files that you can store externally to your applications.
This way you don't have to hard code such lists in your program and can update or make changes
to such things easily without messing up any existing code.

Updated the file to correct the mistakes pointed out by Eros. Thanks for catching them Eros.

ErosOlmi
24-05-2008, 10:52
Big thanks Kent.
Can I add this script to official thinBasic distribution?

_________________________________________________
Just 3 notes on this source:

better to use app_sourcepath instead of DIR_GetCurrent. DIR_GetCurrent can return a path different from the script path.
at the end
DIALOG END %formLinkedListHelper
should be
DIALOG END hDlg

DIALOG NEW PIXELS , 0, "Linked List Helper", 0, 0, 192, 366, %WS_SYSMENU, %formLinkedListHelper TO hDlg
I do not understand the use of %formLinkedListHelper. In that position there is the dialog extended style attribute. A dialog as no ID like a control. I think %formLinkedListHelper can be removed from the script.



Again a big big thanks for the examples you are posting. Very nice, well written, clever.
I like your commenting style ;)


'---+------------------------------------------------------+
'---| MAIN PROGRAM |
'---+------------------------------------------------------+


Ciao
Eros

Petr Schreiber
24-05-2008, 11:53
Thanks Kent,

nice program, I didn't know LLs can be saved/loaded to/from file.

Eros, the commenting style is definitely output of Kents Remmer, I use it quite frequently too for serious work :)


Petr

kryton9
24-05-2008, 20:06
Glad you guys liked it and I will make changes to thinForm to fix those errors Eros, thanks for catching them.
I am using Remmer for the comments. I finally settled on that look, I have been changing it so often. Sometimes **** looks good or ===== but in the end they look heavy with certain colors when I change my color settings.
This one sometimes looks light again depending on the color, but better light than heavy I think :)

updated the upload with corrections.

Michael Hartlef
25-05-2008, 13:11
Nice tool. I'm surprised that you can save/load them too but I think it is because of the nature of an interpreted language, or?

ErosOlmi
25-05-2008, 13:39
Well, no.
It is just a functionality that read strings from the linked list and save them to disk (only data of course not memory address links)
When needed, load function read a previouly save file and creates a new linked list on the fly getting strings from file.