❔ Can someone help me with the buttons?

The buttons doesn’t work in my cookbook. Can someone’s help me?
187 Replies
ero
ero2y ago
let me see here... ah! the issue is that you didn't do the thing that makes them work! here you go: just do the thing that will make them work hope that helps! $details
MODiX
MODiX2y ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Bad Victory
Bad VictoryOP2y ago
When I click the Ok Button it does not do anything, I want it to do what I want it to do
Jimmacle
Jimmacle2y ago
make it do it
Bad Victory
Bad VictoryOP2y ago
How?
Jimmacle
Jimmacle2y ago
can't tell you because you didn't provide enough detail what ui framework? what code do you have now? what have you tried to fix it? @Bad Victory do not send unsolicited DMs to people in this server, the place for help is in this post
Bad Victory
Bad VictoryOP2y ago
Eehhh How else am I supposed to show you?
Jimmacle
Jimmacle2y ago
by posting it... here? there's no guarantee i can fix what's wrong, and you will want someone else to be able to jump in if they know more than me
Bad Victory
Bad VictoryOP2y ago
How?
Jimmacle
Jimmacle2y ago
$details
MODiX
MODiX2y ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Bad Victory
Bad VictoryOP2y ago
How does it work?
jcotton42
jcotton422y ago
have you considered just clicking the link
Bad Victory
Bad VictoryOP2y ago
I did What do I do now?
jcotton42
jcotton422y ago
... do you not see the buttons in the top left?
Bad Victory
Bad VictoryOP2y ago
What do they do?
jcotton42
jcotton422y ago
stare can't tell if you're trying to waste our time, or just refuse to even try to help yourself and/or explore
Bad Victory
Bad VictoryOP2y ago
I just want to do it right
jcotton42
jcotton422y ago
I promise your computer will not explode if you try clicking them
Gebz
Gebz2y ago
lol where is your UI buddy? kekw
ero
ero2y ago
i think they're more confused on what exactly to paste
Gebz
Gebz2y ago
Even a screenshot might suffice
Bad Victory
Bad VictoryOP2y ago
The buttons didn’t do anything
Gebz
Gebz2y ago
What buttons? 👀
Bad Victory
Bad VictoryOP2y ago
The ones at top left
Gebz
Gebz2y ago
top left where? 👀
Bad Victory
Bad VictoryOP2y ago
BlazeBin
A tool for sharing your source code with the world!
Gebz
Gebz2y ago
this is a generic link, you need to share the link that has your code
Bad Victory
Bad VictoryOP2y ago
How does it get my code?
Gebz
Gebz2y ago
heard of github? you can upload your code onto it 😄
Bad Victory
Bad VictoryOP2y ago
Oh, I got that
Gebz
Gebz2y ago
you can share a repo
ero
ero2y ago
you can also just copy and paste
Gebz
Gebz2y ago
Or that.. make sure you put it in
CODE
CODE
Bad Victory
Bad VictoryOP2y ago
How do I do that?
Gebz
Gebz2y ago
using three `'s
Bad Victory
Bad VictoryOP2y ago
S?
Gebz
Gebz2y ago
it's this symbol: `
Bad Victory
Bad VictoryOP2y ago
Where is it?
Gebz
Gebz2y ago
top left of your keyboard under escape
Bad Victory
Bad VictoryOP2y ago
I see it
Jimmacle
Jimmacle2y ago
it turns out, that command from earlier tells you another command to use to get more information $code
MODiX
MODiX2y ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Bad Victory
Bad VictoryOP2y ago
Why doesn’t anything happen? Did I do it wrong?
Gebz
Gebz2y ago
are you trolling? honestly..
Bad Victory
Bad VictoryOP2y ago
No I am trying to tap the button
Gebz
Gebz2y ago
<:picard_facepalm:616692703685509130>
Bad Victory
Bad VictoryOP2y ago
Star Trek
Jimmacle
Jimmacle2y ago
are you trying to code from your phone?
Bad Victory
Bad VictoryOP2y ago
No
Gebz
Gebz2y ago
Jimmacle
Jimmacle2y ago
forget the paste website, just do that for now ^
Bad Victory
Bad VictoryOP2y ago
Do what?
Jimmacle
Jimmacle2y ago
i give up
MODiX
MODiX2y ago
gebz#7155
Quoted by
From gebz#7155
React with ❌ to remove this embed.
Gebz
Gebz2y ago
do this:
Bad Victory
Bad VictoryOP2y ago
What is that?
Jimmacle
Jimmacle2y ago
have you used discord before?
Bad Victory
Bad VictoryOP2y ago
Yes
Jimmacle
Jimmacle2y ago
it's
this
this
just type it in
Gebz
Gebz2y ago
Man, you're intentionally wasting our time
Bad Victory
Bad VictoryOP2y ago
this
Jimmacle
Jimmacle2y ago
you can see the image right the one with the ``` characters?
ero
ero2y ago
🍿
Bad Victory
Bad VictoryOP2y ago
Wait, can we start over? I am confused
Gebz
Gebz2y ago
```\ your code ```\
Jimmacle
Jimmacle2y ago
just forget all of it, copy and paste your code as is this is taking way too long to explain
ero
ero2y ago
at this stage i'm not even sure whether they have code at all
Bad Victory
Bad VictoryOP2y ago
It say it is too big
Jimmacle
Jimmacle2y ago
then upload it to some paste website and share the link to that
Gebz
Gebz2y ago
there's a 2000 character limit
Jimmacle
Jimmacle2y ago
or just upload the whole .cs file(s)
Bad Victory
Bad VictoryOP2y ago
BlazeBin - jqetpomnurgz
A tool for sharing your source code with the world!
Bad Victory
Bad VictoryOP2y ago
Like this?
Jimmacle
Jimmacle2y ago
yes so which part isn't working
Bad Victory
Bad VictoryOP2y ago
The Ok button
Jimmacle
Jimmacle2y ago
you don't have any code in that handler it's not doing anything because you aren't telling it to
Gebz
Gebz2y ago
you have to tell the thing to do stuff in order for the thing to do stuff
Bad Victory
Bad VictoryOP2y ago
I tried but it just said error
Jimmacle
Jimmacle2y ago
i guarantee it didn't just say "error" explain exactly what you tried and what the exact error was
Bad Victory
Bad VictoryOP2y ago
I typed "close the window" It did not work
Jimmacle
Jimmacle2y ago
...
Gebz
Gebz2y ago
kekwkekwkekwkekw
jcotton42
jcotton422y ago
if you don't start giving details, people are going to start leaving this thread and blocking you I know I'm tempted don't make helping you like pulling teeth
Jimmacle
Jimmacle2y ago
yeah i'm sorry but this seriously seems like trolling do you expect to write plain english into a piece of code and have it work?
Bad Victory
Bad VictoryOP2y ago
Why?
jcotton42
jcotton422y ago
just give details
Bad Victory
Bad VictoryOP2y ago
It was what some told me It is supposed to add the ingredients
Gebz
Gebz2y ago
.NET documentation
Learn to use .NET to create applications on any platform using C#, F#, and Visual Basic. Browse API reference, sample code, tutorials, and more.
Jimmacle
Jimmacle2y ago
where did the rest of the code come from? because i don't think you wrote it based on these questions
Bad Victory
Bad VictoryOP2y ago
I did
Gebz
Gebz2y ago
might have just been a chatGPT copy pasta
Jimmacle
Jimmacle2y ago
so you understand that C# has specific syntax rules you have to follow
Bad Victory
Bad VictoryOP2y ago
Can that do it?
Jimmacle
Jimmacle2y ago
you should definitely not use chatgpt at this point
Bad Victory
Bad VictoryOP2y ago
Ok
Gebz
Gebz2y ago
There's some excellent C# courses on youtube
Gebz
Gebz2y ago
freeCodeCamp.org
YouTube
C# Tutorial - Full Course for Beginners
This course will give you a full introduction into all of the core concepts in C# (aka C Sharp). Follow along with the course and you'll be a C# programmer in no time! ⭐️ Contents ⭐️ ⌨️ (0:00:00) Introduction ⌨️ (0:01:18) Installation & Setup ⌨️ (0:05:03) Drawing a Shape ⌨️ (0:17:23) Variables ⌨️ (0:30:06) Data Types ⌨️ (0:37:17) Working With S...
Jimmacle
Jimmacle2y ago
yeah right now i'd suggest just starting from zero with a basic tutorial it's going to be very hard for you to get help if you don't understand the basics of the language
jcotton42
jcotton422y ago
The C# Player’s Guide
About the C# Player’s Guide
The home of the book The C# Player’s Guide
jcotton42
jcotton422y ago
I skimmed the freecodecamp video and was... not impressed
Gebz
Gebz2y ago
I was just sharing one of many examples
Bad Victory
Bad VictoryOP2y ago
So, what should I write?
jcotton42
jcotton422y ago
@Bad Victory you need guided intro material, to be blunt
Jimmacle
Jimmacle2y ago
i'm not going to just give you the answer, because if i did you wouldn't understand it
jcotton42
jcotton422y ago
you are clearly missing some fundamentals
Gebz
Gebz2y ago
here's the official one from the dotnet foundation: https://www.youtube.com/watch?v=Z5JS36NlJiU
dotnet
YouTube
C# for Beginners | Full 2-hour course
C# is a powerful and widely used programming language that you can use to make websites, games, mobile apps, desktop apps and more with .NET. In this video, we'll teach you all the basics of C# and show you how to build a bank account. Get the .NET Interactive Notebooks and follow along at home: https://aka.ms/csharpnotebooks Free self-guided ...
jcotton42
jcotton422y ago
pick up a book, C# Player's Guide is good
Bad Victory
Bad VictoryOP2y ago
Couldn't I just show the code?
Jimmacle
Jimmacle2y ago
i think i have that in a box, never actually read it pepethink
jcotton42
jcotton422y ago
you need to learn this isn't just a simple question, you're struggling with fundamentals find some intro material, book, video series, doesn't matter
Jimmacle
Jimmacle2y ago
it's also a school assignment, so you should ask your teacher for help
Bad Victory
Bad VictoryOP2y ago
He isn't answering
Jimmacle
Jimmacle2y ago
i just noticed
public int MaxNumOfIngredients
{
get { return MaxNumOfIngredients; }
}
public int MaxNumOfIngredients
{
get { return MaxNumOfIngredients; }
}
PepeHmmm going to guess your teacher expects you to ask for help given //Ask for help to check the status of your programming - project
Bad Victory
Bad VictoryOP2y ago
What is it with that?
Jimmacle
Jimmacle2y ago
can you explain what it does to me?
Bad Victory
Bad VictoryOP2y ago
It gets the MaxNumOfIngredients and returns it
Jimmacle
Jimmacle2y ago
from where?
Bad Victory
Bad VictoryOP2y ago
From MaxNumOfIngredients
Jimmacle
Jimmacle2y ago
and where does that get it from?
Bad Victory
Bad VictoryOP2y ago
From MaxNumOfIngredients
Jimmacle
Jimmacle2y ago
and where does that get it from? (do you see where i'm going with this)
Bad Victory
Bad VictoryOP2y ago
From MaxNumOfIngredients
jcotton42
jcotton422y ago
I can't tell if you're pulling our leg, or don't see how this is circular
Bad Victory
Bad VictoryOP2y ago
I see it is circular
Jimmacle
Jimmacle2y ago
so if you actually tried to get the value of MaxNumOfIngredients, it would crash with a stack overflow because it tries to get the value of itself infinitely
Bad Victory
Bad VictoryOP2y ago
How do I fix that?
Jimmacle
Jimmacle2y ago
return the value of another field/property or just make it an auto-property
Bad Victory
Bad VictoryOP2y ago
What field?
Jimmacle
Jimmacle2y ago
one you would make to store the max number of ingredients
Bad Victory
Bad VictoryOP2y ago
Which one is that?
Jimmacle
Jimmacle2y ago
i'm going to have to ask you to try and think of the answer yourself before asking these questions i won't spoonfeed the entire answer because you won't learn anything, if you're this stuck you should try to get help in class because i don't know where you're supposed to be in your learning
Bad Victory
Bad VictoryOP2y ago
It still does not work
Jimmacle
Jimmacle2y ago
i can't do anything with that information
Bad Victory
Bad VictoryOP2y ago
What do you want to know
Jimmacle
Jimmacle2y ago
think about what i might need to know to be able to help you
Bad Victory
Bad VictoryOP2y ago
private void btnOK_Click(object sender, EventArgs e) { int index = lstIngredients.SelectedIndex; }
Jimmacle
Jimmacle2y ago
okay, what do you expect that to do and what is it actually doing?
Bad Victory
Bad VictoryOP2y ago
Make it work
Jimmacle
Jimmacle2y ago
again, that is completely unspecific what do you want to happen when you click OK and how does that line of code help you get there?
Bad Victory
Bad VictoryOP2y ago
I want it to add the ingedients to txtBoxDescription
Jimmacle
Jimmacle2y ago
okay, so what does the line of code you added do
Bad Victory
Bad VictoryOP2y ago
How do I know that?
Jimmacle
Jimmacle2y ago
you wrote it, you should know what it does if you don't, you need to figure it out you won't get anywhere by copying and pasting random pieces of code, you need to actually understand what you're doing
Bad Victory
Bad VictoryOP2y ago
It is supposed to add the ingredients to txtBoxDescription
Jimmacle
Jimmacle2y ago
and how does it do that? where is txtBoxDescription in that code?
Bad Victory
Bad VictoryOP2y ago
private void AddRecipe() { // Get the properties from currRecipe for example "Name" currRecipe.Name = txtBoxRecipeName.Text; // Do similar for other properties Description and FoodCategory from currRecipe. currRecipe.Description = txtBoxDescription.Text; currRecipe.FoodCategory = (FoodCategory)Enum.Parse(typeof(FoodCategory), cmbBoxCategory.Text); // Check if txtBoxRecipeName is not null if (txtBoxRecipeName != null) { // Call the method AddRecipe from recipeManager to add currRecipe recipeManager.AddRecipe(currRecipe); } }
Jimmacle
Jimmacle2y ago
that is completely different code i need to go to bed, and you seriously need to review your notes or go through an intro C# tutorial instead of blindly copying code around and expecting something to just start working you cannot write programs if you don't understand what you're writing
WTDawson9
WTDawson92y ago
@Bad Victory Let's start with: What are you using to create this app? Winforms, WPF, Xamarin Forms? 2nd how are you creating the button and 3rd how are you trying to capture when they click on the button?
WTDawson9
WTDawson92y ago
Button Class (System.Windows.Forms)
Represents a Windows button control.
WPF - Buttons
WPF Buttons - The Button class represents the most basic type of button control. The hierarchical inheritance of Button class is as follows −
Xamarin.Forms Button - Xamarin
The Button responds to a tap or click that directs an application to carry out a particular task.
WTDawson9
WTDawson92y ago
Do a little searching before you ask for help, I found all of those within a few minutes
Bad Victory
Bad VictoryOP2y ago
Visual
anita
anita2y ago
Visual Studio? The question was what framework, not what IDE
Bad Victory
Bad VictoryOP2y ago
C#
WTDawson9
WTDawson92y ago
What do you mean by Visual that gives me no information at all Framework not language
Bad Victory
Bad VictoryOP2y ago
Microsoft Visual
WTDawson9
WTDawson92y ago
What do you mean Right okay, look at my questions and answer those.
Bad Victory
Bad VictoryOP2y ago
What is Framework?
WTDawson9
WTDawson92y ago
Winforms, WPF, Xamarin Forms these for example @Bad Victory
anita
anita2y ago
I think this is a troll, how does this server normally deal with such behaviour?
WTDawson9
WTDawson92y ago
Let's get some moderators $help
MODiX
MODiX2y ago
How to get the best help catpog Make a post in #help or one of the topic channels under Development. Avoid askingcatthinking Can anybody help catthinking Has anyone used catthinking Why doesn't my code work? C# is a big area! No one knows they can help unless you tell them about the small area you're trying to work in. Explain what you are doing, and potentially why for as much context as possible. Avoid screenshots where possible, share code directly in Discord. Type $code into chat to learn how to post code. See https://www.nohello.net and https://dontasktoask.com if you want common help chat room etiquette.
WTDawson9
WTDawson92y ago
No $commands Damn it I don't know how to get a moderator I'll ping an online mod I have created a ticket.
RubyNovaDev
RubyNovaDev2y ago
ReimuPeek has been quite the read I get the impression that the assessment of "missing fundamentals" is fairly correct $helloworld
RubyNovaDev
RubyNovaDev2y ago
@Bad Victory I'd probably go through one of these with that said I don't think there's anything productive that's going to come out of this at this point
Bad Victory
Bad VictoryOP2y ago
All that just for a button? Can’t anyone just tell me what to do?
RubyNovaDev
RubyNovaDev2y ago
if you want it to go in one ear and out the other? sure we potentially could but what good would that really do you the thing is its also already been explained why your button doesn't work its because its not been programmed to do anything if you just want an answer and to not really fill in the gaps, then sure maybe one of us could figure out the exact code you'd need with the right information but like is that really what you want? surely you would like to have a proper understanding of how this stuff works? 😅
Bad Victory
Bad VictoryOP2y ago
How do I fix it?
RubyNovaDev
RubyNovaDev2y ago
you'd have to get the item out of the ingredients list at the selected index then assign the string to the Text property of your textbox basically right now you're only getting the index but then doing nothing with it
Bad Victory
Bad VictoryOP2y ago
What does that look like?
RubyNovaDev
RubyNovaDev2y ago
¯\_(ツ)_/¯ I don't do winforms so don't really remember last time I touched it was like 6 years ago if you look at the microsoft documentation though it should show you what methods and properties do which things
Bad Victory
Bad VictoryOP2y ago
Can you DM me?
RubyNovaDev
RubyNovaDev2y ago
no sorry I have my DMs turned off as the server owner its basically the only private space I have left lol
Bad Victory
Bad VictoryOP2y ago
How else am I supposed to show you?
RubyNovaDev
RubyNovaDev2y ago
ehhh
Bad Victory
Bad VictoryOP2y ago
How cannrun it i here?
RubyNovaDev
RubyNovaDev2y ago
um what?
Bad Victory
Bad VictoryOP2y ago
I found my old GitHub
Bad Victory
Bad VictoryOP2y ago
GitHub
GitHub - TheSupremeMaster/Recipe
Contribute to TheSupremeMaster/Recipe development by creating an account on GitHub.
RubyNovaDev
RubyNovaDev2y ago
uhhh
Bad Victory
Bad VictoryOP2y ago
Can you run it and see what is wrong?
RubyNovaDev
RubyNovaDev2y ago
I mean I've already specified your issue I'm not super equipped to help with winforms stuff specifically though like, there's a whole documentation page on the stuff you can follow
WTDawson9
WTDawson92y ago
Button Class (System.Windows.Forms)
Represents a Windows button control.
WTDawson9
WTDawson92y ago
Please next time, just say what framework you're using
RubyNovaDev
RubyNovaDev2y ago
I need to step out, the game studio I work for's gonna wonder where the hell I've gone if I'm not back soon
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server