Yardım BoardWithTitleBar' object has no attribute 'SetOnMouseLeftButtonUpEvent'

  • Konuyu açan Konuyu açan Ehveniser
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 10
  • Gösterim Gösterim 55
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

Ehveniser

🅹 🅾 🅺 🅴 🆁
Premium Üye
MT Üye
Mesaj
167
Çözümler
11
Beğeni
95
Puan
414
Ticaret Puanı
0
Selamlar,

@YunusEmreOfficial hocamın "Detaylı Mob Target İnfo Tam Sistem" konusunu ekliyordum aşağıdaki şekilde syserr alıyorum.
Sorun nerede olabilir?

syserr:
Genişlet Daralt Kopyala
1102 15:55:10162 :: Traceback (most recent call last):

1102 15:55:10162 ::   File "networkModule.py", line 306, in SetGamePhase

1102 15:55:10163 ::   File "game.py", line 86, in __init__

1102 15:55:10163 ::   File "interfaceModule.py", line 366, in MakeInterface

1102 15:55:10163 ::   File "interfaceModule.py", line 219, in __MakeWindows

1102 15:55:10163 ::   File "uiMiniMap.py", line 223, in __init__

1102 15:55:10163 ::   File "uiMiniMap.py", line 112, in LoadWindow

1102 15:55:10163 :: AttributeError
1102 15:55:10163 :: :
1102 15:55:10163 :: 'BoardWithTitleBar' object has no attribute 'SetOnMouseLeftButtonUpEvent'
1102 15:55:10163 ::
 
Kod:
Genişlet Daralt Kopyala
Class BoardWithTitleBar
sınıfında
Kod:
Genişlet Daralt Kopyala
def SetOnMouseLeftButtonUpEvent
fonksiyonu eksik.
 
Selamlar,

@YunusEmreOfficial hocamın "Detaylı Mob Target İnfo Tam Sistem" konusunu ekliyordum aşağıdaki şekilde syserr alıyorum.
Sorun nerede olabilir?

syserr:
Genişlet Daralt Kopyala
1102 15:55:10162 :: Traceback (most recent call last):

1102 15:55:10162 ::   File "networkModule.py", line 306, in SetGamePhase

1102 15:55:10163 ::   File "game.py", line 86, in __init__

1102 15:55:10163 ::   File "interfaceModule.py", line 366, in MakeInterface

1102 15:55:10163 ::   File "interfaceModule.py", line 219, in __MakeWindows

1102 15:55:10163 ::   File "uiMiniMap.py", line 223, in __init__

1102 15:55:10163 ::   File "uiMiniMap.py", line 112, in LoadWindow

1102 15:55:10163 :: AttributeError
1102 15:55:10163 :: :
1102 15:55:10163 :: 'BoardWithTitleBar' object has no attribute 'SetOnMouseLeftButtonUpEvent'
1102 15:55:10163 ::
Merhaba,
Ui.py de eklemelerini kontrol et değiştir dediğim kısımda hata veriyor. Tab hatası olabilr.
 
Kod:
Genişlet Daralt Kopyala
Class BoardWithTitleBar
sınıfında
Kod:
Genişlet Daralt Kopyala
def SetOnMouseLeftButtonUpEvent
fonksiyonu eksik.
Sistemin bununla bir alakası yok ama öyle hata vermesini çözemedim bir türlü.

Merhaba,
Ui.py de eklemelerini kontrol et değiştir dediğim kısımda hata veriyor. Tab hatası olabilr.
Her yeri kontrol ettim ama çözemedim.
 
Sistemin bununla bir alakası yok ama öyle hata vermesini çözemedim bir türlü.


Her yeri kontrol ettim ama çözemedim.
Bazen fonksiyonun hangi classta olduğu belirtilmemişse temel classlarda arayıp böyle alakasız gözüken bir hata verebiliyor. Ancak hata sende bir classta def SetOnMouseLeftButtonUpEvent fonksiyonunun eksik olması. İlla ki Class BoardWithTitleBar'da olmak zorunda değil. Başka bir classta da eksik olabilir.
 
ui.py içerisinde
Python:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
Var bunun altında

self.onMouseLeftButtonUpEvent = None
Bu eklimi

Python:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.clickEvent = None
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        self.RegisterWindow(layer)
        self.Hide()

Örnek mesela böyle
 
ui.py içerisinde
Kod:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
Var bunun altında

self.onMouseLeftButtonUpEvent = None
Bu eklimi

Kod:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.clickEvent = None
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        self.RegisterWindow(layer)
        self.Hide()

Örnek mesela böyle

Şu şekilde ekledim ben hatalı bir şey var mı?
Bende mesela şu yok: self.clickEvent = None

ui.py:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        if app.ENABLE_MOUSEWHEEL_EVENT:
            self.onMouseWheelEvent=None
        self.RegisterWindow(layer)
        self.Hide()
        if WOC_ENABLE_PRINT_REGISTERS:
            global WocWindowRegister
            WocKey = "{}[{}]".format(self.__class__.__name__, id(self))
            try:
                WocWindowRegister[WocKey] += 1
            except:
                WocWindowRegister[WocKey] = 1
                if WOC_ENABLE_PRINT_STACK:
                    global WocWindowStack
                    WocWindowStack[WocKey] = WocGetStackList()

        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            self.mouseLeftButtonDownEvent = None
            self.mouseLeftButtonDownArgs = None
            self.mouseLeftButtonUpEvent = None
            self.mouseLeftButtonUpArgs = None
            self.mouseLeftButtonDoubleClickEvent = None
            self.mouseRightButtonDownEvent = None
            self.mouseRightButtonDownArgs = None
            self.moveWindowEvent = None
            self.renderEvent = None
            self.renderArgs = None

            self.overInEvent = None
            self.overInArgs = None

            self.overOutEvent = None
            self.overOutArgs = None

            self.baseX = 0
            self.baseY = 0

            self.SetWindowName("NONAME_Window")
 
Şu şekilde ekledim ben hatalı bir şey var mı?
Bende mesela şu yok: self.clickEvent = None

ui.py:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        if app.ENABLE_MOUSEWHEEL_EVENT:
            self.onMouseWheelEvent=None
        self.RegisterWindow(layer)
        self.Hide()
        if WOC_ENABLE_PRINT_REGISTERS:
            global WocWindowRegister
            WocKey = "{}[{}]".format(self.__class__.__name__, id(self))
            try:
                WocWindowRegister[WocKey] += 1
            except:
                WocWindowRegister[WocKey] = 1
                if WOC_ENABLE_PRINT_STACK:
                    global WocWindowStack
                    WocWindowStack[WocKey] = WocGetStackList()

        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            self.mouseLeftButtonDownEvent = None
            self.mouseLeftButtonDownArgs = None
            self.mouseLeftButtonUpEvent = None
            self.mouseLeftButtonUpArgs = None
            self.mouseLeftButtonDoubleClickEvent = None
            self.mouseRightButtonDownEvent = None
            self.mouseRightButtonDownArgs = None
            self.moveWindowEvent = None
            self.renderEvent = None
            self.renderArgs = None

            self.overInEvent = None
            self.overInArgs = None

            self.overOutEvent = None
            self.overOutArgs = None

            self.baseX = 0
            self.baseY = 0

            self.SetWindowName("NONAME_Window")


Kod:
Genişlet Daralt Kopyala
#####################/*/-*/-*/*-/-*/-*/-//-/ 「RcT 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

## Altında Bul

    def SetOnMouseLeftButtonUpEvent(self, event):
        self.onMouseLeftButtonUpEvent = ev

## Değiştir

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

Burayı nasıl ekledin ?
 
Kod:
Genişlet Daralt Kopyala
#####################/*/-*/-*/*-/-*/-*/-//-/ 「RcT 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

## Altında Bul

    def SetOnMouseLeftButtonUpEvent(self, event):
        self.onMouseLeftButtonUpEvent = ev

## Değiştir

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

Burayı nasıl ekledin ?
ui.py:
Genişlet Daralt Kopyala
    def IsIn(self):
        return wndMgr.IsIn(self.hWnd)

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def IsInPosition(self):
            xMouse, yMouse = wndMgr.GetMousePosition()
            x, y = self.GetGlobalPosition()
            return xMouse >= x and xMouse < x + self.GetWidth() and yMouse >= y and yMouse < y + self.GetHeight()

        def SetClickEvent(self, event):
            self.clickEvent = __mem_func__(event)

        def OnMouseLeftButtonDown(self):
            if self.clickEvent:
                self.clickEvent()

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonDoubleClickEvent(self, event):
            self.mouseLeftButtonDoubleClickEvent = event

        def OnMouseLeftButtonDoubleClick(self):
            if self.mouseLeftButtonDoubleClickEvent:
                self.mouseLeftButtonDoubleClickEvent()

        def SetMouseRightButtonDownEvent(self, event, *args):
            self.mouseRightButtonDownEvent = event
            self.mouseRightButtonDownArgs = args

        def OnMouseRightButtonDown(self):
            if self.mouseRightButtonDownEvent:
                apply(self.mouseRightButtonDownEvent, self.mouseRightButtonDownArgs)

        def SetMoveWindowEvent(self, event):
            self.moveWindowEvent = event

        def OnMoveWindow(self, x, y):
            if self.moveWindowEvent:
                self.moveWindowEvent(x, y)

        def SAFE_SetOverInEvent(self, func, *args):
            self.overInEvent = __mem_func__(func)
            self.overInArgs = args

        def SetOverInEvent(self, func, *args):
            self.overInEvent = func
            self.overInArgs = args

        def SAFE_SetOverOutEvent(self, func, *args):
            self.overOutEvent = __mem_func__(func)
            self.overOutArgs = args

        def SetOverOutEvent(self, func, *args):
            self.overOutEvent = func
            self.overOutArgs = args

        def OnMouseOverIn(self):
            if self.overInEvent:
                apply(self.overInEvent, self.overInArgs)

        def OnMouseOverOut(self):
            if self.overOutEvent:
                apply(self.overOutEvent, self.overOutArgs)

        def SAFE_SetRenderEvent(self, event, *args):
            self.renderEvent = __mem_func__(event)
            self.renderArgs = args

        def ClearRenderEvent(self):
            self.renderEvent = None
            self.renderArgs = None

        def OnRender(self):
            if self.renderEvent:
                apply(self.renderEvent, self.renderArgs)

    def OnMouseLeftButtonUp(self):
        if self.onMouseLeftButtonUpEvent:
            self.onMouseLeftButtonUpEvent()

    if app.ENABLE_MOUSEWHEEL_EVENT:
        def SetMouseWheelEvent(self, event):
            self.onMouseWheelEvent = event

        def OnMouseWheel(self, delta):
            # print("OnMouseWheel delta %d" % delta)
            if self.onMouseWheelEvent:
                return self.onMouseWheelEvent(delta)
            return False


class ListBoxEx(Window):
 
ui.py:
Genişlet Daralt Kopyala
    def IsIn(self):
        return wndMgr.IsIn(self.hWnd)

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def IsInPosition(self):
            xMouse, yMouse = wndMgr.GetMousePosition()
            x, y = self.GetGlobalPosition()
            return xMouse >= x and xMouse < x + self.GetWidth() and yMouse >= y and yMouse < y + self.GetHeight()

        def SetClickEvent(self, event):
            self.clickEvent = __mem_func__(event)

        def OnMouseLeftButtonDown(self):
            if self.clickEvent:
                self.clickEvent()

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonDoubleClickEvent(self, event):
            self.mouseLeftButtonDoubleClickEvent = event

        def OnMouseLeftButtonDoubleClick(self):
            if self.mouseLeftButtonDoubleClickEvent:
                self.mouseLeftButtonDoubleClickEvent()

        def SetMouseRightButtonDownEvent(self, event, *args):
            self.mouseRightButtonDownEvent = event
            self.mouseRightButtonDownArgs = args

        def OnMouseRightButtonDown(self):
            if self.mouseRightButtonDownEvent:
                apply(self.mouseRightButtonDownEvent, self.mouseRightButtonDownArgs)

        def SetMoveWindowEvent(self, event):
            self.moveWindowEvent = event

        def OnMoveWindow(self, x, y):
            if self.moveWindowEvent:
                self.moveWindowEvent(x, y)

        def SAFE_SetOverInEvent(self, func, *args):
            self.overInEvent = __mem_func__(func)
            self.overInArgs = args

        def SetOverInEvent(self, func, *args):
            self.overInEvent = func
            self.overInArgs = args

        def SAFE_SetOverOutEvent(self, func, *args):
            self.overOutEvent = __mem_func__(func)
            self.overOutArgs = args

        def SetOverOutEvent(self, func, *args):
            self.overOutEvent = func
            self.overOutArgs = args

        def OnMouseOverIn(self):
            if self.overInEvent:
                apply(self.overInEvent, self.overInArgs)

        def OnMouseOverOut(self):
            if self.overOutEvent:
                apply(self.overOutEvent, self.overOutArgs)

        def SAFE_SetRenderEvent(self, event, *args):
            self.renderEvent = __mem_func__(event)
            self.renderArgs = args

        def ClearRenderEvent(self):
            self.renderEvent = None
            self.renderArgs = None

        def OnRender(self):
            if self.renderEvent:
                apply(self.renderEvent, self.renderArgs)

    def OnMouseLeftButtonUp(self):
        if self.onMouseLeftButtonUpEvent:
            self.onMouseLeftButtonUpEvent()

    if app.ENABLE_MOUSEWHEEL_EVENT:
        def SetMouseWheelEvent(self, event):
            self.onMouseWheelEvent = event

        def OnMouseWheel(self, delta):
            # print("OnMouseWheel delta %d" % delta)
            if self.onMouseWheelEvent:
                return self.onMouseWheelEvent(delta)
            return False


class ListBoxEx(Window):
Ham dosyalarını ve eklediğin dosyalarını ayrı ayrı gönderirmisin hepsini kontrol ediyim.
 
Geri
Üst