From: Nuno F. <nun...@wi...> - 2001-01-11 16:53:05
|
Hi people, Like I said in a previous posting, I started to compile a list of DynAPI methods and functions (and afterwords I will add the properties). For now I only have a list, based on the latest snapshot, using Richard's Fast Tree Widget. What I need now, is for you people in the know, to take a look a that list, and tell me about mistakes or incorrections. Also, I need some comments as to what items should be excluded from the list due to being internal methods or functions, because the main goal of the reference is to help beginners and not cause even more confusion. Comments are welcome! Of course, a downloadable version in PDF or TXT will be created when the deed is done :) The list is at http://www.wiz.pt/users/nf/dynapiref/dynapi_ref.html Best, NunoF ps. Richard, the list takes 23 seconds to build on my computer, probably because that's a lot of nodes, but each time I do a reload it takes longer each reload (i'm using IE 5.5 on Win2k). I concede it can be a mistake on my part, but it sure is weird, cause when I close all browser windows, open a new one and reload, it cames back to 23 seconds... |
From: Jordi 'I. M. <jmi...@or...> - 2001-01-11 17:14:45
|
Nice. The effect you mention has nothing to do with DynAPI. It is a browser issue. Hopefully using the new precreation code will speed things up. Moreover, the SMI menu interface I just finished should be able to optimize this alot. Nuno Ferreira wrote: > Hi people, > > Like I said in a previous posting, I started to compile > a list of DynAPI methods and functions (and afterwords I > will add the properties). > > For now I only have a list, based on the latest snapshot, > using Richard's Fast Tree Widget. > > What I need now, is for you people in the know, to take > a look a that list, and tell me about mistakes or incorrections. > > Also, I need some comments as to what items should be excluded > from the list due to being internal methods or functions, because > the main goal of the reference is to help beginners and not cause > even more confusion. > > Comments are welcome! > > Of course, a downloadable version in PDF or TXT will be created > when the deed is done :) > > The list is at http://www.wiz.pt/users/nf/dynapiref/dynapi_ref.html > > Best, > > NunoF > > ps. Richard, the list takes 23 seconds to build on my computer, probably > because that's a lot of nodes, but each time I do a reload it takes longer > each reload (i'm using IE 5.5 on Win2k). > I concede it can be a mistake on my part, but it sure is weird, cause when > I close all browser windows, open a new one and reload, it cames back to > 23 seconds... > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Nuno F. <nun...@wi...> - 2001-01-11 18:39:54
|
>Nice. The effect you mention has nothing to do with DynAPI. It is a browser >issue. Hopefully using the new precreation code will speed things up. >Moreover, the SMI menu interface I just finished should be able to optimize >this alot. Send it on, Maestro! I'm always game to try new stuff, particulary if it's faster! :) NunoF |
From: Richard :o <ma...@ri...> - 2001-01-11 19:11:28
|
Hi, Basically you're effort is great, but: >the list takes 23 seconds to build on ... That would be totally useless as a tool in that case, and you'd have to use something else than treewidget. But that's not the case, either you didn't read the documentation properly, or I didn't explain it very well. IE uses a lot of memory if it has to render a lot of layers, and it doesn't flush the memory on reload. So the point of my tree widget is, that the contentLayers, ie the ones with all the links in them, are written together on one layer, only the nodes use their own layer. So once you have added a node to the tree like this: main=DynRef.add('Dynapi'); you add all your links like this: main.addNodeContent("setLibraryPath") main.addNodeContent("mountplugin") main.addNodeContent("include") main.addNodeContent("onload") main.addNodeContent("onunload") main.addNodeContent("onresize") And then tell the tree you've finished adding links like this: main.closeContent() Now main.addNodeContent("onresize") has two more parameters, one is the url, and one the image, so in this case it might be nice to show some information about the node onclick, instead of loading a link: main.addNodeContent("onresize","javascript: showInfo(\'This event is' +' fired when the browser is resized, and should recreateAll in NS, ' +'but doesn\'t always\'),"images/mainNode.gif"); ../.. ../.. etc function showinfo(node){ infoLayer.setHTML(node) } So the infoLayer should display the info on each node, and there would be a little icon infront of the link. If you get what I mean. Another thing is that you're using the latest release I suspect, instead of the latest snapshot (or my one), so you are documenting some extensions that don't exist any more, like sprite.js. That's the down-side of a hard-coded reference, it's already out of date on the day of release. That's why I made DynAPIDiagnose, which is included on each example, and gives you all the parameters available real-time. the problem is it gives all the browser-native properties as well, and I haven't as yet found how to limit it to only DynAPI methods. It's also very buggy, I'll be rewriting it with the fast-treeview widget once I understand all this precreation stuff, and the new widgetmodel. Of course if you are willing to update it regularly, I'd be more than happy to put it on the site (or mirror it) if you want. Oh, I almost forgot to say, I already rewrote it with the correct code, it renders in about 4 seconds now (download time not included) check here: http://www.resass.f2s.com/?menu=examples&node=10 If you decide to finish this job, it might be worth considering if you can't include the values from text files or something (or through php), so you don't have to edit your html each time. This is what I did for my "examples" tree, all the code is written on the fly by a php script, which checks the contents of directories on the server, and adds the nodes it needs. Cheers, Richard :o ma...@ri... www.richardinfo.com (Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2) ----- Original Message ----- From: "Nuno Ferreira" <nun...@wi...> To: <dyn...@li...> Sent: Thursday, January 11, 2001 5:52 PM Subject: [Dynapi-Dev] DynAPI Reference... > Hi people, > > Like I said in a previous posting, I started to compile > a list of DynAPI methods and functions (and afterwords I > will add the properties). > > For now I only have a list, based on the latest snapshot, > using Richard's Fast Tree Widget. > > What I need now, is for you people in the know, to take > a look a that list, and tell me about mistakes or incorrections. > > Also, I need some comments as to what items should be excluded > from the list due to being internal methods or functions, because > the main goal of the reference is to help beginners and not cause > even more confusion. > > Comments are welcome! > > Of course, a downloadable version in PDF or TXT will be created > when the deed is done :) > > The list is at http://www.wiz.pt/users/nf/dynapiref/dynapi_ref.html > > > Best, > > NunoF > > ps. Richard, the list takes 23 seconds to build on my computer, probably > because that's a lot of nodes, but each time I do a reload it takes longer > each reload (i'm using IE 5.5 on Win2k). > I concede it can be a mistake on my part, but it sure is weird, cause when > I close all browser windows, open a new one and reload, it cames back to > 23 seconds... > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > ____________________________________________________________ > Get your free domain name and domain-based e-mail from > Namezero.com. New! Namezero Plus domains now available. > Find out more at: http://www.namezero.com > |
From: Nuno F. <nun...@wi...> - 2001-01-12 12:58:37
|
Hi Richard, >But that's not the case, either you didn't read the documentation properly, >or I didn't explain it very well. Nahhh, just my lazy side showing :) Seriously, I didn't read it carefully enough. Thanks for explaining it clearly. I'm rewriting it now. >Another thing is that you're using the latest release I suspect, instead of >the latest snapshot (or my one), so you are documenting some extensions that >don't exist any more, like sprite.js. Yup. I didn't know if everybody (like me) always goes for the beta instead of the latest release. So I played it safe. :) Anyway, I did it in PHP/MySQL but I come across some problems setting up the online database, so I opted for a HTML version of it for now. But the next version will definitely be PHP driven (as you could see it's a lot of methods!) >Of course if you are willing to update it regularly, I'd be more than happy >to put it on the site (or mirror it) if you want. Yeah, I'm willing to do update it, though at this stage it's just a list of methods. I will appreciate if you mirror it, as long as people understand that right now it's work in progress (but then again, what isn't?). Of course what I want is for each link to have it's own page, describing it with parameters and examples. That's another reason that I used the latest release and not a beta, to have a stable (in terms of functionality) version to develop on. >Oh, I almost forgot to say, I already rewrote it with the correct code, it >renders in about 4 seconds now (download time not included) >check here: Yikes! That's... wonderful. Thanks Richard! >If you decide to finish this job, it might be worth considering if you can't >include the values from text files or something (or through php), so you >don't have to edit your html each time. This is what I did for my "examples" >tree, all the code is written on the fly by a php script, which checks the >contents of directories on the server, and adds the nodes it needs. I've got a version of it working locally on my comp that accesses a MySQL database where all the nodes are stored in a tree (each node or link has a ID, and a parent_ID, with parent_ID=0 being a top node). But I still have some problems with the recursive function that I use to build the tree. I will be working on it more thouroughly though, and building a simple backoffice to update it more easily. thanks for excelent help, Nuno Ferreira |
From: Richard :o <ma...@ri...> - 2001-01-12 14:08:07
|
Hi, >But I still have some problems with the > recursive function that I use to build the tree. I will be working on it... In case it can be of aid, I'll just explain how I build the tree from php: I cut out all the code which checks file-dates etc, just left ideas for building the tree: <?php function listall($dir){ print("node=myTree.add('$dir');\n"); //This prints the first subnode, don't forget the \n for new line $handle = @opendir($dir) or die("Directory \"$dir\"not found."); //In my case this opens a directory, you would open the DB before the function while (false!==($file = readdir($handle))) { // read all files in dir, you would loop through the records $myImg="nodeImage.gif"; //You could get this value from a record. print("node.addNodeContent('$file','javascript: popup(\'$dir/$file\',\'new\')',$myImg);\n"); //This writes the content, (we are looping through the records) //The first parameter == nodeCaption //the next one is the url, I call a javascript function on the page (client-side) //the main problem is \'ing the right parentheses (') //the last one is the node image. //so after processing the source looks like this: //node.addNodeContent('the node title','javascript: popup(\'send any parameters here\')','nodeImage.gif'); }; print("node.closeContent();\n"); //After the while loop we close the node content. closedir($handle); //In my case this closes the directory, you would close the //DB after all the nodes have been added }; ?> //end of php Note: I don't actually change the node name, because the dynlayers name themselves anyway, and we don't need to reference these childlayers afterwards. then in you DynAPI source you do this: myTree = new RiFastSkinTreenode(50,50,400,'DynAPI2 Examples',theme,25) myTree.setColor("#123456") //start php script to insert directory values into tree <? listall('../Richard_Examples'); listall('../Pascal_Bestebroer_Dynacore_Examples'); listall('../Dan_Steinman_Examples'); listall('../il_Maestro_Examples'); listall('../Martin_Strom_Examples'); listall('../Peter_Dvorsky_Examples'); listall('../Henrik_Vaglin_Examples'); listall('../Glen_Deas_Examples'); listall('../Christopher_Go_Examples'); listall('../Nuno_Ferreira_Examples'); ?>; //end php script to insert directory values into tree scrollobj2 = new ScrollPane(myTree) // tree will be set as the content scrollobj2.setSize(500/q,420/q) scrollobj2.moveTo(250/q,200/q) scrollobj2.setBgColor('#000000') DynAPI.document.addChild(scrollobj2) myTree.setVisible(true) function popup(mylink, windowname) //code to load the url into a loadpanel to display the info } That's about it, I'm sure you know most of this anyway, and there's many ways to do it. If you could document how you access the mySql database, and write contents to the tree, I'll make a section on php/DynAPI, 'cause I haven't tried that myself yet. Sorry to burden the rest with +-unrelated code. Cheers, Richard :o ma...@ri... www.richardinfo.com (Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2) ----- Original Message ----- From: "Nuno Ferreira" <nun...@wi...> To: <dyn...@li...> Sent: Friday, January 12, 2001 1:57 PM Subject: RE: [Dynapi-Dev] DynAPI Reference... > Hi Richard, > > >But that's not the case, either you didn't read the documentation > properly, > >or I didn't explain it very well. > > Nahhh, just my lazy side showing :) > Seriously, I didn't read it carefully enough. > > Thanks for explaining it clearly. > I'm rewriting it now. > > >Another thing is that you're using the latest release I suspect, instead > of > >the latest snapshot (or my one), so you are documenting some extensions > that > >don't exist any more, like sprite.js. > > Yup. I didn't know if everybody (like me) always goes for the beta instead > of the latest release. So I played it safe. :) > Anyway, I did it in PHP/MySQL but I come across some problems setting up the > online > database, so I opted for a HTML version of it for now. But the next version > will > definitely be PHP driven (as you could see it's a lot of methods!) > > >Of course if you are willing to update it regularly, I'd be more than > happy > >to put it on the site (or mirror it) if you want. > > Yeah, I'm willing to do update it, though at this stage it's just a list of > methods. > I will appreciate if you mirror it, as long as people understand that right > now it's > work in progress (but then again, what isn't?). > > Of course what I want is for each link to have it's own page, describing it > with parameters and examples. That's another reason that I used the latest > release > and not a beta, to have a stable (in terms of functionality) version to > develop on. > > >Oh, I almost forgot to say, I already rewrote it with the correct code, it > >renders in about 4 seconds now (download time not included) > >check here: > > Yikes! That's... wonderful. Thanks Richard! > > >If you decide to finish this job, it might be worth considering if you > can't > >include the values from text files or something (or through php), so you > >don't have to edit your html each time. This is what I did for my > "examples" > >tree, all the code is written on the fly by a php script, which checks the > >contents of directories on the server, and adds the nodes it needs. > > I've got a version of it working locally on my comp that accesses a MySQL > database > where all the nodes are stored in a tree (each node or link has a ID, and a > parent_ID, > with parent_ID=0 being a top node). But I still have some problems with the > recursive function that I use to build the tree. I will be working on it > more > thouroughly though, and building a simple backoffice to update it more > easily. > > thanks for excelent help, > > Nuno Ferreira > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > ____________________________________________________________ > Get your free domain name and domain-based e-mail from > Namezero.com. New! Namezero Plus domains now available. > Find out more at: http://www.namezero.com > |