openNotes() //opens latest dev notes in popup window
winshow(src,"noteswin",1) //opens the popup window
var/fileList = flist("./notes/") //makes a list of all devnote files in the 'notes' directory
usr << output(file2text(updateNotes), "noteswin.notesOutput") //outputs the current notes to popup output control
for (var/F in fileList) //lists all the devnote files, including previous ones
usr << output(F, "noteswin.notesOutput")
Problem description:
I made a little proc that grabs my latest set of dev notes (which I put in a text file) and outputs them to a popup window when my testers click a link in the "Help" menu.
I have two questions:
1) The output works fine, but the cursor starts all the way at the bottom of the text file, meaning the reader has to scroll back up to the top to read from the beginning. Am I doing something wrong, or is there a way to set the readers view to the top of the file once the text file has been sent to the output control?
2) At the end of the dev notes, I list out the list of dev note files (including all the previous versions). I'd like to be able to hyperlink each filename so if you click on it, it re-populates the output control with the contents of that file. I've tried several different variants of "a href=" links and looked around the forums and DM ref, but can't seem to find an easy way to do this. Any ideas?
I'm still learning the DM code & syntax, so these may very well be simple procs or features that I'm overlooking.
As for your second link, you want the link to link to another file. To grab that file and browse() it, you'll need to use Topic(). I'm sure you could find information pertaining to this with a quick Topic() search. Seeing as it's midnight and I'm tired, I'd rather not try to explain it to you and just confuse you more.