smkl has quit [Read error: 104 (Connection reset by peer)]
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
gl has quit [Connection timed out]
gl has joined #ocaml
mrvn has joined #ocaml
<mrvn>
moin
<mrvn>
How do I write a "val foo" in a class that needs self to compute its value?
<mrvn>
class foo = object method bla = 1 end class blub = object(self) inherit foo val bar = self#bla end
<mrvn>
The instance variable self
<mrvn>
cannot be accessed from the definition of another instance variable
HermannMeyer has joined #ocaml
<HermannMeyer>
hello
two-face has joined #ocaml
<mrvn>
How do I write a "val foo" in a class that needs self to compute its value?
<mrvn>
class foo = object method bla = 1 end class blub = object(self) inherit foo val bar = self#bla end
<mrvn>
The instance variable self cannot be accessed from the definition of another instance variable
malc has joined #ocaml
malc has quit [card.freenode.net irc.freenode.net]
mrvn has quit [card.freenode.net irc.freenode.net]
gl has quit [card.freenode.net irc.freenode.net]
pnou has quit [card.freenode.net irc.freenode.net]
emu has quit [card.freenode.net irc.freenode.net]
HermannMeyer has quit [card.freenode.net irc.freenode.net]
Segora has quit [card.freenode.net irc.freenode.net]
two-face has quit [card.freenode.net irc.freenode.net]
smklsmkl has quit [card.freenode.net irc.freenode.net]
Dybbuk has quit [card.freenode.net irc.freenode.net]
mr_bubbs has quit [card.freenode.net irc.freenode.net]
lam__ has quit [card.freenode.net irc.freenode.net]
Begbie has quit [card.freenode.net irc.freenode.net]
merriam has quit [card.freenode.net irc.freenode.net]
skylan has quit [card.freenode.net irc.freenode.net]
xtrm_ has quit [card.freenode.net irc.freenode.net]
emu has joined #ocaml
pnou has joined #ocaml
gl has joined #ocaml
mrvn has joined #ocaml
malc has joined #ocaml
two-face has joined #ocaml
smklsmkl has joined #ocaml
Dybbuk has joined #ocaml
skylan has joined #ocaml
merriam has joined #ocaml
Begbie has joined #ocaml
lam__ has joined #ocaml
xtrm_ has joined #ocaml
mr_bubbs has joined #ocaml
<malc>
class blub obj = let bla = obj#bar in object(self) inherit foo val bar = bla end;;
<mrvn>
malc: but obj would be the foo blub inherits.
<malc>
yes
<mrvn>
Which would be different from foo if I pass it
<malc>
i guess what the compiler is trying to say is, you can not use instance before instance was created
<malc>
which is sortof correct
<mrvn>
Yes. But I would think that after "inherit foo" foo is initialised and could be used.
<mrvn>
Its probably because I could still overload some of its functions later on.
<malc>
foo is a class not object, how it can be initialized?
<mrvn>
Is there a way to make the inherit clone a parameter instead of creating a new object?
<mrvn>
malc: with "initializer bla;" and such.
<malc>
methinks you are mixing matters here, then again i rarely use OO in caml, so i rest my case
<mrvn>
class foo bar = object inherit bla clone_from bar end
<mrvn>
something like that
<mrvn>
so the inherited bla contains the data the bar had.
<mrvn>
Why does "class foo = object
<mrvn>
val bla
<mrvn>
initializer bla = 1
<mrvn>
end
<mrvn>
" not work in some form?
<malc>
ask on the list
<mrvn>
Do you use zoggy or lablgtk?
<malc>
i used lablgtk once
<mrvn>
Do you know how I can write a Widget where I can freely place other widgets and move them around?
<malc>
I guess i dont really understand what you mean
<mrvn>
Normaly you have a vbox or hbox or table of widgets.
<mrvn>
I want a big box with some widgets in it that I can move around, which posibly overlap.
<mrvn>
Like a chess board. lots of figures you can move around.
<malc>
lablgtk-1.2.3 used to have radtest under aplications.. it had similar stuff, look it up
<mrvn>
have that here. lets see how I can compile it
<mrvn>
File "gtkTree2.ml", line 3, characters 0-9:
<mrvn>
Unbound module Gaux
<mrvn>
That will take some magic to work
<mrvn>
But thanks.
<malc>
np
<mrvn>
Hmm, radtest is like zoggy
<mrvn>
Ahh, I think I have stumbled across a bug in zoggy. One of the Widgets in radtest allows freely placed other widgets inside but in zoggy the same only allows one widget.
<mrvn>
Many thx again.
<two-face>
i'll provide new packages for zoggy soon
<two-face>
it is in cameleon now
<mrvn>
two-face: fix the "fixed" widget then :)
<two-face>
you can try those packages: people.debian.org/~jerome/cameleon
<mrvn>
two-face: did you change something for the fixed widget lately?
<two-face>
i'm not upstream
Segora has joined #ocaml
two-face is now known as two-lunch
malc has quit [Read error: 110 (Connection timed out)]
gl has quit ["sic transit gloria mundi"]
gl has joined #ocaml
two-lunch is now known as two-face
ott has joined #ocaml
TachYon25 has joined #ocaml
<ott>
re
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
ott has left #ocaml []
malc has joined #ocaml
<mr_bubbs>
who was the guy in here implementing Twisted from Python in OCaml?
malc has quit ["no reason"]
systems has joined #ocaml
<systems>
where can i download a french version of the oreilly book ??