91 Replies
GenerateHash is in public partial class GenerateHashUserControl , which is a UserControl
LoggingUserControl is also a UserControl (its in a panel on MainApp
Logger is a helper class in its own class
For the life of me, I am not getting any output to the listbox but the message exists.
What calls
LogMessage
?
Also the code doesn't compile and you have a stray WriteLog
call in that last block that doesn't do anything
If I was just doing a dialog, it would be easier but UC to UC is a bit different to me XD
still, where is
_loggingUserControl
populated here?its not
ai did it for me :/
cuz i was stuck and couldnt wait lol
even if i use it, this is an issue
i wouldn't presume such a method exists on that type
what's the idea here
what do you expect people in this server to do when all you do is post a snippet of some ai-generated code
its not all ai, just asked it to help after I posted here yesterday
test the code, write your own, come back when there's problems
ok
we're happy to help, but don't ask "will this work"
please test it
okay, gimmie a bit
well I went through it but still stuck
sure, what's the problem
you'd this this would work
i stepped through both methods, it GETS the message but it never adds
i hate usercontrol to usercontrol sharing
I think I see 1 bug, hld
nm f it
i'll rip it out ands do it direct
mvvm my ass
did anyone use mvvm to do the space program? no
or anything else oop
4 hours just to fix ONE issue
this isn't really mvvm :p
i know
but im getting older and i dont have time to mess around with it
you never added the item to the list ever
dialogs are so much easier but no, someone told me to make it a webpage app
because "courage"
this bit would work
after this change
previously you had to do
Logger.WriteLog(HashBytesOutputTextBox.Text, _loggingUserControl)
im getting confused
because there is a MAIN APP
which talks to both user controls
and the user controls can't talk to each user
and im trying to do references ffs
im about to say f website looks
and use TRADITIONAL
thisi s a pc not a damn phone
well you have a reference to
LoggingUserControl
in GenerateHashUserControl
here
so this can't be trueok im reposting this shit once more
but on pastebin because im sick of discord's limits
$paste
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
Pastebin
// GenerateHashUserControl.cs!!!!using Discovery.Meta.Helpers;names...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
// LoggingUserControl.cs !!!!namespace Discovery.Meta.UserControls;...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
//MAIN APP!using Discovery.Meta.UserControls;namespace Discovery.Me...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
there
im too tired to give a shit
please š¦
people act like I can sit on my ass 24/7 and code, I only get 2 hours a night
i'm sorry but what are you even using to code?
... VS 2022?
this doesn't compile
because im using WinForms..
and bash me , i dont care
im my own person
i'm not bashing, hah
just saying, this is prototyping š
but i gotta make sure you're even using an IDE
i am...
cause this line
_loggingUserControl.WriteLog(_loggingUserControl., "Generated!");
would produce an errori'm not amazing at winforms mvvm anymore.
the truly proper way to do this would be to add a
List<string>
to LoggingUserControl
, bind the items of the ListBox (or whatever) to that list, and (i think) add an event on GenerateHashUserControl
that's called when a new hash is created
the binding can be difficultsorry š¦
i'll try that
not doing mvvm in winforms anyway so it's all ok lol
just banging my head on my desk right now (not literally)
I HATE UserControls in WinForms
Because I am still having the same issue, when I used WINDOWS/Forms it worked!
Maybe my dumb ass is using UserControls as PAGES and thinking its the same PAGES from WPF :/
i don't think it has much to do with forms vs usercontrols
here
im done, herer is my solution
i cant spend 3 nights in a row on a bs stupid thing
i know i cant pay, its in the rules but im about to snap
sorry, but i'm just not downloading and opening a random zip from the internet :p
upload it to github or something of the sort
i was just gonna send you 50,000 viruses from russia :/
just kidding
i tried github but i cant get it to work
im special apparently
"special" :/
maybe i should go play with lego or toy blocks, its more my level it seems
the problem i'm mainly seeing is that your controls look a bit all over the place
you don't store your controls, for example
store controls?
they're right there ^
store as in as a reference that you can access easily
you need to retain a reference to your
LoggingUserControl
, for example, so that you can access it later again, to add items to itthat I am aware but my brain is friend
i only get 2-3 hours a night, i barely sleep, i have heart issues and require medical help so im on disability as well
so right now you're creating a new instance of
LoggingUserControl
in ShowGenerateHashControl
, but you never do anything with itand this is the only joy i have in my life lately
and i cant even do it:/
i hate being older even though im acting 12 now >_>
let me check, sec
this new instance is of course separate from the control you create and show in
SetupMeta
ugh why
private void SetupMeta()
{
PanelBottom.Controls.Clear();
var control = new LoggingUserControl();
control.Dock = DockStyle.Fill;
PanelBottom.Controls.Add(control);
}
nothing in there
so right here you instantiate and add the control to your form
that's fine
but in
ShowGenerateHashControl
, you create a new controli SHOULD make a new one?
no
oh
hold XD
that's what you're doing right now
am i close?
minus the error XD
this would be one possibility, sure
how do you think we can ideally deal with the error?
public partial class GenerateHashUserControl : UserControl
{
private LoggingUserControl _loggingUserControl;
public GenerateHashUserControl(_loggingUserControl)
{
InitializeComponent();
}
by doing that
not making a new one again
well, this is again not valid syntax, but you're getting there
:/
i mean that shouldn't be surprising, vs should have already told you so :p
having autism and adhd isn't helping me
cuz i gott 5056340530630653063 windows and tabs open
and i have to scroll in 4 chats
to remember where i am
š
take it slow :)
i am slow enough
not kidding, I was always slow that way š
just not in a good way heh
I'm gonna try this one more time
no reason to give up yet. can always come back another time
that line is getting old, ive been told this since i was in my teens
im almost 50 and nothing to show for it at all, so no, im not coming back another time, i need to do stuff while i can
unless there';s a Lifespan DLC pack i can grab
and now i lost the discussion, ugh, hold
im getting confused
because all i want is the ListBox namedLoggingListBox
and use that
but nope, im dumb
where are you exposing it?
i even tried to make this shit public
and thats a no no
but i dont care
still wont work
what do you mean by "won't work"
an error message or wrong behavior would be helpful
I JUST WANT TO ADD SHIT TO A LISTBOX
why is it so fucking hard
a child can do it/"!@E#$##!@#$!@$
god, i miss Commodore 64
you should be able to just access
namedLoggingListBox
on any instance of LoggingUserControl
this is why i cant get it on github
the stupid shit is bugging out
can't say i've seen that before
not surprised
š¦
ok so github works
how the hell do i upload the rest of the files? o_O
got it
https://github.com/coredreamstudios/Discovery.Meta
finally
its private so i migh need to invite you
i dont want my code public right now
gonan try to sleep, have a good night and thank you for trying to help :), i might just try to sleep and try again tomorrow
well i mastered it so much i got a listview to go š
i made a new project to test