C
C#14mo ago
Bad Victory

❔ Can someone help me with the buttons?

The buttons doesn’t work in my cookbook. Can someone’s help me?
187 Replies
ero
ero14mo 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
MODiX14mo 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 Victory14mo ago
When I click the Ok Button it does not do anything, I want it to do what I want it to do
Jimmacle
Jimmacle14mo ago
make it do it
Bad Victory
Bad Victory14mo ago
How?
Jimmacle
Jimmacle14mo 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 Victory14mo ago
Eehhh How else am I supposed to show you?
Jimmacle
Jimmacle14mo 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 Victory14mo ago
How?
Jimmacle
Jimmacle14mo ago
$details
MODiX
MODiX14mo 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 Victory14mo ago
How does it work?
jcotton42
jcotton4214mo ago
have you considered just clicking the link
Bad Victory
Bad Victory14mo ago
I did What do I do now?
jcotton42
jcotton4214mo ago
... do you not see the buttons in the top left?
Bad Victory
Bad Victory14mo ago
What do they do?
jcotton42
jcotton4214mo 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 Victory14mo ago
I just want to do it right
jcotton42
jcotton4214mo ago
I promise your computer will not explode if you try clicking them
Gebz
Gebz14mo ago
lol where is your UI buddy? kekw
ero
ero14mo ago
i think they're more confused on what exactly to paste
Gebz
Gebz14mo ago
Even a screenshot might suffice
Bad Victory
Bad Victory14mo ago
The buttons didn’t do anything
Gebz
Gebz14mo ago
What buttons? 👀
Bad Victory
Bad Victory14mo ago
The ones at top left
Gebz
Gebz14mo ago
top left where? 👀
Bad Victory
Bad Victory14mo ago
BlazeBin
A tool for sharing your source code with the world!
Gebz
Gebz14mo ago
this is a generic link, you need to share the link that has your code
Bad Victory
Bad Victory14mo ago
How does it get my code?
Gebz
Gebz14mo ago
heard of github? you can upload your code onto it 😄
Bad Victory
Bad Victory14mo ago
Oh, I got that
Gebz
Gebz14mo ago
you can share a repo
ero
ero14mo ago
you can also just copy and paste
Gebz
Gebz14mo ago
Or that.. make sure you put it in
CODE
CODE
Bad Victory
Bad Victory14mo ago
How do I do that?
Gebz
Gebz14mo ago
using three `'s
Bad Victory
Bad Victory14mo ago
S?
Gebz
Gebz14mo ago
it's this symbol: `
Bad Victory
Bad Victory14mo ago
Where is it?
Gebz
Gebz14mo ago
top left of your keyboard under escape
Bad Victory
Bad Victory14mo ago
I see it
Jimmacle
Jimmacle14mo ago
it turns out, that command from earlier tells you another command to use to get more information $code
MODiX
MODiX14mo 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 Victory14mo ago
Why doesn’t anything happen? Did I do it wrong?
Gebz
Gebz14mo ago
are you trolling? honestly..
Bad Victory
Bad Victory14mo ago
No I am trying to tap the button
Gebz
Gebz14mo ago
<:picard_facepalm:616692703685509130>
Bad Victory
Bad Victory14mo ago
Star Trek
Jimmacle
Jimmacle14mo ago
are you trying to code from your phone?
Bad Victory
Bad Victory14mo ago
No
Gebz
Gebz14mo ago
Jimmacle
Jimmacle14mo ago
forget the paste website, just do that for now ^
Bad Victory
Bad Victory14mo ago
Do what?
Jimmacle
Jimmacle14mo ago
i give up
MODiX
MODiX14mo ago
gebz#7155
Quoted by
From gebz#7155
React with ❌ to remove this embed.
Gebz
Gebz14mo ago
do this:
Bad Victory
Bad Victory14mo ago
What is that?
Jimmacle
Jimmacle14mo ago
have you used discord before?
Bad Victory
Bad Victory14mo ago
Yes
Jimmacle
Jimmacle14mo ago
it's
this
this
just type it in
Gebz
Gebz14mo ago
Man, you're intentionally wasting our time
Bad Victory
Bad Victory14mo ago
this
Jimmacle
Jimmacle14mo ago
you can see the image right the one with the ``` characters?
ero
ero14mo ago
🍿
Bad Victory
Bad Victory14mo ago
Wait, can we start over? I am confused
Gebz
Gebz14mo ago
```\ your code ```\
Jimmacle
Jimmacle14mo ago
just forget all of it, copy and paste your code as is this is taking way too long to explain
ero
ero14mo ago
at this stage i'm not even sure whether they have code at all
Bad Victory
Bad Victory14mo ago
It say it is too big
Jimmacle
Jimmacle14mo ago
then upload it to some paste website and share the link to that
Gebz
Gebz14mo ago
there's a 2000 character limit
Jimmacle
Jimmacle14mo ago
or just upload the whole .cs file(s)
Bad Victory
Bad Victory14mo ago
BlazeBin - jqetpomnurgz
A tool for sharing your source code with the world!
Bad Victory
Bad Victory14mo ago
Like this?
Jimmacle
Jimmacle14mo ago
yes so which part isn't working
Bad Victory
Bad Victory14mo ago
The Ok button
Jimmacle
Jimmacle14mo ago
you don't have any code in that handler it's not doing anything because you aren't telling it to
Gebz
Gebz14mo ago
you have to tell the thing to do stuff in order for the thing to do stuff
Bad Victory
Bad Victory14mo ago
I tried but it just said error
Jimmacle
Jimmacle14mo ago
i guarantee it didn't just say "error" explain exactly what you tried and what the exact error was
Bad Victory
Bad Victory14mo ago
I typed "close the window" It did not work
Jimmacle
Jimmacle14mo ago
...
Gebz
Gebz14mo ago
kekwkekwkekwkekw
jcotton42
jcotton4214mo 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
Jimmacle14mo 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 Victory14mo ago
Why?
jcotton42
jcotton4214mo ago
just give details
Bad Victory
Bad Victory14mo ago
It was what some told me It is supposed to add the ingredients
Gebz
Gebz14mo 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
Jimmacle14mo 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 Victory14mo ago
I did
Gebz
Gebz14mo ago
might have just been a chatGPT copy pasta
Jimmacle
Jimmacle14mo ago
so you understand that C# has specific syntax rules you have to follow
Bad Victory
Bad Victory14mo ago
Can that do it?
Jimmacle
Jimmacle14mo ago
you should definitely not use chatgpt at this point
Bad Victory
Bad Victory14mo ago
Ok
Gebz
Gebz14mo ago
There's some excellent C# courses on youtube
Gebz
Gebz14mo 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
Jimmacle14mo 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
jcotton4214mo ago
The C# Player’s Guide
About the C# Player’s Guide
The home of the book The C# Player’s Guide
jcotton42
jcotton4214mo ago
I skimmed the freecodecamp video and was... not impressed
Gebz
Gebz14mo ago
I was just sharing one of many examples
Bad Victory
Bad Victory14mo ago
So, what should I write?
jcotton42
jcotton4214mo ago
@Bad Victory you need guided intro material, to be blunt
Jimmacle
Jimmacle14mo ago
i'm not going to just give you the answer, because if i did you wouldn't understand it
jcotton42
jcotton4214mo ago
you are clearly missing some fundamentals
Gebz
Gebz14mo 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
jcotton4214mo ago
pick up a book, C# Player's Guide is good
Bad Victory
Bad Victory14mo ago
Couldn't I just show the code?
Jimmacle
Jimmacle14mo ago
i think i have that in a box, never actually read it pepethink
jcotton42
jcotton4214mo 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
Jimmacle14mo ago
it's also a school assignment, so you should ask your teacher for help
Bad Victory
Bad Victory14mo ago
He isn't answering
Jimmacle
Jimmacle14mo 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 Victory14mo ago
What is it with that?
Jimmacle
Jimmacle14mo ago
can you explain what it does to me?
Bad Victory
Bad Victory14mo ago
It gets the MaxNumOfIngredients and returns it
Jimmacle
Jimmacle14mo ago
from where?
Bad Victory
Bad Victory14mo ago
From MaxNumOfIngredients
Jimmacle
Jimmacle14mo ago
and where does that get it from?
Bad Victory
Bad Victory14mo ago
From MaxNumOfIngredients
Jimmacle
Jimmacle14mo ago
and where does that get it from? (do you see where i'm going with this)
Bad Victory
Bad Victory14mo ago
From MaxNumOfIngredients
jcotton42
jcotton4214mo ago
I can't tell if you're pulling our leg, or don't see how this is circular
Bad Victory
Bad Victory14mo ago
I see it is circular
Jimmacle
Jimmacle14mo 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 Victory14mo ago
How do I fix that?
Jimmacle
Jimmacle14mo ago
return the value of another field/property or just make it an auto-property
Bad Victory
Bad Victory14mo ago
What field?
Jimmacle
Jimmacle14mo ago
one you would make to store the max number of ingredients
Bad Victory
Bad Victory14mo ago
Which one is that?
Jimmacle
Jimmacle14mo 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 Victory14mo ago
It still does not work
Jimmacle
Jimmacle14mo ago
i can't do anything with that information
Bad Victory
Bad Victory14mo ago
What do you want to know
Jimmacle
Jimmacle14mo ago
think about what i might need to know to be able to help you
Bad Victory
Bad Victory14mo ago
private void btnOK_Click(object sender, EventArgs e) { int index = lstIngredients.SelectedIndex; }
Jimmacle
Jimmacle14mo ago
okay, what do you expect that to do and what is it actually doing?
Bad Victory
Bad Victory14mo ago
Make it work
Jimmacle
Jimmacle14mo 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 Victory14mo ago
I want it to add the ingedients to txtBoxDescription
Jimmacle
Jimmacle14mo ago
okay, so what does the line of code you added do
Bad Victory
Bad Victory14mo ago
How do I know that?
Jimmacle
Jimmacle14mo 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 Victory14mo ago
It is supposed to add the ingredients to txtBoxDescription
Jimmacle
Jimmacle14mo ago
and how does it do that? where is txtBoxDescription in that code?
Bad Victory
Bad Victory14mo 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
Jimmacle14mo 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
WTDawson914mo 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
WTDawson914mo 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
WTDawson914mo ago
Do a little searching before you ask for help, I found all of those within a few minutes
Bad Victory
Bad Victory14mo ago
Visual
chef drone builder
Visual Studio? The question was what framework, not what IDE
Bad Victory
Bad Victory14mo ago
C#
WTDawson9
WTDawson914mo ago
What do you mean by Visual that gives me no information at all Framework not language
Bad Victory
Bad Victory14mo ago
Microsoft Visual
WTDawson9
WTDawson914mo ago
What do you mean Right okay, look at my questions and answer those.
Bad Victory
Bad Victory14mo ago
What is Framework?
WTDawson9
WTDawson914mo ago
Winforms, WPF, Xamarin Forms these for example @Bad Victory
chef drone builder
I think this is a troll, how does this server normally deal with such behaviour?
WTDawson9
WTDawson914mo ago
Let's get some moderators $help
MODiX
MODiX14mo 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
WTDawson914mo 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
RubyNovaDev14mo ago
ReimuPeek has been quite the read I get the impression that the assessment of "missing fundamentals" is fairly correct $helloworld
RubyNovaDev
RubyNovaDev14mo 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 Victory14mo ago
All that just for a button? Can’t anyone just tell me what to do?
RubyNovaDev
RubyNovaDev14mo 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 Victory14mo ago
How do I fix it?
RubyNovaDev
RubyNovaDev14mo 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 Victory14mo ago
What does that look like?
RubyNovaDev
RubyNovaDev14mo 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 Victory14mo ago
Can you DM me?
RubyNovaDev
RubyNovaDev14mo 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 Victory14mo ago
How else am I supposed to show you?
RubyNovaDev
RubyNovaDev14mo ago
ehhh
Bad Victory
Bad Victory14mo ago
How cannrun it i here?
RubyNovaDev
RubyNovaDev14mo ago
um what?
Bad Victory
Bad Victory14mo ago
I found my old GitHub
Bad Victory
Bad Victory14mo ago
GitHub
GitHub - TheSupremeMaster/Recipe
Contribute to TheSupremeMaster/Recipe development by creating an account on GitHub.
RubyNovaDev
RubyNovaDev14mo ago
uhhh
Bad Victory
Bad Victory14mo ago
Can you run it and see what is wrong?
RubyNovaDev
RubyNovaDev14mo 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
WTDawson914mo ago
Button Class (System.Windows.Forms)
Represents a Windows button control.
WTDawson9
WTDawson914mo ago
Please next time, just say what framework you're using
RubyNovaDev
RubyNovaDev14mo 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
Accord14mo 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
More Posts
❔ null warning while indexing (rather than accessing) null-agnostic type?first, lets look at a scenario where everything behaves as expected: ```csharp string[]? GetList() =❔ Wrapping Python code in C# .NET classesI'm working with a project written in Python. Is there a way to take their calls and wrap them in .❔ Cant change foreground on comboboxitems in WPF?Trying to change the foreground color for my combobox items to white code attached in pastebin http❔ scientific calculator using Windows Form App (.NET Framework)Im a student and im not sure what im doing at this point im a beginner at this. i started learning f❔ Hierarchy database design. Parent->Child->Grandchild->.... vs Material PathMy understanding of the differences between these two hierarchical patterns is that the former would✅ [] brackets explanationHey can somone explain to me why this dummy1 is an last letter of the string that we read ? I might ✅ Add OAuth 2.0 in HttpClient Request HeadersHi folks, I tried to request by Get using HttpClient, but in this case, I don't know how can add thi❔ Create WebflowCMS collection item using C# api callHi, I am currently working on some Azure function apps and I need to create some items inside the CM✅ best way to snooze winformsI have a win forms app with a snooze button, once the snooze button is clicked i need to make the fo❔ Using text file to add data into a listHello, I would like to use text file to add data from a text file that are saved in a text document.