| |
| |
| |
|
Page: 1 2
Comments:
<0> it just reports the element that has been selected <0> each element contains data about the parent <0> about the parent tree <0> and some ***ociated data of which it doesn't know anything <0> it's just ***ocitated <0> it would be wrong to know anything about that data, cuz it would lock it only to that place, I would need another cl*** defined for other kind of data <1> yeah, go ahead to rewrite the tree code everytime <0> well that's what I would do if I'd just p*** objects to it <1> ok,I give up. you just don't get it. <0> this makes more sense to me myTree.AddItem(obj.name, 1, obj); then myTree.AddItem(obj);
<0> the second version is bad design <0> and that's what you're suggesting <0> what if the next objects that I want to add to the tree have another format? <1> then you ****s by p***ing all kind of crap to the tree <0> what if on the next line I want to do myTree.AddItem(someOtherObj.ThisObjsName, 2, someOtherObj); <0> come on... <1> the tree only need to understand 1 type of object p***ing in, a object like a tree node that only the tree need to understand <0> it's a tree, it just has to show some stuff and manage some actions, click, fold, unfold <0> nothing more <0> that's what it understands <0> what am I saing in here? <0> the third parameter is just some user defined data that is ***ociated with the node <0> that's how I can p*** any kind of objects to it <1> than you make the tree try to understand your user defined object, according to you, that is a bad design <0> no <0> that's what you said <0> that's exactly what I'm NOT trying to do, a tree node contains only this data: parentNode, parentInstance, text, AdditionalData <1> I saying this [12:08] <1> the tree only need to understand 1 type of object p***ing in, a object like a tree node that only the tree need to understand <1> I am not talking about any custom stuff <0> then this myTree.addNodes(objs); doesn't make too much sense, because I don't care about it's objects eather <0> well, then we're talking about the same thing <0> I just know that when I get the onselect event raised, in the object I'm receiving I have an XData set which is my original data that I p***ed to it <1> well, I p***ing a whole chunks in, I don't care it is using innerHTML or not, I did that, my job is done, not need to get the node out, set some more stuff to the nodes <0> it would get complicated <1> complicated <> bad, and It is not complicated at all <0> of course it is, you want me to reset all the nodes? <1> you said you wnat to reset it, not me. the tree I am using have fine control which part I want to update <0> that would mean that I have to get trough each node, change some things to it, check if it has some other nodes, if it does and the new element has too, I should change those too, if I have additional nodes I should add them, if I have less I should remove the ones that remained in there <0> I don't want to update anything, I can update any element easyly <0> I want to clear it, and add new data to it <2> hey guys... has anyone written a javascript registry objec or something similar that keeps track of all existing objects... im talking about custom objects ofcourse, one of the things im finding as i develop with js is a need for some sort of container object that i can p*** to functions that require the use of existing objects... <0> I belive you can find the objects defined under window <0> let's see <1> sometimes I just use a hashtable to hold them for quick access <2> sk8ing` you mean window.myobj ? <0> not sure, but ya <1> if you declare that in global scope
<2> yeh that works <2> is that ok to do it like that though... <2> from a design point of view <1> it is ok <1> but it will be annoying to looping in there to find what objects are there <2> hmmm, not nessesarily... i can have a registry object that does that <2> so i just call window.registry.getObject('objname') <2> something like that... and it finds the object i want and returns it <1> not really what is your use case, it seem over kill <0> you could use window['object'] or if you want a function for it: function getObject(obj) { return window[obj]; } <0> or getObject(obj) { return window[obj] ? window[obj] : null; } <0> depends on how you want it <1> don;t stuff tomm much stuff in global scope <1> s/tomm/too <2> cool... ill have a think about it.... and see <2> thanks for your help though :) <0> I would simply use window.ojbectName because if the object is not an object, is just a primitive value <0> doing var x = getObject('myObj'); x = 10; will have no effect <0> or if (!x) x = new Array(); <0> in fact... x = new Array(); won't have the desired effect anyhow <0> but you got the point <1> i don't think getObject may sense, you delcare it , you must know the name <0> ya, it's kinda useless <1> if x is never been declare, is it silly to ask for x? <1> that's why I don't get what he really want to do. <3> greetings, anyone online ? <4> \o/ <5> any idea on how I can switch two nodes with out having to .cloneNode them? because cloneNode looses any additional info added to that node <5> oh, found a way <5> by mistake... you can't tell that it would work from the docs <5> elm.insertBefore(elm.childNodes[i], elm.childNodes[i - 1]); it switches them <1> swapNode <5> oh, cool <1> and find a swapnode script for ff <5> but it's not a function :/ <5> oh <1> it is in ie <5> doesn't work too well in IE <5> it looses styles <5> and additional data <5> and the insertBefore method is not working in IE as it works in FF <6> when I print a page using window.print() i get he page along with title of the page, page number, URL ad date. How can I avoid printing these items? <7> that's in your printer's settings i guess <4> ++ tlm
Return to
#javascript or Go to some related
logs:
#squid #MissKitten #chatzone #c++ #MissKitten #c #skype mmcache sql refresh kittycanon #c++
|
|