flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.56k stars 452 forks source link

I cant use builded Flet. #4209

Closed Wanna-Pizza closed 1 month ago

Wanna-Pizza commented 1 month ago

Duplicate Check

Describe the bug

I added new attribute to page.py. "bgblur"

but when i run script i see this message:

    print(page.window.bgblur)
          ^^^^^^^^^^^^^^^^^^
AttributeError: 'Window' object has no attribute 'bgblur'

image

Code sample

Code ```python class Window: def __init__(self, page: "Page"): self.page = page self.__alignment = None self.__on_event = EventHandler(lambda e: WindowEvent(e)) self.page._add_event_handler( "window_event", self.__on_event.get_handler(), ) # bgcolor @property def bgcolor(self) -> Optional[str]: return self.page._get_attr("windowBgcolor") @bgcolor.setter def bgcolor(self, value: Optional[str]): self.page._set_attr("windowBgcolor", value) # bgblur @property def bgblur(self) -> Optional[str]: return self.page._get_attr("windowBgcolor") @bgblur.setter def bgblur(self, value: Optional[str]): self.page._set_attr("windowBgcolor", value) ``` ![image](https://github.com/user-attachments/assets/307a1852-b382-45da-8af0-00b77bbbbbd2)

Well I DONT UNDERSTAND why its not working. What I need to do? Why its not using builded flet.

To reproduce

Look to your instructions. I get same error every time.

Expected behavior

I need to work it

Screenshots / Videos

Captures [Upload media here]

Operating System

macOS

Operating system details

Windows 11

Flet version

0.23.1

Regression

No, it isn't

Suggestions

No response

Logs

Logs ```console [Paste your logs here] ```

Additional details

No response

OwenMcDonnell commented 1 month ago

Have you followed the steps here to build a local version of flet with your changes to the Window class?

Wanna-Pizza commented 1 month ago

Have you followed the steps here to build a local version of flet with your changes to the Window class?

Uhm. Can you show or resend where is it? I cant find in documentation about that

Wanna-Pizza commented 1 month ago

Have you followed the steps here to build a local version of flet with your changes to the Window class?

Uhm. I dont what exactly I did. But it works now :)