Well kwando, for the moment I don't see any problem with that on my end. :-/
I'm not sure how it can happen actually. Your message basically complains that variable $user is empty, but the $user object is instatiated explicitly in my common.php mock.
Unless the mock itself is not called, this is weird.
What page are you trying to access when you get this error ? The index page ?
Did you copy the /mocked_install/config.php to /trunk/config.php directly ? No other edit ?
If the issue persists, can you check the details of your php installation ?
You can create a PHP page containing just
- Code : Tout sélectionner
<?php phpinfo(); ?>
And then navigate to it.
I'd be interested in knowing :
- Your PHP version (mine says "PHP Version 5.3.10-1ubuntu3.18" ; 5.3.10 is the relevant part here)
- Whether you have an "sqlite3" section in this page (you need to have one for the mocked db to work)
mercurialSK a écrit :
Well...I have this
proof of concept?
I kind of tried to match your code quality...and I'm thinking just hotkeys for the most commonly used stuff or something (haven't worked anything out yet, just wanted to see if I could do it). I'm kinda unsure so feedback would be nice XD
Edit: Actually this feels a bit off topic should this stuff be PM'd or maybe some new thing for general questions made instead?
Certainly not PMs ! xD
I guess I'll have to create (or not !
) a new forum section about development.
Regarding your POC, it's pretty good, it's a clever way of adding this feature as a drop-in addon to the player without affecting the rest of the code too much.
I see a few problems with this approach though :
- There is one player action that requests that the user type in some text (that is then stored in a variable). If he types an s or a c, these hotkeys will be triggered as well. Here it wouldn't be dramatic thanks to your visibility check (the skip button hotkey would not be triggered because it's hidden at this point, and switching the CE does not have a big impact), but still, that's not good.
- If you want to create hotkeys for opening a piece of evidence, what will you do ? The evidence ID is not displayed on screen so you can't assign "hotkey 1 to block with evidence id 1", etc. You would have to think in a positional way (hotkey 1 to first evidence displayed, etc). It's more dynamic than just a fixed ID.
- You will absolutely not be able to extend this approach to hotkeys in the editor, if we decide do.
In the editor, buttons do not have a unique ID to map, since there are hundreds of identical buttons (as many as you have frames, etc.)
The last point may be ignored : due to the different nature of the player and editor, it's not unreasonable to have two completely different systems (the editor would need some kind of keyboard navigation, and therefore much more impact on the editor code itself).
However, the first point is blocking : the hotkey system has to be able to know if hotkeys are safe to use at this point or not.
One way of fixing the issue could be to check the origin of the keydown event : if it originates from a form element or something of the kind, it shouldn't be interpreted as a hotkey...
Those are just my thoughts though, if you have other ideas...