re: rev 996...
loadBlock() can now add blocks before or after a specified layer *or* a specified block.
I decided, at least for now, to allow both kinds of objects as the target, without specifying their type. My code is rather simplish, and it will fail if you attempt to load before or after the 'html' layer (which actually makes sense... :lol:), but I just don't know if it's "all right" to mix the two types together at this point.
I mean... If I do it for 'before' and 'after', why couldn't a modder look for a block by its *semantic hint*?
Only, hints are for layers only. But it makes sense to have them for blocks as well. Maybe I'm going too far... Or maybe I just shouldn't use hints in the first place because it complicates things...?
I'd really, really appreciate to have Bloc's feedback as of now. I'm sure there are both problems and solutions I didn't think about...
Also -- should I add a 'rename' type of addition? i.e. take an existing block and rename it to the new block... It's effectively the equivalent of 'replace' in loadLayer() (except for blocks, of course), but I don't want to make it too complex either...
And what about removeBlock() and removeLayer() functions? Would they be helpful at all?
Bump!
Bump again...
Also, I'm having trouble with XML and WAP2.
Codebase wasn't too solid to begin with. In SMF, if you look closely at the code, even if you're in XML mode, the software will still load a lot of useless things... For instance, in PM mode, it will still load the menu code even though there's nothing to show. Even in loadTheme(), it loads tons of things related to regular theming, even after it was determined that the index template won't be needed (and thus the theme won't be useful.)
Now, the 'funny' thing in Wedge is that I had overlooked that, and thus XML and WAP2 were calling hideChrome() before the layers were actually defined. Ah ah, good times...
Anyway, now I've fixed some of it but I still have a long way to do. Can you spell "all day long"? Can you believe I started this morning by actually looking into avatar code and a firm decision to implement it today? :lol:
loadBlock() can now add blocks before or after a specified layer *or* a specified block.
I decided, at least for now, to allow both kinds of objects as the target, without specifying their type. My code is rather simplish, and it will fail if you attempt to load before or after the 'html' layer (which actually makes sense... :lol:), but I just don't know if it's "all right" to mix the two types together at this point.
I mean... If I do it for 'before' and 'after', why couldn't a modder look for a block by its *semantic hint*?
Only, hints are for layers only. But it makes sense to have them for blocks as well. Maybe I'm going too far... Or maybe I just shouldn't use hints in the first place because it complicates things...?
I'd really, really appreciate to have Bloc's feedback as of now. I'm sure there are both problems and solutions I didn't think about...
Posted: September 12th, 2011, 10:52 PM
Also -- should I add a 'rename' type of addition? i.e. take an existing block and rename it to the new block... It's effectively the equivalent of 'replace' in loadLayer() (except for blocks, of course), but I don't want to make it too complex either...
And what about removeBlock() and removeLayer() functions? Would they be helpful at all?
Posted: September 12th, 2011, 10:56 PM
Bump!
Posted: September 13th, 2011, 09:37 AM
Bump again...
Also, I'm having trouble with XML and WAP2.
Codebase wasn't too solid to begin with. In SMF, if you look closely at the code, even if you're in XML mode, the software will still load a lot of useless things... For instance, in PM mode, it will still load the menu code even though there's nothing to show. Even in loadTheme(), it loads tons of things related to regular theming, even after it was determined that the index template won't be needed (and thus the theme won't be useful.)
Now, the 'funny' thing in Wedge is that I had overlooked that, and thus XML and WAP2 were calling hideChrome() before the layers were actually defined. Ah ah, good times...
Anyway, now I've fixed some of it but I still have a long way to do. Can you spell "all day long"? Can you believe I started this morning by actually looking into avatar code and a firm decision to implement it today? :lol:



