Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nao
7006
Features / Re: Template skeleton!
« on November 23rd, 2011, 11:32 PM »
This one's damn funny...

wetem::load('profile_top', array('top', 'default'));

Any n00b might think, 'load the top and default blocks into the profile_top layer'... When it's actually the other way around ;)

Anyway, that one reminds me that I can't even use is_array() to determine the position of $blocks in the param list... :P
Posted: November 23rd, 2011, 11:25 PM

I've converted all templates manually in about 10 minutes. So it should be doable... Just do a regex search on ::load[^)]+$ and ::load.*,
It should be enough to catch all 'special cases'...

Bed time, and Subs-Template.php is not finished yet, so I'll commit tomorrow.
7007
Features / Re: Template skeleton!
« on November 23rd, 2011, 11:09 PM »
Quote from Arantor on November 23rd, 2011, 10:59 PM
That was the point. The code should have worked but it didn't work as expected, in that the layer that (as far as I was concerned) should have been created, just wasn't being created.
Does it work if you don't execute the ::load() before it? Do you remember...?
Quote
This was something that bugged me. I saw it was cool but I couldn't quite envisage where it would be beneficial over anything else we were really doing at the time.
The main point was me learning more about singletons and non-static methods, I guess... :lol:
Quote
95% of *Wedge's* use might be that. But that means, yay, I get to fix every plugin I've written thus far that adds a block, because they all use load to add to the layers, though it would logically be better to use an add method.
Hmm... 'Oops'?
I could ensure ::load stays public, but I have a feeling that you would want to 'give the right example' and rewrite your code to use :add anyway. It's relatively fast to update, though...
Quote
Makes sense.
Well, it's easy to understand when one of the params is an array, but if it's not, it could lead to misunderstandings... Was it wetem::add('side', 'sidebar') or wetem::add('sidebar', 'side') already?
Quote
Quote
Of course, people could 'simply' do wetem::get('sidebar')->add('block1') for similar results, and with the added benefit of specifying the target layer first. I'm just... Not sure which is best right now.
I don't think the chaining really adds anything here.
My documentation for wetemItem has this:

wetem::get('sidebar_dummy')->parent()->rename('sidebar2')->inner('inside_sidebar');

:lol:
Well, I guess it's mostly interesting for the parent() function at this point. And readability.
7008
Features / Re: Template skeleton!
« on November 23rd, 2011, 10:54 PM »
Okay, a few things....

- The post above: is it still valid? I suspect so, but I never quite understood what was wrong with the code... Maybe you could dig into it again? Thank you.

- I'm not too happy with the welay object. I renamed it to wetemItem because, well, it can also hold a block, and I decided to drop the jQuery naming conventions, so I re-renamed 'append' to 'add', and 'prepend' to 'first'. Also, I renamed 'wrap' to 'outer'.

- I decided that considering there are NOT a lot of places in Wedge where we could use method chaining anyway, weitemItem will only be there 'for the show', but not actually used if we can do otherwise.

- I renamed wetem::load() to wetem::op() (operations), made it private, and added a ::load() that does the 'replace' thing. Also added ::add() and other public static stations. Given that 95% of the use of wetem is to load a full block into the default layer, I think there's no need to bother in the first place.

- I'm considering inverting the order of parameters.

wetem::add('sidebar', 'block1') would add this block to the sidebar.
wetem::load(array('block1', 'block2')) would load (not add) these blocks to the default layer.

This would allow to keep the simple syntax of the majority of calls (wetem::load('block')), while making all functions behave in a logical way -- I think it really makes more sense to have the target name first, and then whatever we want to add to it. And even more when it comes to wetem::rename('current_layer', 'new_name').

However, this MAY sound complicated or illogical to many people.
Of course, people could 'simply' do wetem::get('sidebar')->add('block1') for similar results, and with the added benefit of specifying the target layer first. I'm just... Not sure which is best right now.

Any opinions on all of this...?
7009
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 09:09 PM »
Keep me posted :)
7010
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 05:38 PM »
You may feel wrong about it, but it's not wrong. Ask the game developers, I'm sure they won't mind...
Anyway, it's up to you whether you want to be able to play your games without getting in your girlfriend's way ;)
7011
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 04:50 PM »
Ouch...

Well, we're in private, so I'll just say... You could simply download a rip of your game off thepiratebay or something ;)
If you bought it, you're entitled to a backup copy anyway...
7012
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 04:10 PM »
Yeah, I know the kind of game, seen them on TV, but MySims Kingdom was really fun in its own right -- it's not really a Sims game, the goal is to roam islands to find quests to complete, which usually involve solving puzzles like constructing a pipeline system to bring water from point A to point B, or rebuilding something from sort-of lego blocks, etc... When you complete the missions, you get access to more islands, more things to do, etc... Gosh, just talking about it, I want to play it again from the start...

But right now, I'm addicted to Mawaru Penguindrum, an excellent bizarre Japanese show (I always loved the guys who work on this one.) I'm totally cured from Skyrim for now. Too many boring quests, no 'craziness' so far, the Thieves and Dark Brotherhood quests suck (compared to Oblivion's), I'm pissed off with the dragon spawns (I should have left the main quest alone, I didn't know that doing a specific action would trigger these and bother me forever, and now it's too late to load an earlier save), and there are too many bugs in the game -- probably more than in Oblivion. I've taken a few amusing screenshots in that respect... Well, amusing when you're not playing, obviously. Like a character who was on horseback, riding into the sun, I tried following him for as long as I could, then he just disappeared and his horse went to the sky and was suddenly drawn back at lightspeed. Hours later, I was walking around another area, when I found the very same friggin' character who'd disappeared... He was in the wild, stuck halfway into the ground (only his trunk and head were visible), and when I addressed him, he just talked normally. Talk about immersion...

Anyway! :^^;:
7013
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 02:39 PM »
Lol.

Well, if you like childish construction games, try MySims Kingdoms. I absolutely loved that game a couple of years ago. On my Wii.
7014
Off-topic / Re: Thought for the day
« on November 23rd, 2011, 02:37 PM »
I suppose.

And I was joking about the bsod. At least I didn't hear from these :P
7015
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 12:15 PM »
But you get instant state saves :)

Also, Dolphin emulates the Wiimote if you connect the IR bar to your PC or something, but it can also emulate it with a keyboard or pad. Which is what I did because I hate my Wiimote. It hurt my hands.
7016
Off-topic / Re: Thought for the day
« on November 23rd, 2011, 12:13 PM »
I gave many a KMJ user their daily BSOD in the good ol' times you know... :niark:
7017
Off-topic / Re: Thought for the day
« on November 23rd, 2011, 07:50 AM »
Web programming is easy.
Anything is easy, really, when compared to Direct3D programming. :niark:

I tend to agree with the article, though :P
7018
Features / Re: New revs
« on November 23rd, 2011, 07:39 AM »
rev 1174
(5 files, 7kb)

+ Implemented basic support for adding block/layer options in the skeleton, and related bits. (Load.php, Subs-Cache.php, Subs-Template.php)

+ Added support for custom indentation in blocks and layers. For instance, just add the indent="-1" keyword in a layer or block to remove an indentation tab off the layer and all its nested blocks/layers. Used to good effect in Warm to get rid of the silly indent glitches introduced by layer movements. (Subs-Template.php, Warm/skin.xml)

* Some indentation fixes that can be introduced thanks to the above. (index.template.php)
7019
Features / Re: New revs
« on November 23rd, 2011, 07:37 AM »
rev 1173
(2 files, 1kb - thought there'd be more stuff to separate from the upcoming commit...)

! Recent posts were missing their title. Reintroduced $txt['recent_posts'] that was removed in rev 1168. (index.language.php)
7020
Off-topic / Re: Doctor Who
« on November 23rd, 2011, 06:47 AM »
So you'd rather look skyward than wedgeward! :lol:
Me, I stopped Skyrim for now. I'm sick of the random dragon spawns in town when I fast travel or whatever. They kill frigging npcs and then I have to resurrect them with the console and sometimes it fails. And the quests aren't as varied and funny as in Oblivion. What happened to me?!
Posted: November 23rd, 2011, 06:44 AM

Btw instead of Skyrim I worked on, ahem... The Indenazi feature. And it works. And it's really called that ;)
Why don't you play Zelda on your pc? The Dolphin emulator is very advanced. Heck, I played my last Wii game on it because it's faster and in HD. While my Wii gives mr a blurry picture on my Telly...