Giter Club home page Giter Club logo

Comments (8)

untitaker avatar untitaker commented on August 30, 2024 1

Hi @AnubhaAgrawal,

Sorry but no, this file has nothing to do with that. When running the interactive editor using todo edit ..., we want to show something that allows the user to move the task to a different task list. Please note this is a more difficult issue.

The entire editor interface is built up in TodoEditor.__init__. The outermost widget is created on line 89, which chains all previous widgets (text fields, buttons) together.

  1. We would have to create a new variable self.current_list which is initialized with todo.list.

  2. urwid.RadioButton can do this, so you would have to create one radiobutton for each value in self.lists. If the radio button changes, self.current_list is changed to the new value

  3. In _save_inner, todo.list is set to self.current_list

from todoman.

AnubhaAgrawal avatar AnubhaAgrawal commented on August 30, 2024 1

ok. I think firstly I'll try for some other issue

from todoman.

AnubhaAgrawal avatar AnubhaAgrawal commented on August 30, 2024

Hi, I am new I would like to take up this issue.

In my opinion, I would have to make changes in the code here.
Am I wrong?

from todoman.

WhyNotHugo avatar WhyNotHugo commented on August 30, 2024

Looks like @untitaker beat me and replied while I was still typing. Still, here goes.

Hi there! Thanks for your interest in todoman.

That's actually not right. Briefly:

  • cli.py contains all the code involved in parsing commands/options and processing that. This is the starting point when running the app (and, admittedly, the more complex part, IMHO).
  • models.py contains all the code involved in reading/writing/processing data (todos, lists, etc).
  • ui.py has all the code for the User Interface, including the TodoEditor class.

This issue is, mostly in ui.py, and the above comments cover most of the relevant details.

from todoman.

AnubhaAgrawal avatar AnubhaAgrawal commented on August 30, 2024

sorry, for negative comment now I want to work on this issue.
can anyone tell that if I want to print the values in self.lists then how to I get them?

from todoman.

untitaker avatar untitaker commented on August 30, 2024

Hi, sorry for the slow response, if you want to find a different issue to work on that's fine of course.

I'm not sure if I understand your question. For this task you wouldn't have to print anything, but if you want to print the lists for debugging, print(self.lists) should be enough.

from todoman.

AnubhaAgrawal avatar AnubhaAgrawal commented on August 30, 2024

No, as you(@untitaker) say that you would have to create one radiobutton for each value in .self.lists. but I don't find the values in self.lists.

from todoman.

untitaker avatar untitaker commented on August 30, 2024

It appears self.lists is a generator, but for list in self.lists should still work. If you replace line 33 in ui.py with self.lists = list(lists), you should see the values.

If you have time we can discuss this over IRC because this allows for faster back-and-forth communication.

from todoman.

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.