Code Monkey home page Code Monkey logo

Comments (7)

pravintargaryen avatar pravintargaryen commented on May 28, 2024 1

@AlexandreSajus assign this to me

from taipy.

FlorianJacta avatar FlorianJacta commented on May 28, 2024 1

This does not work even if you don't inherit from the Gui. This code give the same error:

from taipy.gui import Gui
import taipy.gui.builder as tgb
import pandas as pd

class FoodDatabase:
    def __init__(self):
        self.food_df = pd.DataFrame({
            "Meal": ["Lunch", "Dinner", "Lunch", "Lunch"],
            "Category": ["Food", "Food", "Drink", "Food"],
            "Name": ["Burger", "Pizza", "Soda", "Salad"],
            "Calories": [300, 400, 150, 200],
        })

    def create_page(self):
        with tgb.Page() as page:
            tgb.table('{self.food_df}', filter=True)
            return page

if __name__ == '__main__':
    food_database = FoodDatabase()
    page = food_database.create_page()
    Gui(page).run(debug=True, use_reloader=True)

I don't think it is supposed to be supported in Taipy, but maybe it could be an improvement.

from taipy.

jrobinAV avatar jrobinAV commented on May 28, 2024

@pravintargaryen It requires a deep understanding of Taipy code. We need to handle it internally.
I remove the assignment.

from taipy.

dinhlongviolin1 avatar dinhlongviolin1 commented on May 28, 2024

I have not seen this syntax before. Can you let me know where you saw this one? Thanks!

from taipy.

AlexandreSajus avatar AlexandreSajus commented on May 28, 2024

Which part of the syntax is unclear? Unfortunately, this is not my code. A Discord user reported this issue.

from taipy.

dinhlongviolin1 avatar dinhlongviolin1 commented on May 28, 2024

Gui object is not designed to be inherited. They can create an instance of the Gui instead of inheriting them.

from taipy.

AlexandreSajus avatar AlexandreSajus commented on May 28, 2024

Okay I understand. We can close this as non-planned then

from taipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.