--- Log opened Sun Nov 04 00:00:46 2007 |
00:26 | | You're now known as TheWatcher[T-2] |
00:39 | | You're now known as TheWatcher[zZzZ] |
01:01 | | Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has quit [Quit: This computer has gone to sleep] |
01:04 | | Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has joined #code |
01:04 | | mode/#code [+o Thaqui] by ChanServ |
02:22 | | Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has quit [Connection reset by peer] |
02:39 | | Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has joined #code |
02:39 | | mode/#code [+o Thaqui] by ChanServ |
03:34 | | Forj [~Forj@Nightstar-5330.worldnet.co.nz] has joined #code |
03:34 | | mode/#code [+o Forj] by ChanServ |
03:34 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?] |
03:37 | | Forj [~Forj@Nightstar-5330.worldnet.co.nz] has quit [Quit: Gone] |
06:12 | | DiceBot [~Reiver@Nightstar-3074.ubs-dsl.xnet.co.nz] has joined #Code |
06:12 | | mode/#code [+v DiceBot] by ChanServ |
06:22 | | Vornicus is now known as Vornicus-Latens |
07:08 | | GeekSoldier|bed [~Rob@Nightstar-4297.pools.arcor-ip.net] has joined #code |
07:15 | | GeekSoldier|bed is now known as GeekSoldier |
08:27 | | You're now known as TheWatcher |
08:50 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code |
08:50 | | mode/#code [+o gnolam] by ChanServ |
09:41 | | Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has left #code [Leaving] |
10:08 | | You're now known as TheWatcher[afk] |
11:18 | | You're now known as TheWatcher |
11:45 | | Reiver is now known as ReivZzz |
12:03 | | You're now known as TheWatcher[afk] |
13:13 | | You're now known as TheWatcher |
14:17 | | Vornicus-Latens is now known as Vornicus |
14:34 | <@ToxicFrog> | wtf |
14:35 | <@ToxicFrog> | throw new CannotSaveGameException(); |
14:35 | <@ToxicFrog> | ^ Error: cannot reference nonstatic variable 'this' from static context |
14:41 | <@McMartin> | wtf indeed |
14:44 | <@ToxicFrog> | ...if I use Exception rather than CannotSaveGameException, it works. |
14:44 | <@ToxicFrog> | Here is the complete definition of CannotSaveGameException: |
14:44 | <@McMartin> | ... is CannotSaveGameException a non-static inner class? |
14:44 | <@ToxicFrog> | private class CannotSaveGameException extends Exception {} |
14:44 | <@McMartin> | Ding ding ding |
14:44 | <@McMartin> | Make it private static class |
14:44 | <@ToxicFrog> | Aah. It needs to be static? |
14:44 | <@McMartin> | Yeah |
14:45 | <@McMartin> | Otherwise it's closer to an upvalue and sneaks private "lexical_parent" object in as the creator's "this". |
14:45 | <@McMartin> | Which is almost never what you want. |
14:45 | <@McMartin> | static inner classes are the closest thing Java gets to Proper Namespace, and import directives treat them as such. |
14:45 | <@ToxicFrog> | And that works. Thankye. |
14:45 | <@ToxicFrog> | Interestingly, I also have a private interface, which isn't static despite being used by static things. |
14:45 | | * McMartin blames Guy L. Steele. |
14:46 | <@McMartin> | Interfaces may be special. |
14:46 | <@McMartin> | Since nothing is ever an interface directly. |
15:09 | | Vornotron [~vorn@64.252.98.ns-12877] has joined #code |
15:09 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
17:13 | | AnnoDomini [AnnoDomini@Nightstar-6898.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
17:21 | | AnnoDomini [AnnoDomini@Nightstar-29077.neoplus.adsl.tpnet.pl] has joined #Code |
17:21 | | mode/#code [+o AnnoDomini] by ChanServ |
18:05 | <@ToxicFrog> | Hmm. |
18:05 | <@ToxicFrog> | public class Player { |
18:05 | <@ToxicFrog> | private class PlayerStats implements Serializable { ... } |
18:05 | <@ToxicFrog> | private PlayerStats stats; |
18:05 | <@ToxicFrog> | public void save(ObjectOutputStream fout) { fout.writeObject(stats); } |
18:05 | <@ToxicFrog> | } |
18:06 | <@ToxicFrog> | Calling player.save() results in "java.io.NotSerializableException: Player" |
18:28 | <@ToxicFrog> | auuuugh wtf |
18:29 | <@ToxicFrog> | stats = (PlayerStats)fin.readObject(); |
18:29 | <@ToxicFrog> | ^ rogueModel.PlayerStats cannot be cast to rogueModel.Player |
19:22 | | GeekSoldier is now known as GeekSoldier|bed |
20:30 | | Vornotron is now known as Vornicus |
21:10 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
21:20 | | Vornicus [~vorn@Admin.Nightstar.Net] has joined #code |
21:20 | | mode/#code [+o Vornicus] by ChanServ |
22:02 | | Thaqui [~Thaqui@Nightstar-26126.jetstream.xtra.co.nz] has joined #code |
22:02 | | mode/#code [+o Thaqui] by ChanServ |
23:31 | | You're now known as TheWatcher[T-2] |
23:39 | | You're now known as TheWatcher[zZz] |
23:39 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Mon Nov 05 00:00:53 2007 |