Jump to content
Ted

sorry for the newbe question...

Recommended Posts

Hi all, though I have a lot of experience with VCL I'm totally new to FMX.  I have been trying to get the ToDoList demo to run an cannot get past the error

AttributeError: Error in getting property "_TodoApp__add_task_on_click".

The relevant code chunk is straight from the demo.  Thanks for any help getting me started. Windows 11, Python 3.8.1 running in VScode

     self.add_task_btn = Button(self)
        self.add_task_btn.Parent = self
        self.add_task_btn.SetBounds(150, 75, 100, 30)
        self.add_task_btn.Text = "Add Task"
        self.add_task_btn.OnClick = self.__add_task_on_click
 
        self.del_task_btn = Button(self)
        self.del_task_btn.SetProps(Parent=self, Text="Delete Task")
        self.del_task_btn.SetBounds(150, 120, 100, 30)
        self.del_task_btn.OnClick = self.__del_task_on_click
 
        self.list_of_tasks = ListBox(self)
        self.list_of_tasks.Parent = self
        self.list_of_tasks.SetBounds(300, 50, 300, 350)
 
        def __add_task_on_click(self, Sender)
            self.list_of_tasks.Items.Add(self.task_text_box.Text)
            self.task_text_box.Text = ""
 
        def __del_task_on_click(self, Sender)
            self.list_of_tasks.Items.Delete(0)
Edited by Ted
emogies inserted

Share this post


Link to post
1 hour ago, Ted said:

Python 3.8.1 running in VScode

Then what does this have to do with Delphi/FMX?

Share this post


Link to post

Thanks for the response, I am importing delphifmx into Python for this program.

from delphifmx import *

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×