by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Russell Keith-Magee
    @freakboy3742
    @tomthedankmemer_twitter Ok - you’re really going to help us our here. “I don’t understand” doesn't give us anything to work with. What are you trying to acheive? How have you tried to make that happen. What errors have you seen? What is the specific source of confusion?
    Tom
    @tomthedankmemer_twitter
    @freakboy3742 Ok so, the program i want to make, on startup, has three buttons that you can press. Each button executes different code and creates windows that display output of that code. I cant quite achieve that because i dont know how to put a window in a window or place any widget at all
    i dont really understand how to work with the beeware classes
    Tom
    @tomthedankmemer_twitter
    by the way- id really prefer if i could make "menus" instead of buttons
    i dont know if that is possible though
    Russell Keith-Magee
    @freakboy3742
    And you’ve done the Toga tutorials? Which put buttons on a GUI, and introduce creating menu items?
    Like - Toga tutorial 0 is literally what you’ve just described - a button on a gui that when you press it does things.
    And the beeware Tutorial isn't far off either.
    Tom
    @tomthedankmemer_twitter
    when i overwrite the code from the first part of tutorial one on app.py it doesnt even run
    i dont know how to change it into briefcase format
    Russell Keith-Magee
    @freakboy3742
    First off: Is this toga tutorial 1 or the beeware tutorial 1?
    Tom
    @tomthedankmemer_twitter
    toga tutorial 0
    Russell Keith-Magee
    @freakboy3742
    Ok - and the tutorial works, but you can’t adapt it to briefcase?
    Tom
    @tomthedankmemer_twitter
    i dont know how to adapt it to my pregenerated briefcase app.py code
    Russell Keith-Magee
    @freakboy3742
    Ok; if you want to see a working example of tutorial 0 as a briefcase project; the Toga codebase has that code
    Tom
    @tomthedankmemer_twitter
    alright, that works!
    so, i had a question in my mind
    how does app.py read the code
    from top down?
    i dont quite get it
    what is the path that it takes, and how can i manipulate that to put widgets inside boxes etc
    keep in mind im kind of a rookie in object oriented
    Russell Keith-Magee
    @freakboy3742
    I don’t understand what you mean by “the path it takes”.
    Tom
    @tomthedankmemer_twitter
    which code gets read first etc
    i can only see a main() function getting executed, but i dont know what code it reffers to
    Russell Keith-Magee
    @freakboy3742
    Ok - I’m really having difficulty understanding where the source of confusion is. app.py isn’t that big. It defines a “build” method that creates a box and puts a button in that box. And the GUI appears with a button.
    Where in the process are you getting lost?
    Tom
    @tomthedankmemer_twitter
    first of all, i see many functions getting defined,
    but i cant understand how they get executed
    secondly, in my mind, im only familiar with the concept of html when building a gui, in which you literally put <stuff><stuff> within other <things>(Here)</things>
    Russell Keith-Magee
    @freakboy3742
    Right - and the same thing is happening here. You don’t control how the app “runs” - the build method in this example is your “HTML” document.
    And the layout is very closely aligned with HTML. If you get to the next tutorial, it’s called “you put a box inside another box” - which is literally what HTML is.
    Sorry - tutorial 2.
    Tom
    @tomthedankmemer_twitter
    hmm ok so
    Russell Keith-Magee
    @freakboy3742
    So all you’re describing are the widgets you want on the screen - the buttons, text inputs etc - and putting them in boxes that relate to one another.
    Tom
    @tomthedankmemer_twitter
    what does "return box" do inside the function
    Russell Keith-Magee
    @freakboy3742
    Ok - you really need to do all the tutorial.
    That gets explained along the tutorial path.
    Tom
    @tomthedankmemer_twitter
    will the code work with briefcase though?
    Russell Keith-Magee
    @freakboy3742
    Tutorial 0 is a simple example. It defines a single function (build) that… builds… the GUI.
    Why does that matter?
    Briefcase is a packaging tool.
    You’re not up to packaging yet.
    You’re still building the app.
    Tom
    @tomthedankmemer_twitter
    wait, so do i use toga instead?
    im confused
    Russell Keith-Magee
    @freakboy3742
    Ok - so your question like asking “do I use this hammer to bake this cake”. No - you use the hammer to hammer the nail. You bake the cake by baking a cake.
    Lets step back.
    How did you find out about BeeWare?
    Because it seems like you’ve got the end of half a dozen threads, and you’ve missed the actual narrative about how the pieces all fit together.
    Tom
    @tomthedankmemer_twitter
    i was looking for a way to add gui to a python program that also is cross platform, i then realised that android is, for the time being, not supported but is going to be in the future, so i preffered beeware from the other alternatives because of the native support
    Russell Keith-Magee
    @freakboy3742
    Ok - that’s not what I asked.