User talk:Nx

From FollowTheScore
Revision as of 22:33, 11 August 2009 by Nx (talk | contribs) (re)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hello Nx,

you seem to have found my patch of LinkHolderArray...

The problem is that clearing the status of the parser after the clone command does not really solve the problem. I tried it (as it was suggested in the bugzilla track) and observed a lot of strange effects (after I had undone my patch).

I would really appreciate help in this point. I think there must be a way to use the parser for parsing a different wiki source within an extension without messing up internal states. But I do not know how to do it properly.

Do you know or do you know sonebody who knows ?

Gero 20:20, 11 August 2009 (UTC)

This is really strange, because the situation Tim Starling describes is a fairly common problem in OOP. For example in C++, the default assignment operator works like what TS described, and the solution is to write your own assignment operator which takes into account pointers and copies the data pointed to instead of the pointer. In PHP you can write a __clone function, which will be called on the newly created object. In this function you could then clone all the referenced objects (which might also need a __clone if they have pointers) to get a clean copy.
Anyway, can you show me some examples that don't work when you clear the parser state? I haven't tested 1.8.7 beyond verifying that clearing the state at least doesn't immediately cause a fatal error, and I've reverted to 1.7.4. on RationalWiki just to be safe. Nx 21:33, 11 August 2009 (UTC)