From: Pascal B. <pa...@dy...> - 2000-11-17 18:38:23
|
Haven't looked at your code yet, but just a fast note that I recently (last weekend) uploaded a new set of widgets to work with the latest DynAPI (atleast tested with Dynacore) so if you have older widgets you'll probably need to update. sorry, but that's all for now (haven't got much time :) Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Peter Curran > Verzonden: vrijdag 17 november 2000 17:09 > Aan: dyn...@li... > Onderwerp: [Dynapi-Help] Problems with DynAPI2 and Dynacore > > > I am having some problems trying to use some of the features of the > Dynacore widget package. I'm hoping someone can give me a few tips to get > going. I am using the 2000.11.7 release of DynAPI2, and (AFAIK) the most > recent versions of the Dynacore widgets. I'm relatively now to > Javascript, > and while I have spent some time attempting to fix these problems, I've > probably missed something obvious to someone with more experience.... > > I have created three HTML files, forming a page with two frames, named > "menubar" and "coolpage" (working from the DynAPI Tutorial, Part 6). > > First, when I try to using my page in Netscape 4.73, I get the following > Javascript error: > > JavaScript Error: > file://C:/Tools/DynApi2/dynapi/js/dynapi.js, line 52: > DynDocument is not defined. > > This refers to a line in the loadHandler function. I have tried various > things to work around this, but no luck. It appears to be a problem with > the order in which things are loaded, but I haven't found the way around > it. The stuff works in IE5.5, with the exception of the next problem. > > The second problem is that I cannot get the "label" widget to > work. Nothing > appears on the screen, no matter what I try. Most of the other > widgets seem > to do roughly what I expect, but this one, presumably the simplest of the > bunch, has me stuck. I can work around this in various ways, but > I'm hoping > that getting an understanding of what is wrong here will help me > understand > more of JS and DynAPI2 in general. In the code below, I also include a > button widget that seems to work fine. > > Anyhow, here are the three pages I am using. I have stripped them down as > much as I can to demonstrate the problems. To avoid problems to anyone > whose mail client displays HTML, I have changed all less-than > characters to > '[[' and greater-than characters to ']]' - to try the pages > you'll have to > substitute them back. Also, the two path names at the top of menubar.htm > will have to be changed to match your setup. > > Thanks very much for any help. I'm quite impressed with DynAPI and the > Dynacore package, but they could sure use some documentation!!! > Maybe I'll > get some time to contribute something... > > ======== Demo.htm ======================= > [[html]] > [[head]][[title]]DynDocument framesets[[/title]][[/head]] > > [[frameset cols="158,681" rows="*"]] > [[frame src="menubar.htm" name="menu"]] > [[frame src="coolpage.htm" name="page"]] > [[/frameset]] > > ======== coolpage.htm =================== > [[html]] > [[head]][[title]]Cool page[[/title]][[/head]] > > [[body]]Sample GUI page...[[/body]] > [[/html]] > > ======== menubar.htm ==================== > [[html]] > [[head]][[title]]Our menu[[/title]] > [[script language="Javascript" > src="file://C:/Tools/DynApi2/dynapi/js/dynapi.js"]][[/script]] > > [[Script language="Javascript"]] > > myDynAPIPath = "C:/Tools/DynApi2/dynapi/" > > DynAPI.setLibraryPath(myDynAPIPath + "js/lib/") > DynAPI.include('dynapi.api.*') > DynAPI.include('dynacore.gui.style') > DynAPI.include('dynacore.gui.label') > DynAPI.include('dynacore.gui.button') > > DynAPI.onLoad=function() { > coolpage=new DynDocument(parent.page) > > testlabel = new CoreLabel(20, 40, "Label") > coolpage.addChild(testlabel) > > testbutton = new CoreButton(20, 80, null, null, "Button", null) > coolpage.addChild(testbutton) > > testbutton.onClick = function () { > testbutton.style.font.color = > (testbutton.style.font.color == "Red") ? > "Blue" : > "Red" > testbutton.repaint() > } > } > [[/script]] > [[/head]] > > [[body]]Menu Page[[/body]] > [[/html]] > > -- > Peter Curran Software Developer Casebank Technologies Inc. > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > |