[python] question about class attribute

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

[python] question about class attribute

Postby Gbadji » Thu Apr 24, 2008 4:26 am

Well, I have a problem that makes me crazy.

I would like to use a class attribute in the class "associated" to my clickable object to access in each instance to the status of all instances of the class. That didn't worked, the variable was different for all the instances.

I thought it was a problem with the the python version so I put a test class in my script and it was working for it.

This is my python file (without the glue part):
Code: Select all
from Plasma import *
from PlasmaTypes import *
from PlasmaKITypes import *
from PlasmaNetConstants import *
import xLocalization
import string
import time
actClickableObject = ptAttribActivator(1, 'Act: Clickable Object')
ObjectMsg = ptAttribString(2, 'Object String')

from TorilachaToolKit import *

# les noms des objets dans le modele blender
Cristal1 = 'Cristal1'
Cristal2 = 'Cristal2'
Cristal3 = 'Cristal3'
Cristal4 = 'Cristal4'
Cristal5 = 'Cristal5'
Foyer1 = 'Foyer1'
Foyer2 = 'Foyer2'
Foyer3 = 'Foyer3'
Foyer4 = 'Foyer4'
Foyer5 = 'Foyer5'
Braises1 = 'Braises1'
Braises2 = 'Braises2'
Braises3 = 'Braises3'

# rotation des cristaux pour les placer dans le foyer : radian, axe (x, y, z)
toRotate = ((1.5, 0, 0.0, 1, 1.5, 2), (0.0, 0, 1.5, 1, 0.0, 2),
            (0.0, 0, 0.0, 1, 1.5, 2), (1.5, 0, 0.0, 1, 0.0, 2),
            (3.14, 0, 1.5, 1, 0.5, 2))

# quelques constantes
zDelta = 0.1
nomCristaux = [Cristal1, Cristal2, Cristal3, Cristal4, Cristal5]
nomFoyer = [Foyer1, Foyer2, Foyer3, Foyer4, Foyer5]
nomBraises = [Braises1, Braises2, Braises3]
Bas = 0
Haut = 1
Foyer = 2
infoCristaux = {Cristal1: [Foyer1, toRotate[0]],
                Cristal2: [Foyer2, toRotate[1]],
                Cristal3: [Foyer3, toRotate[2]],
                Cristal4: [Foyer4, toRotate[3]],
                Cristal5: [Foyer5, toRotate[4]]}

#############################################################################################
# partie pour tester les attributs de classe car je commence a ne plus rien y comprendre
##############

def fonctionTest():
    a = monessai()
    b = monessai()

    a.modifie_dic_instance('un', 1)
    b.modifie_dic_instance('deux', 2)
    a.modifie_dic_classe('trois', 3)
    a.affiche_dic_instance()
    b.affiche_dic_instance()
    b.affiche_dic_classe()
    a.affiche_dic_classe()
    b.modifie_dic_classe('quatre', 4)
    b.affiche_dic_classe()
    a.affiche_dic_classe()

class monessai:
    dic_classe = {'cinq' : 5}

    def __init__(self):
        self.dic_instance = {}
        self.i = 1

    def affiche_dic_instance(self):
        print " ===> ",self.dic_instance

    def affiche_dic_classe(self):
        print " ===> ", self.__class__.dic_classe

    def affiche_i(self):
        print " ===> ", self.i

    def modifie_dic_instance(self,cle,valeur):
        self.dic_instance[cle] = valeur

    def modifie_dic_classe(self, cle, valeur):
        self.__class__.dic_classe[cle] = valeur

############
# fin de la zone de test
#####################################################################


class TorilachaFocus1(ptModifier,):
    etatCristaux = {Cristal1: Bas, Cristal2: Bas, Cristal3: Bas, Cristal4: Bas, Cristal5: Bas}

    def __init__(self):
        ptModifier.__init__(self)
        self.version = '1.2'
        self.id = 19430003
        print ('__init__%s v.%s' % (self.__class__.__name__, self.version))
        # NOTE_TODO: tenir compte de variables SDL pour retrouver l'etat au chargement
        # (a faire dans Torilacha.py)?
        self.AgeNAme = None
        self.Cristal = None
        self.Foyer = None
        self.posori = None

    def OnFirstUpdate(self):
        self.AgeName = PtGetAgeName()
        print 'TorilachaFocus1.OnFirstUpdate(): AgeName=', self.AgeName

    def OnServerInitComplete(self):
        print ('%s: OnServerInitComplete called' % self.__class__.__name__)

        # il faudrait recuperer l'objet Cristalm l'objet Foyer associe
        # l'appel a IInitFire ne devrait etre fait qu'une fois
        self.IInitFire()
        fonctionTest()  ################ uniquement pour tester si des attributs de classe peuvent fonctionner

    def OnNotify(self, state, id, events):
        print ('%s: OnNotify called' % self.__class__.__name__)
        if ((id == actClickableObject.id) and state):
            print ('Someone clicked on object %s' % ObjectMsg.value)
            if (PtWasLocallyNotified(self.key)):
                print 'It was you'
                if ObjectMsg.value in nomCristaux:
                    print 'Match found! start moving ', ObjectMsg.value, ' ...'
                    self.IMoveCristal(ObjectMsg.value)

    def IMoveCristal(self, c):
        print ('%s: IMoveCristalcalled' % self.__class__.__name__)
        print ('with %s' % c)
        # la recuperation des objets blender devrait plutot etre faite dans OnServerInitComplete
        # il faut juste trouver comment savoir a quel objet cristal correspond l'instance ...
        if self.Cristal == None:
            self.Cristal = PtFindSceneobject(c,self.AgeName)
            if self.Cristal == None:
                print 'Could not find ', c ,'!'
            else:
                self.posori = self.Cristal.position()
        if self.Foyer == None:
            self.Foyer = PtFindSceneobject(infoCristaux[c][0],self.AgeName)
            if self.Foyer == None:
                print 'OnServerInitComplete - could not find ', infoCristaux[c][0] ,'!'

        if self.Cristal != None:
            # si le cristal est en bas (position d'origine, il descend), s'il est en haut il va dans le foyer,
            # s'il est dans le foyer il revient sur le support a sa position d'origine
            # le foyer est impacte quand un cristal y arrive ou en repart
            if self.__class__.etatCristaux[c] == Bas:
                print ('switch Bas to Haut')
                oldPos = self.Cristal.position()
                newPos = ptPoint3(oldPos.getX(), oldPos.getY(), oldPos.getZ()+zDelta)
                self.Cristal.physics.warp(newPos)
                self.__class__.etatCristaux[c] = Haut
                # pas besoin de mise a jour du foyer
            elif self.__class__.etatCristaux[c] == Haut:
                print ('switch Haut to Foyer')
                # le cristal se deplace et se tourne
                rot = infoCristaux[c][1]
                fPos = self.Foyer.position()
                cPos = self.Cristal.position()
                rotObjXYZtrans(c, rot[0], rot[2], rot[4], cPos, fPos)
                self.__class__.etatCristaux[c] = Foyer
                # un cristal arrive dans le foyer
                self.IUpdateFire()
            elif self.__class__.etatCristaux[c] == Foyer:
                print ('switch Foyer to Bas')
                # le cristal revient a sa position d'origine (pas besoin de le retourner, l'orientation semble memorisee)
                newPos = self.posori
                self.Cristal.physics.warp(newPos)
                self.__class__.etatCristaux[c] = Bas
                # un cristal quitte le foyer
                self.IUpdateFire()

    def IEnableObject(self, nom):
        o = PtFindSceneobject(nom, self.AgeName)
        if o == None:
            print 'Impossible de trouver ', nom, ' !'
        else:
            o.draw.enable()
            o.physics.suppress(false)

    def IDisableObject(self, nom):
        o = PtFindSceneobject(nom, self.AgeName)
        if o == None:
            print 'Impossible de trouver ', nom, ' !'
        else:
            o.draw.disable()
            o.physics.suppress(true)

    def IInitFire(self):
        # pas de cristaux, pas de feu
        print ('%s: IInitFire' % self.__class__.__name__)
        for braise in nomBraises:
            self.IDisableObject(braise)

    def IUpdateFire(self):
        # les braises sont plus ou moins chaudes en fonction des cristaux
        print ('%s: IUpdateFire' % self.__class__.__name__)
        print '===', self.__class__.etatCristaux
        if ((self.__class__.etatCristaux[Cristal1] == Foyer) and
            (self.__class__.etatCristaux[Cristal3] == Foyer) and
            (self.__class__.etatCristaux[Cristal4] == Foyer)):
            print ('%s: IUpdateFire 1 3 4' % self.__class__.__name__)
            self.IEnableObject(Braises3)
            self.IDisableObject(Braises2)
            self.IDisableObject(Braises1)
        elif ((self.__class__.etatCristaux[Cristal1] == Foyer) and
            ((self.__class__.etatCristaux[Cristal3] == Foyer) or (self.__class__.etatCristaux[Cristal4] == Foyer))):
            print ('%s: IUpdateFire 1 3 ou 4' % self.__class__.__name__)
            self.IEnableObject(Braises2)
            self.IDisableObject(Braises3)
            self.IDisableObject(Braises1)
        elif ((self.__class__.etatCristaux[Cristal3] == Foyer) and
              (self.__class__.etatCristaux[Cristal4] == Foyer)):
            print ('%s: IUpdateFire 3 4' % self.__class__.__name__)
            self.IEnableObject(Braises2)
            self.IDisableObject(Braises3)
            self.IDisableObject(Braises1)
        elif ((self.__class__.etatCristaux[Cristal1] == Foyer) or
            (self.__class__.etatCristaux[Cristal3] == Foyer) or
            (self.__class__.etatCristaux[Cristal4] == Foyer)):
            print ('%s: IUpdateFire 1 ou 3 ou 4' % self.__class__.__name__)
            self.IEnableObject(Braises1)
            self.IDisableObject(Braises3)
            self.IDisableObject(Braises2)
        else :
            print ('%s: IUpdateFire aucun' % self.__class__.__name__)
            self.IDisableObject(Braises3)
            self.IDisableObject(Braises2)
            self.IDisableObject(Braises1)

    def OnSDLNotify(self, VARname, SDLname, playerID, tag):
        pass

    def OnTimer(self, id):
        pass

#--- fin de la class TorilachaFocus1


and the part of the Python.0.elf file corresponding to the "activation" of the script

Code: Select all
....
(04/23 22:58:23) ULM: Activating book Link20
(04/23 22:58:26) __init__TorilachaBookGUI v.3.0
(04/23 22:58:26) __init__TorilachaFocus1 v.1.2
(04/23 22:58:26) __init__TorilachaFocus1 v.1.2
(04/23 22:58:26) __init__TorilachaFocus1 v.1.2
(04/23 22:58:26) __init__TorilachaFocus1 v.1.2
(04/23 22:58:26) __init__TorilachaFocus1 v.1.2
(04/23 22:58:26) __init__TorilachaBookGUI v.3.0
(04/23 22:58:26) __init__TorilachaBookGUI v.3.0
(04/23 22:58:26) __init__TorilachaFocus2 v.1.0
(04/23 22:58:26) Init1 Porte PorteGBuffet
(04/23 22:58:26) Init1 Porte PorteDBuffet
(04/23 22:58:26) __init__TorilachaFocus2 v.1.0
(04/23 22:58:26) Init1 Porte PorteGBuffet
(04/23 22:58:26) Init1 Porte PorteDBuffet
(04/23 22:58:26) Torilacha.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/23 22:58:26) TorilachaFocus1: OnServerInitComplete called
(04/23 22:58:26) TorilachaFocus1: IInitFire
(04/23 22:58:26)  ===>  {'un': 1}
(04/23 22:58:26)  ===>  {'deux': 2}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26) TorilachaFocus1: OnServerInitComplete called
(04/23 22:58:26) TorilachaFocus1: IInitFire
(04/23 22:58:26)  ===>  {'un': 1}
(04/23 22:58:26)  ===>  {'deux': 2}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26) TorilachaFocus1: OnServerInitComplete called
(04/23 22:58:26) TorilachaFocus1: IInitFire
(04/23 22:58:26)  ===>  {'un': 1}
(04/23 22:58:26)  ===>  {'deux': 2}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26) TorilachaFocus1: OnServerInitComplete called
(04/23 22:58:26) TorilachaFocus1: IInitFire
(04/23 22:58:26)  ===>  {'un': 1}
(04/23 22:58:26)  ===>  {'deux': 2}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26) TorilachaFocus1: OnServerInitComplete called
(04/23 22:58:26) TorilachaFocus1: IInitFire
(04/23 22:58:26)  ===>  {'un': 1}
(04/23 22:58:26)  ===>  {'deux': 2}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/23 22:58:26) TorilachaFocus2: OnServerInitComplete called
(04/23 22:58:26) Init2 Porte PorteGBuffet
(04/23 22:58:26) Init2 Porte PorteDBuffet
(04/23 22:58:26) TorilachaFocus2: OnServerInitComplete called
(04/23 22:58:26) Init2 Porte PorteGBuffet
(04/23 22:58:26) Init2 Porte PorteDBuffet
(04/23 22:58:33) TorilachaFocus1: OnNotify called
(04/23 22:58:33) Someone clicked on object Cristal1
(04/23 22:58:33) It was you
(04/23 22:58:33) Match found! start moving  Cristal1  ...
(04/23 22:58:33) TorilachaFocus1: IMoveCristalcalled
(04/23 22:58:33) with Cristal1
(04/23 22:58:33) switch Bas to Haut
(04/23 22:58:33) TorilachaFocus1: OnNotify called
(04/23 22:58:34) TorilachaFocus1: OnNotify called
(04/23 22:58:34) Someone clicked on object Cristal1
(04/23 22:58:34) It was you
(04/23 22:58:34) Match found! start moving  Cristal1  ...
(04/23 22:58:34) TorilachaFocus1: IMoveCristalcalled
(04/23 22:58:34) with Cristal1
(04/23 22:58:34) switch Haut to Foyer
(04/23 22:58:34) rotObjXYZtrans:  Cristal1  sur axe 0 de  1.5  sur axe 1 de  0.0  sur axe 2 de  1.5
(04/23 22:58:34) rotObjXYZtrans2:  0.364439964294  sur x  -5.64433860779  sur y  -1.37257885933  sur z
(04/23 22:58:34) TorilachaFocus1: IUpdateFire
(04/23 22:58:34) === {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
(04/23 22:58:34) TorilachaFocus1: IUpdateFire 1 ou 3 ou 4
(04/23 22:58:34) TorilachaFocus1: OnNotify called
(04/23 22:58:36) TorilachaFocus1: OnNotify called
(04/23 22:58:36) Someone clicked on object Cristal2
(04/23 22:58:36) It was you
(04/23 22:58:36) Match found! start moving  Cristal2  ...
(04/23 22:58:36) TorilachaFocus1: IMoveCristalcalled
(04/23 22:58:36) with Cristal2
(04/23 22:58:36) switch Bas to Haut
(04/23 22:58:36) TorilachaFocus1: OnNotify called
(04/23 22:58:37) TorilachaFocus1: OnNotify called
(04/23 22:58:37) Someone clicked on object Cristal2
(04/23 22:58:37) It was you
(04/23 22:58:37) Match found! start moving  Cristal2  ...
(04/23 22:58:37) TorilachaFocus1: IMoveCristalcalled
(04/23 22:58:37) with Cristal2
(04/23 22:58:37) switch Haut to Foyer
(04/23 22:58:37) rotObjXYZtrans:  Cristal2  sur axe 0 de  0.0  sur axe 1 de  1.5  sur axe 2 de  0.0
(04/23 22:58:37) rotObjXYZtrans2:  0.330240249634  sur x  -5.36197853088  sur y  -1.591142416  sur z
(04/23 22:58:37) TorilachaFocus1: IUpdateFire
(04/23 22:58:37) === {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/23 22:58:37) TorilachaFocus1: IUpdateFire aucun
(04/23 22:58:37) TorilachaFocus1: OnNotify called


I was expecting
Code: Select all
(04/23 22:58:37) === {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
instead of
Code: Select all
(04/23 22:58:37) === {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}


What's the problem with my etatCristaux class attribute ?

Thanks.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: [python] question about class attribute

Postby Robert The Rebuilder » Fri Apr 25, 2008 11:59 am

I can see why this is driving you crazy - the code looks fine to me!

It is unclear when Cristal1 loses its Foyer setting. Perhaps you could print out etatCristal when a crystal changes from Bas to Haut?

Also - you probably know that eventually you should change from the static member variable to SDL variables. That way, everyone in the age will see the changes of the crystals.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: [python] question about class attribute

Postby Gbadji » Fri Apr 25, 2008 12:42 pm

I added a print out, but for a cristal, the state switched correctly from Bas to Haut to Foyer to Bas, ... Even playing with an other cristal in the same time. But Cristal1 didn't known the state of Cristal2 ...

If there is an other way to do what I want, I can try it.

Code: Select all
...
(04/25 21:13:03) ULM: Activating book Link20
(04/25 21:13:07) __init__TorilachaBookGUI v.3.0
(04/25 21:13:07) __init__TorilachaFocus1 v.1.2
(04/25 21:13:07) __init__TorilachaFocus1 v.1.2
(04/25 21:13:07) __init__TorilachaFocus1 v.1.2
(04/25 21:13:07) __init__TorilachaFocus1 v.1.2
(04/25 21:13:07) __init__TorilachaFocus1 v.1.2
(04/25 21:13:07) __init__TorilachaBookGUI v.3.0
(04/25 21:13:07) __init__TorilachaBookGUI v.3.0
(04/25 21:13:07) __init__TorilachaFocus2 v.1.0
(04/25 21:13:07) Init1 Porte PorteGBuffet
(04/25 21:13:07) Init1 Porte PorteDBuffet
(04/25 21:13:07) __init__TorilachaFocus2 v.1.0
(04/25 21:13:07) Init1 Porte PorteGBuffet
(04/25 21:13:07) Init1 Porte PorteDBuffet
(04/25 21:13:08) Torilacha.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/25 21:13:08) TorilachaFocus1: OnServerInitComplete called
(04/25 21:13:08) TorilachaFocus1: IInitFire
(04/25 21:13:08)  ===>  {'un': 1}
(04/25 21:13:08)  ===>  {'deux': 2}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08) TorilachaFocus1: OnServerInitComplete called
(04/25 21:13:08) TorilachaFocus1: IInitFire
(04/25 21:13:08)  ===>  {'un': 1}
(04/25 21:13:08)  ===>  {'deux': 2}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08) TorilachaFocus1: OnServerInitComplete called
(04/25 21:13:08) TorilachaFocus1: IInitFire
(04/25 21:13:08)  ===>  {'un': 1}
(04/25 21:13:08)  ===>  {'deux': 2}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08) TorilachaFocus1: OnServerInitComplete called
(04/25 21:13:08) TorilachaFocus1: IInitFire
(04/25 21:13:08)  ===>  {'un': 1}
(04/25 21:13:08)  ===>  {'deux': 2}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08) TorilachaFocus1: OnServerInitComplete called
(04/25 21:13:08) TorilachaFocus1: IInitFire
(04/25 21:13:08)  ===>  {'un': 1}
(04/25 21:13:08)  ===>  {'deux': 2}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/25 21:13:08) TorilachaFocus2: OnServerInitComplete called
(04/25 21:13:08) Init2 Porte PorteGBuffet
(04/25 21:13:08) Init2 Porte PorteDBuffet
(04/25 21:13:08) TorilachaFocus2: OnServerInitComplete called
(04/25 21:13:08) Init2 Porte PorteGBuffet
(04/25 21:13:08) Init2 Porte PorteDBuffet
(04/25 21:13:16) TorilachaFocus1: OnNotify called
(04/25 21:13:16) Someone clicked on object Cristal1
(04/25 21:13:16) It was you
(04/25 21:13:16) Match found! start moving  Cristal1  ...
(04/25 21:13:16) TorilachaFocus1: IMoveCristalcalled
(04/25 21:13:16) with Cristal1
(04/25 21:13:16) switch Bas to Haut
(04/25 21:13:16) =+=+= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/25 21:13:16) TorilachaFocus1: OnNotify called
(04/25 21:13:17) TorilachaFocus1: OnNotify called
(04/25 21:13:17) Someone clicked on object Cristal2
(04/25 21:13:17) It was you
(04/25 21:13:17) Match found! start moving  Cristal2  ...
(04/25 21:13:17) TorilachaFocus1: IMoveCristalcalled
(04/25 21:13:17) with Cristal2
(04/25 21:13:17) switch Bas to Haut
(04/25 21:13:17) =+=+= {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/25 21:13:17) TorilachaFocus1: OnNotify called
(04/25 21:13:18) TorilachaFocus1: OnNotify called
(04/25 21:13:18) Someone clicked on object Cristal1
(04/25 21:13:18) It was you
(04/25 21:13:18) Match found! start moving  Cristal1  ...
(04/25 21:13:18) TorilachaFocus1: IMoveCristalcalled
(04/25 21:13:18) with Cristal1
(04/25 21:13:18) switch Haut to Foyer
(04/25 21:13:18) rotObjXYZtrans:  Cristal1  sur axe 0 de  1.5  sur axe 1 de  0.0  sur axe 2 de  1.5
(04/25 21:13:18) rotObjXYZtrans2:  0.364439964294  sur x  -5.64433860779  sur y  -1.37257885933  sur z
(04/25 21:13:18) TorilachaFocus1: IUpdateFire
(04/25 21:13:18) === {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
(04/25 21:13:18) TorilachaFocus1: IUpdateFire 1 ou 3 ou 4
(04/25 21:13:18) TorilachaFocus1: OnNotify called
(04/25 21:13:20) TorilachaFocus1: OnNotify called
(04/25 21:13:20) Someone clicked on object Cristal2
(04/25 21:13:20) It was you
(04/25 21:13:20) Match found! start moving  Cristal2  ...
(04/25 21:13:20) TorilachaFocus1: IMoveCristalcalled
(04/25 21:13:20) with Cristal2
(04/25 21:13:20) switch Haut to Foyer
(04/25 21:13:20) rotObjXYZtrans:  Cristal2  sur axe 0 de  0.0  sur axe 1 de  1.5  sur axe 2 de  0.0
(04/25 21:13:20) rotObjXYZtrans2:  0.330240249634  sur x  -5.36197853088  sur y  -1.591142416  sur z
(04/25 21:13:20) TorilachaFocus1: IUpdateFire
(04/25 21:13:20) === {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/25 21:13:20) TorilachaFocus1: IUpdateFire aucun
(04/25 21:13:20) TorilachaFocus1: OnNotify called
(04/25 21:13:21) TorilachaFocus1: OnNotify called
(04/25 21:13:21) Someone clicked on object Cristal1
(04/25 21:13:21) It was you
(04/25 21:13:21) Match found! start moving  Cristal1  ...
(04/25 21:13:21) TorilachaFocus1: IMoveCristalcalled
(04/25 21:13:21) with Cristal1
(04/25 21:13:21) switch Foyer to Bas
(04/25 21:13:21) TorilachaFocus1: IUpdateFire
(04/25 21:13:21) === {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/25 21:13:21) TorilachaFocus1: IUpdateFire aucun
(04/25 21:13:21) TorilachaFocus1: OnNotify called
(04/25 21:13:22) TorilachaFocus1: OnNotify called
(04/25 21:13:22) Someone clicked on object Cristal2
(04/25 21:13:22) It was you
(04/25 21:13:22) Match found! start moving  Cristal2  ...
(04/25 21:13:22) TorilachaFocus1: IMoveCristalcalled
(04/25 21:13:22) with Cristal2
(04/25 21:13:22) switch Foyer to Bas
(04/25 21:13:22) TorilachaFocus1: IUpdateFire
(04/25 21:13:22) === {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/25 21:13:22) TorilachaFocus1: IUpdateFire aucun
(04/25 21:13:22) TorilachaFocus1: OnNotify called


For the SDL variables, ... I haven't yet understood (look at) how to use them. I haven't understood the ptAttribxxx too, I haven't understood how to say correctly to the avatar to play an animation, I haven't understood ... no the list is too long :D. The Writing Art it's not my second nature (yet ;) ).
If you have some information about the SDL variables, I will be happy to read them.

Thanks.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: [python] question about class attribute

Postby belford » Fri Apr 25, 2008 3:02 pm

Looks correct to me to. (Although the __class__ in self.__class__.etatCristaux is unnecessary. self.__class__.etatCristaux and self.etatCristaux refer to the same object, the way you've got it set up.)

It's possible that the Plasma base class (ptModifier) goes through and rearranges your object in some weird way.

Yeah, put in more print statements. Print the etatCristaux at the beginning *and* end of IMoveCristal().
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: [python] question about class attribute

Postby Robert The Rebuilder » Fri Apr 25, 2008 3:05 pm

belford's comments made me think of something...

Before going the SDL route, Gbadji, try replacing
Code: Select all
self.__class__.etatCristaux

with
Code: Select all
TorilachaFocus1.etatCristaux
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: [python] question about class attribute

Postby Gbadji » Sat Apr 26, 2008 3:46 am

I tried, I tried ... nothing changed.

self.__class__ is exactly the same thing than TorilachaFocus1

It seems belford you are right. The class attributes become instance attributes but I can't imagine is the ptModifier doing that:
Code: Select all
class ptModifier:
    __module__ = __name__

    def __init__(self):
        self.key = None
        self.SDL = None
        self.version = 0


I changed my test class to make it inheriting ptModifer class, .... grrrr .... , it was still working for it:
Code: Select all
...
(04/26 12:32:00) ULM: Activating book Link20
(04/26 12:32:03) __init__TorilachaBookGUI v.3.0
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaBookGUI v.3.0
(04/26 12:32:03) __init__TorilachaBookGUI v.3.0
(04/26 12:32:03) __init__TorilachaFocus2 v.1.0
(04/26 12:32:03) Init1 Porte PorteGBuffet
(04/26 12:32:03) Init1 Porte PorteDBuffet
(04/26 12:32:03) __init__TorilachaFocus2 v.1.0
(04/26 12:32:03) Init1 Porte PorteGBuffet
(04/26 12:32:03) Init1 Porte PorteDBuffet
(04/26 12:32:04) Torilacha.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus1.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/26 12:32:04) TorilachaFocus1: OnServerInitComplete called
(04/26 12:32:04) TorilachaFocus1: IInitFire
(04/26 12:32:04)  ===>  {'un': 1}
(04/26 12:32:04)  ===>  {'deux': 2}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04) TorilachaFocus1: OnServerInitComplete called
(04/26 12:32:04) TorilachaFocus1: IInitFire
(04/26 12:32:04)  ===>  {'un': 1}
(04/26 12:32:04)  ===>  {'deux': 2}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04) TorilachaFocus1: OnServerInitComplete called
(04/26 12:32:04) TorilachaFocus1: IInitFire
(04/26 12:32:04)  ===>  {'un': 1}
(04/26 12:32:04)  ===>  {'deux': 2}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04) TorilachaFocus1: OnServerInitComplete called
(04/26 12:32:04) TorilachaFocus1: IInitFire
(04/26 12:32:04)  ===>  {'un': 1}
(04/26 12:32:04)  ===>  {'deux': 2}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04) TorilachaFocus1: OnServerInitComplete called
(04/26 12:32:04) TorilachaFocus1: IInitFire
(04/26 12:32:04)  ===>  {'un': 1}
(04/26 12:32:04)  ===>  {'deux': 2}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04)  ===>  {'quatre': 4, 'trois': 3, 'cinq': 5}
(04/26 12:32:04) TorilachaFocus2: OnServerInitComplete called
(04/26 12:32:04) Init2 Porte PorteGBuffet
(04/26 12:32:04) Init2 Porte PorteDBuffet
(04/26 12:32:04) TorilachaFocus2: OnServerInitComplete called
(04/26 12:32:04) Init2 Porte PorteGBuffet
(04/26 12:32:04) Init2 Porte PorteDBuffet
(04/26 12:32:09) TorilachaFocus1: OnNotify called
(04/26 12:32:09) Someone clicked on object Cristal1
(04/26 12:32:09) It was you
(04/26 12:32:09) Match found! start moving  Cristal1  ...
(04/26 12:32:09) TorilachaFocus1: IMoveCristalcalled
(04/26 12:32:09) with Cristal1
(04/26 12:32:09) =in=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:09) switch Bas to Haut
(04/26 12:32:09) =+=+= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:09) =out=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:09) TorilachaFocus1: OnNotify called
(04/26 12:32:11) TorilachaFocus1: OnNotify called
(04/26 12:32:11) Someone clicked on object Cristal2
(04/26 12:32:11) It was you
(04/26 12:32:11) Match found! start moving  Cristal2  ...
(04/26 12:32:11) TorilachaFocus1: IMoveCristalcalled
(04/26 12:32:11) with Cristal2
(04/26 12:32:11) =in=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:11) switch Bas to Haut
(04/26 12:32:11) =+=+= {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:11) =out=====IMoveCristal= {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:11) TorilachaFocus1: OnNotify called
(04/26 12:32:12) TorilachaFocus1: OnNotify called
(04/26 12:32:12) Someone clicked on object Cristal1
(04/26 12:32:12) It was you
(04/26 12:32:12) Match found! start moving  Cristal1  ...
(04/26 12:32:12) TorilachaFocus1: IMoveCristalcalled
(04/26 12:32:12) with Cristal1
(04/26 12:32:12) =in=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:12) switch Haut to Foyer
(04/26 12:32:12) rotObjXYZtrans:  Cristal1  sur axe 0 de  1.5  sur axe 1 de  0.0  sur axe 2 de  1.5
(04/26 12:32:12) rotObjXYZtrans2:  0.364439964294  sur x  -5.64433860779  sur y  -1.37257885933  sur z
(04/26 12:32:12) TorilachaFocus1: IUpdateFire
(04/26 12:32:12) =in=====IUpdateFire= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:12) TorilachaFocus1: IUpdateFire 1 ou 3 ou 4
(04/26 12:32:12) =out=====IUpdateFire= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:12) =out=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:12) TorilachaFocus1: OnNotify called
(04/26 12:32:13) TorilachaFocus1: OnNotify called
(04/26 12:32:13) Someone clicked on object Cristal2
(04/26 12:32:13) It was you
(04/26 12:32:13) Match found! start moving  Cristal2  ...
(04/26 12:32:13) TorilachaFocus1: IMoveCristalcalled
(04/26 12:32:13) with Cristal2
(04/26 12:32:13) =in=====IMoveCristal= {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:13) switch Haut to Foyer
(04/26 12:32:13) rotObjXYZtrans:  Cristal2  sur axe 0 de  0.0  sur axe 1 de  1.5  sur axe 2 de  0.0
(04/26 12:32:13) rotObjXYZtrans2:  0.330240249634  sur x  -5.36197853088  sur y  -1.591142416  sur z
(04/26 12:32:13) TorilachaFocus1: IUpdateFire
(04/26 12:32:13) =in=====IUpdateFire= {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:13) TorilachaFocus1: IUpdateFire aucun
(04/26 12:32:13) =out=====IUpdateFire= {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:13) =out=====IMoveCristal= {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:13) TorilachaFocus1: OnNotify called
(04/26 12:32:15) TorilachaFocus1: OnNotify called
(04/26 12:32:15) Someone clicked on object Cristal1
(04/26 12:32:15) It was you
(04/26 12:32:15) Match found! start moving  Cristal1  ...
(04/26 12:32:15) TorilachaFocus1: IMoveCristalcalled
(04/26 12:32:15) with Cristal1
(04/26 12:32:15) =in=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 2, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:15) switch Foyer to Bas
(04/26 12:32:15) TorilachaFocus1: IUpdateFire
(04/26 12:32:15) =in=====IUpdateFire= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:15) TorilachaFocus1: IUpdateFire aucun
(04/26 12:32:15) =out=====IUpdateFire= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:15) =out=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:15) TorilachaFocus1: OnNotify called
(04/26 12:32:16) TorilachaFocus1: OnNotify called
(04/26 12:32:16) Someone clicked on object Cristal2
(04/26 12:32:16) It was you
(04/26 12:32:16) Match found! start moving  Cristal2  ...
(04/26 12:32:16) TorilachaFocus1: IMoveCristalcalled
(04/26 12:32:16) with Cristal2
(04/26 12:32:16) =in=====IMoveCristal= {'Cristal2': 2, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:16) switch Foyer to Bas
(04/26 12:32:16) TorilachaFocus1: IUpdateFire
(04/26 12:32:16) =in=====IUpdateFire= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:16) TorilachaFocus1: IUpdateFire aucun
(04/26 12:32:16) =out=====IUpdateFire= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:16) =out=====IMoveCristal= {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 12:32:16) TorilachaFocus1: OnNotify called


I allready tried global variables without success so I'm going to write again all my script from the begining and see if something change at a specific moment.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: [python] question about class attribute

Postby D'Lanor » Sat Apr 26, 2008 4:02 am

Gbadji wrote:I tried, I tried ... nothing changed.

self.__class__ is exactly the same thing than TorilachaFocus1

It seems belford you are right. The class attributes become instance attributes but I can't imagine is the ptModifier doing that:

Each object spawns its own Python instance which is independent of the others. You can see it happening here for example.

Code: Select all
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2
(04/26 12:32:03) __init__TorilachaFocus1 v.1.2

I think that may be the cause of your problem. And that is why you will most likely need SDL variables to store states.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: [python] question about class attribute

Postby Gbadji » Sat Apr 26, 2008 7:42 am

Yes, each instance is independant, all instance attributes are own by the instance but the class attributes are, if I make no mistake, common for all the instances of the class. Why that doesn't work here ?
The global variables aren't working too.

This is a very simplified script (without the glue part):
Code: Select all

from Plasma import *
from PlasmaTypes import *
actClickableObject = ptAttribActivator(1, 'Act: Clickable Object')
ObjectMsg = ptAttribString(2, 'Object String')

# les noms des objets dans le modele blender
Cristal1 = 'Cristal1'
Cristal2 = 'Cristal2'
Cristal3 = 'Cristal3'
Cristal4 = 'Cristal4'
Cristal5 = 'Cristal5'
# quelques constantes
Bas = 0
Haut = 1
Foyer = 2
# variable globale pour tester
global_etatCristaux = {Cristal1: Bas, Cristal2: Bas, Cristal3: Bas, Cristal4: Bas, Cristal5: Bas}

class TorilachaFocus1(ptModifier,):
    etatCristaux = {Cristal1: Bas, Cristal2: Bas, Cristal3: Bas, Cristal4: Bas, Cristal5: Bas}

    def __init__(self):
        global global_etatCristaux
        ptModifier.__init__(self)
        self.version = '1.2'
        self.id = 19430003
        print ('__init__%s v.%s' % (self.__class__.__name__, self.version))
        print 'ObjectMsg.value dans ', self.__class__.__name__, '.__init__ = ', ObjectMsg.value
        print 'actClickableObject.id dans ', self.__class__.__name__, '.__init__ = ', actClickableObject.id
        print 'self.__class__.etatCristaux dans ', self.__class__.__name__, '.__init__ = ', self.__class__.etatCristaux
        print 'global_etatCristaux dans ', self.__class__.__name__, '.__init__ = ', global_etatCristaux

    def OnFirstUpdate(self):
        global global_etatCristaux
        self.AgeName = PtGetAgeName()
        print 'ObjectMsg.value dans ', self.__class__.__name__, '.OnFirstUpdate = ', ObjectMsg.value
        print 'actClickableObject.id dans ', self.__class__.__name__, '.OnFirstUpdate = ', actClickableObject.id
        print 'self.__class__.etatCristaux dans ', self.__class__.__name__, '.OnFirstUpdate = ', self.__class__.etatCristaux
        print 'global_etatCristaux dans ', self.__class__.__name__, '.OnFirstUpdate = ', global_etatCristaux

    def OnServerInitComplete(self):
        global global_etatCristaux
        print 'ObjectMsg.value dans ', self.__class__.__name__, '.OnServerInitComplete = ', ObjectMsg.value
        print 'actClickableObject.id dans ', self.__class__.__name__, '.OnServerInitComplete = ', actClickableObject.id
        print 'self.__class__.etatCristaux dans ', self.__class__.__name__, '.OnServerInitComplete = ', self.__class__.etatCristaux
        self.__class__.etatCristaux[ObjectMsg.value] = Haut
        print 'self.__class__.etatCristaux dans ', self.__class__.__name__, '.OnServerInitComplete apres modification= ', self.__class__.etatCristaux
        print 'global_etatCristaux dans ', self.__class__.__name__, '.OnServerInitComplete = ', global_etatCristaux
        global_etatCristaux[ObjectMsg.value] = Haut
        print 'global_etatCristaux dans ', self.__class__.__name__, '.OnServerInitComplete apres modification= ', global_etatCristaux

    def OnNotify(self, state, id, events):
        global global_etatCristaux
        print 'ObjectMsg.value dans ', self.__class__.__name__, '.OnNotify = ', ObjectMsg.value
        print 'actClickableObject.id dans ', self.__class__.__name__, '.OnNotify = ', actClickableObject.id
        print 'self.__class__.etatCristaux dans ', self.__class__.__name__, '.OnNotify = ', self.__class__.etatCristaux
        print 'global_etatCristaux dans ', self.__class__.__name__, '.OnNotify = ', global_etatCristaux

    def OnSDLNotify(self, VARname, SDLname, playerID, tag):
        pass

    def OnTimer(self, id):
        pass

#--- fin de la class TorilachaFocus1


and the corresponding print out:
Code: Select all
(04/26 14:37:57) ULM: Activating book Link20
(04/26 14:38:01) __init__TorilachaBookGUI v.3.0
(04/26 14:38:01) __init__TorilachaFocus1 v.1.2
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .__init__ = 
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .__init__ =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) __init__TorilachaFocus1 v.1.2
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .__init__ = 
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .__init__ =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) __init__TorilachaFocus1 v.1.2
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .__init__ = 
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .__init__ =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) __init__TorilachaFocus1 v.1.2
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .__init__ = 
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .__init__ =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) __init__TorilachaFocus1 v.1.2
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .__init__ = 
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .__init__ =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .__init__ =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) __init__TorilachaBookGUI v.3.0
(04/26 14:38:01) __init__TorilachaBookGUI v.3.0
(04/26 14:38:01) __init__TorilachaFocus2 v.1.0
(04/26 14:38:01) Init1 Porte PorteGBuffet
(04/26 14:38:01) Init1 Porte PorteDBuffet
(04/26 14:38:01) __init__TorilachaFocus2 v.1.0
(04/26 14:38:01) Init1 Porte PorteGBuffet
(04/26 14:38:01) Init1 Porte PorteDBuffet
(04/26 14:38:01) Torilacha.OnFirstUpdate(): AgeName= Torilacha
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnFirstUpdate =  Cristal1
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnFirstUpdate =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnFirstUpdate =  Cristal2
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnFirstUpdate =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnFirstUpdate =  Cristal3
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnFirstUpdate =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnFirstUpdate =  Cristal4
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnFirstUpdate =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnFirstUpdate =  Cristal5
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnFirstUpdate =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnFirstUpdate =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/26 14:38:01) TorilachaFocus2.OnFirstUpdate(): AgeName= Torilacha
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnServerInitComplete =  Cristal1
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnServerInitComplete =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnServerInitComplete =  Cristal2
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnServerInitComplete =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnServerInitComplete =  Cristal3
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnServerInitComplete =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 1, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 1, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnServerInitComplete =  Cristal4
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnServerInitComplete =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 1, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 1, 'Cristal5': 0}
(04/26 14:38:01) ObjectMsg.value dans  TorilachaFocus1 .OnServerInitComplete =  Cristal5
(04/26 14:38:01) actClickableObject.id dans  TorilachaFocus1 .OnServerInitComplete =  1
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) self.__class__.etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 1}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:01) global_etatCristaux dans  TorilachaFocus1 .OnServerInitComplete apres modification=  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 1}
(04/26 14:38:01) TorilachaFocus2: OnServerInitComplete called
(04/26 14:38:01) Init2 Porte PorteGBuffet
(04/26 14:38:01) Init2 Porte PorteDBuffet
(04/26 14:38:01) TorilachaFocus2: OnServerInitComplete called
(04/26 14:38:01) Init2 Porte PorteGBuffet
(04/26 14:38:01) Init2 Porte PorteDBuffet
(04/26 14:38:36) ObjectMsg.value dans  TorilachaFocus1 .OnNotify =  Cristal1
(04/26 14:38:36) actClickableObject.id dans  TorilachaFocus1 .OnNotify =  1
(04/26 14:38:36) self.__class__.etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:36) global_etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:36) ObjectMsg.value dans  TorilachaFocus1 .OnNotify =  Cristal1
(04/26 14:38:36) actClickableObject.id dans  TorilachaFocus1 .OnNotify =  1
(04/26 14:38:36) self.__class__.etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:36) global_etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 0, 'Cristal1': 1, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:37) ObjectMsg.value dans  TorilachaFocus1 .OnNotify =  Cristal2
(04/26 14:38:37) actClickableObject.id dans  TorilachaFocus1 .OnNotify =  1
(04/26 14:38:37) self.__class__.etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:37) global_etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:38) ObjectMsg.value dans  TorilachaFocus1 .OnNotify =  Cristal2
(04/26 14:38:38) actClickableObject.id dans  TorilachaFocus1 .OnNotify =  1
(04/26 14:38:38) self.__class__.etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:38) global_etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 1, 'Cristal3': 0, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:38) ObjectMsg.value dans  TorilachaFocus1 .OnNotify =  Cristal3
(04/26 14:38:38) actClickableObject.id dans  TorilachaFocus1 .OnNotify =  1
(04/26 14:38:38) self.__class__.etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 1, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:38) global_etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 1, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:38) ObjectMsg.value dans  TorilachaFocus1 .OnNotify =  Cristal3
(04/26 14:38:38) actClickableObject.id dans  TorilachaFocus1 .OnNotify =  1
(04/26 14:38:38) self.__class__.etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 1, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}
(04/26 14:38:38) global_etatCristaux dans  TorilachaFocus1 .OnNotify =  {'Cristal2': 0, 'Cristal3': 1, 'Cristal1': 0, 'Cristal4': 0, 'Cristal5': 0}


Well, I'm agree with you, it's not the good way, so you say I have to learn SDL variables. Where can I start ?
Our next age issue is for may 1st, I would like to have something new :)

Even if I abandon that way, I would like to understand, so if someone have an explanation, I'd appreciate it.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: [python] question about class attribute

Postby D'Lanor » Sat Apr 26, 2008 8:29 am

Gbadji wrote:Yes, each instance is independant, all instance attributes are own by the instance but the class attributes are, if I make no mistake, common for all the instances of the class. Why that doesn't work here ?
The global variables aren't working too.

Yes, that is what I mean. All Python instances are totally independent. Globals don't carry over between instances. Don't ask me why. It is something I learned through experience.

If you look at Cyan's code you'll see that they always use global variables. One would expect these to clash with all the importing that is going on and all, but they never do because of the Python instancing.
If you want objects to act independently this is actually quite useful. I have made use of this feature a few times.

On to basic SDL variables. If it is simply a state you want to save then you do not have to add anything in Blender. It is just Python and SDL. The SDL file for an on/off state would look something like this.

Code: Select all
STATEDESC MyAge
{
   VERSION 1

   VAR BOOL    MyState[1]   DEFAULT=0
}


DEFAULT=0 will set the variable to 0 when the age is visited for the first time.

Reading an SDL with Python:

Code: Select all
            ageSDL = PtGetAgeSDL()
            getSDL = ageSDL['MyState'][0]


Changing an SDL with Python:

Code: Select all
            ageSDL = PtGetAgeSDL()
            ageSDL['MyState'] = (1,)
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: [python] question about class attribute

Postby belford » Sat Apr 26, 2008 3:11 pm

All Python instances are totally independent. Globals don't carry over between instances. Don't ask me why.


I think you must be misunderstanding the situation. This is valid Python which demonstrates a class variable:

Code: Select all
class Foo:
   glob = {}
 
f1 = Foo()
f2 = Foo()
f1.glob[1] = 2
f2.glob[11] = 22
f1.glob
=> {1: 2, 11: 22}
f2.glob
=> {1: 2, 11: 22}
Foo.glob
=> {1: 2, 11: 22}


Both instances (and the class object) are sharing the same "glob" dict. This is essentially what Gbadji is doing. (That transcript is from Python 2.3.5, but 2.2 wasn't different in this wise.)

Now, if you *assign* to an instance's field -- say, by typing "f1.glob = {}" -- you shadow the class property with an individual one, and thereafter f1.glob is a separate thing. But Gbadji isn't doing that.

Cyan has done something weird if all this is behaving differently. One would hope there would be a wiki page somewhere explaining what.
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 6 guests

cron