« first day (1722 days earlier)      last day (3228 days later) » 

2:24 AM
how do I run the answer here? stackoverflow.com/questions/115868/…
like if I start a new project, where do I paste that?
oh I get it.. it has to be within the class, and it needs a
using System.Runtime.InteropServices;
 
 
8 hours later…
10:36 AM
Guys how can i Send a ObservableCollection into another ObservableCollection that is a property which i am binding to a Listbox ! w'o Linking them !?!?!? lol
i have noticed my problem , the Reason that my listbox is updated Only 1 time for first code ! is coz it only get his values changed 1 time
the 2nd time when i add something to my First OC ! it automatically Get Added to my OC Property too !
so when i do it again , by saying OCProperty = OC; coz both of them are the same ! no new PropertyChanged Event is happening , resulting in no new update to Listbox UI
 
11:04 AM
Didn't really understand what you are doing, but try first setting it null
 
I got a Listbox , itemsource is binded to property named , WalletResults which type is an ObservableCollection.
then i got a ObservationCollection named Results ,
i Add "String" to Results , then Send it to ObservationCollection
 
Does anyone know how to convert this to code: http://pastebin.com/iC4cvRFL
I need to create similiar control programmatically
 
by saying Walletresult = Results
 
I was able to do the binding of other controls in code, but now i'm totally lost
 
but it only raise the event of property changed , 1 time ! coz ater first time , Result and WalletResult Link , Together ! so when i add something to Results ! it automaticaly add to WalletResults , so when i say WalletResults = Results again ! no PRoperty Changed event raise :(
 
11:08 AM
Why should it?
Why doesn't it update when you add something to results?
 
not sure but i think because Results add directly to the field ! the property only set the filed and call the OnPropertyChanged("WalletResults")
Lemme post my class
        public class UpdateStatusBar : INotifyPropertyChanged
        {
            public event PropertyChangedEventHandler PropertyChanged;
            public ObservableCollection<string> _walletResults = new ObservableCollection<string>();
            public ObservableCollection<string> WalletResults
            {
                get {  return _walletResults; }
                set { _walletResults = value; OnPropertyChanged("WalletResults"); }
            }
            protected void OnPropertyChanged(string name)
my Guess is Result will only Bind to _walletResults , and when that change nothing happen , coz it should change through WalletResults
Tried Binding the listbox to _walletResults instead of WalletResults , but not working at all then lol
 
If your gui does't update I think you are doing something wrong. Isn't the whole point of observable collection that you can made two way binding or whatever it's called.
INotifyCollectionChanged is probably what you are looking for?
 
dammit , i have no idea why this being like this , i already posted all my code here last night and even changed some as ppl suggested , but its still like this -.-
 
But if you wan't to update it manually like that setting it first to null and then setting it again would probably work.
 
k lemme test this null thing now
For god sake , it's just jumping out of code after adding something to the Results ...
this is weird , no error , nothing , and it even
continue with the loop if there is still more items
but it will jump from the rest of the code after Results.Add("something")
i stop at results.add and it hit the breakpoint ! then i click F11 and it jump back to App !
and when i breakpoint the next line , it never hit
aaah dammit it's only 300 line of code , i should have just Put it in the MainWindow instead of a new Class ! and used Invoke to Add to listbox ! FAR EASIER , trying to fix this for 1 whole day
 
11:40 AM
You sure it didn't throw excetions?
And what do you mean "jumping out of code"?
 
i have no idea , i have no try and catch and no it's not throwing any exception ,
for(repeat 10 for example )
{
         //some condition
         result.add();
         /some work to do like adding it to property
}
 
So what's the problem? Where does it jump?
 
it go to result.add ! Then w'o doing /some work it goes to next loop !
 
I don't understand, if you press F11 what do you except to happen?
 
it move from result.add to /some work to do
 
11:47 AM
Press F10 or F9
 
bro i always use F11 and it will move 1 by 1 , plus ! i even set the breakpoint to somework to do and it NEVER hit !
 
Oops
My bad I thought you were pressing shift + F11
 
ye np
i changing this damn list or Observation collection to a damn String array
maybe it work w'o any hassel
dammit something else is the matter , exactly same kind of behavior with array of string
it was same with list too i checked before ObservationCollection
 
12:11 PM
Ok , NVM , who cares, no one checking inside of my application they just see how it works ! i Move everything to MainWindow ! tired of these stuff
 
Hey!
 
Hi
 
12:33 PM
Why do people await tasks the last thing they do in a onClick event for example? Have I gotten it wrong or does that not fill any purpose what so ever?
 
12:47 PM
>.................................................................................<
god ... all 3 implementation of mine by List and ObservationCollection and Array was Ok ! the Problem Was Indeed Something Else ..... but for no known goddamn reason it was NOT showing me any error ....... until i moved my whole code out of Class into my MainWindow
 
 
2 hours later…
2:49 PM
@Pedram So what was the problem?
 
@FINDarkside there was a a fking Array , inside of my Results.Add(here) ,
and it was giving out of boundary error
but it was actually not giving any notice of this error
till i moved everything to my MainWindow !
 
3:10 PM
If I mark a method as "async" does that make it run automatically in a different thread ?
 
3:20 PM
@pingo No, no it doesn't, unfortunately; google.com.au/…
@pingo see the fifth and sixth questions on the link I just sent. It will answer your question.
 
thanks
 
no problem
hey guys
i'm so booooooooored. can someone make me an app?
just a little one
like
a productivity app
or like... an ai chat bot to cure my boredom lol
 
3:56 PM
@pingo Depends. In WPF, no, but in ASP.NET, yes. It changes depending on what kind of app it is.
@SE13013 You mean "fortunately"
 
@KendallFrey Depends how you look at it i guess :)
 
lol yeah
 
what are we talking about again?
oh thats right.. async things
 
Why can't I pass enum as argument? <enumname> is a type but is used like a variable
 
You can't pass any type as an argument
class, interface, struct, enum
 
4:02 PM
Umm... Why?
So I need to pass enum value and then get the enum type or something?
 
because types aren't values
What are you trying to do?
 
I need to set enum as Combobox item source
 
do you actually want to pass a reference to the enum type?
 
i'm gonna go eat some chocolate, later guys
 
4:04 PM
I have this kind of code: pastebin.com/169tNYGx
 
@FINDarkside bindit to Enum.GetValues(typeof(YourEnum)).Cast<YourEnum>().ToArray();
 
I need to do that to any enum, not just one
Is that possible?
 
I have an attached property for it hold on
 
lol ... in WPF u can't use ( retrieve or Set) value for hidden Textbox or checkboxes ?
 
@FINDarkside this looks good
 
4:07 PM
@JohanLarsson No, I don't use it in xaml
I already have EnumerationExtension but I have no idea how to make it work when creating everything in code
 
@FINDarkside ok
 
So is it possible or will i just make it a list first and then pass it as argument?
 
you can make it generic and constrain it to where T : IComparable, IFormattable, IConvertible
not a guarantee though
also I did not understand the question :)
 
I have method that would (if it would work) an enum type as argument, second argument is the field where to bind. It would make ComboBox that would let you choose the enum and obviously update the field.
So why can I pass type as argument but not enum? And can't I get enum value names from the type?
 
is it wpf?
you can pass the typeof(TheEnum)
 
4:22 PM
Yes, but I am making all controls in code
 
 
1 hour later…
5:49 PM
@FINDarkside what do you mean by 'can't'?
> So why can I pass type as argument but not enum?
What gives you that impression?
 
Well I got it to work not, i needed to pass typeof(enum)
now*
 
Please don't take this as an insult, but every question you ask makes me wonder what you're writing. It sounds as though you're fighting against the framework rather than using it the way it's designed to be used
 
Yeah I'm new to C# and WPF. But doing these thing shouldn't be "fighting against the framework". I have done most of the GUI with xaml but some parts just seem easier to do easier to do in code, maybe because I'm used to do so in java.
 
6:23 PM
@FINDarkside Doing anything WPF in C# is fighting the framework
 
Well that's not entirely fair. Things like custom dependency properties have to be written in C#, right? I guess if you rephrased it as C# tightly coupled to controls
 
6:43 PM
yes
but the need is not that common for simple stuff
 
7:40 PM
It is so fking hot I can't even code a freaking line.
 
7:52 PM
hi guys
I am stuck with converting c++ code to c# code
any solutions please ?
0
Q: Lightweight implementation of the in-close algorithm From C++ to C# Translation

HassanThe following C++ code is a lightweight implementation of in-close algorithm. Full details of the project can be found here. I was trying to translate the C++ code to C# but it's very difficult to manage. That new version simply doesn't work due to pointer implementation. In fact, I need to keep...

 
@Hassan do you mean automatically? Not possible. C++ has a lot of features C# does not
 
No absolutely
I meant by rewriting , I tried for the past week
but keep getting wrong execution due to Pointers problems
 
I've never attempted to do such a thing, but a suggestion is to try to compile the C++ as C++/CLI, if it isn't already
then decompile that as C#, it'll look hideous. But it'll be fundamentally correct managed code, and you can refactor from there
although my guess is that C++/CLI doesn't support pointers
 
exactly
I tried everything then decided to rewrite it myself
the problem is that I am not good @ C++ :(
 
neither am I
 
7:57 PM
so where to go to have some help in that ? :(
I tried to post a question but the guys keep commenting things totally out of the scope
 
I don't think any of those comments are inappropriate. This is a hard problem
 
No please dont get me wrong , comments are appropriate but they miss the point
its not hard problem , its just that requires someone who knows C++ , I work blind when translating its like translating from english to arabic when you dont know arabic for instance
 
I'm Programming a Bot Atm , After seeing this Pic,
I decide my perfect bot ! :P
http://images7.memedroid.com/images/UPLOADED200/5597d0bbefc2e.jpeg
 
 
1 hour later…
9:40 PM
LoL Extended WPF Toolkit just got a new Update for Version 2.4 to 2.5 ! and i took it's Download Virginity ! it was Downloads : 0 lol :D
 

« first day (1722 days earlier)      last day (3228 days later) »