RSS oop344-20113 IRClog nov20

From CDOT Wiki
Jump to: navigation, search
Session Start: Sun Nov 20 19:26:48 2011
Session Ident: Kain-18
[19:26] Session Ident: Kain-18 (freenode, mdafidchao) (~Kain-18@
[19:26] <Kain-18> Hey Michael, are you in a channel?
[19:27] <mdafidchao> the usual, #seneca, #seneca-oop344, #seneca-social
[19:28] <Kain-18> Oh, we can just chat trough here
[19:28] <Kain-18> anyway
[19:28] <Kain-18> I sent u a mail, I dont know if you read it
[19:28] <mdafidchao> yeah i got it
[19:29] <Kain-18> Oh ok
[19:29] <mdafidchao> i'm working on an essay for an elective atm, so i kinda didn't dig through your code to see what you understand up to now
[19:29] <mdafidchao> but if you ask me specific details i'll try and answer them
[19:29] <Kain-18> alright
[19:31] <Kain-18> The one you could look at is at R03.2 , it asks to send the container() reference and different ways that i tried it didnt let me
[19:36] <mdafidchao> seems to be the right way
[19:36] <mdafidchao> it compiles
[19:36] <mdafidchao> or you mean in if(!(_validate((char*)_data,*CField::container())))
[19:36] <Kain-18> but isnt that calling the function not sending reference?
[19:36] <Kain-18> both
[19:36] <mdafidchao> the function returns a pointer to the CDialog container
[19:38] <Kain-18> Oh i didnt thats what they want it the way it says
[19:38] <Kain-18> didnt think**
[19:40] <Kain-18> alright then...
[19:41] <Kain-18> another thing is that it says if the validation of cfield's _data is good then go to next step
[19:41] <Kain-18> what does that mean?
[19:41] <Kain-18> OHHHHHH
[19:41] <Kain-18> next step on the explanation
[20:25] <mdafidchao> figure it out?
[20:25] No such nick/channel
[20:50] <Kain-18> Hey, i got signed off
[20:50] <Kain-18> did u get my msgs?
[20:52] <mdafidchao> [19:41] <Kain-18> next step on the explanation
[20:52] <mdafidchao> that was your last
[20:52] <Kain-18> ohh
[20:53] <Kain-18> well, I finish the function, it compiles and all but when i run it with the cvaledit teester it crashes when I change line
[20:53] <Kain-18> I've being trying to fix it but dont see anything wrong
[20:53] <mdafidchao> you might be right, it's not passing the container correctly
[20:55] <Kain-18> how do you know?
[20:56] <mdafidchao> after *this->container() is passed, i check the CDialog in the tester (owner)
[20:57] <mdafidchao> CDialog is passed somewhere but it seems to create a new frame instead of sending the container rame
[20:57] <mdafidchao> frame
[20:57] <mdafidchao> looking at the values in debug
[20:59] <mdafidchao> it might be a bug with CDialog
[21:09] <Kain-18> found anything?
[21:09] <mdafidchao> looks like an infinte loop
[21:11] <Kain-18> i think your right
[21:11] <mdafidchao> but *this->container still isn't returning a correct cdialog
[21:12] <Kain-18>  
[21:13] <Kain-18> I got signed off again sorry
[21:16] <Kain-18> you there?
[21:16] <mdafidchao> yeah
[21:21] <mdafidchao> got it
[21:21] <mdafidchao> go to CDialog* CField::container()
[21:22] <mdafidchao> change the line to
[21:22] <mdafidchao> return (CDialog*)CFrame::frame();
[21:22] <mdafidchao> this will return the frame instead of cdialog
[21:23] <mdafidchao> make sure to note this change in your log!
[21:24] <Kain-18> michael?
[21:25] <mdafidchao> yes?
[21:25] <mdafidchao> did you see the fix i just typed out?
[21:29] <Kain-18> sorry, keep getting disconected
[21:29] <Kain-18> you there?
[21:29] <mdafidchao> [21:16] <mdafidchao> yeah
[21:29] <mdafidchao> [21:21] <mdafidchao> got it
[21:29] <mdafidchao> [21:21] <mdafidchao> go to CDialog* CField::container()
[21:29] <mdafidchao> [21:22] <mdafidchao> change the line to
[21:29] <mdafidchao> [21:22] <mdafidchao> return (CDialog*)CFrame::frame();
[21:29] <mdafidchao> [21:22] <mdafidchao> this will return the frame instead of cdialog
[21:29] <mdafidchao> [21:23] <mdafidchao> make sure to note this change in your log!
[21:30] <Kain-18> alright
[21:31] <Kain-18> Ohh it works nice
[21:32] <mdafidchao> also in CDialog, I think you should change another function
[21:32] <mdafidchao> int CDialog::add(CField& field, bool dynamic)
[21:32] <mdafidchao> {  
[21:32] <mdafidchao>   return add(&field, dynamic);
[21:32] <mdafidchao> }
[21:33] <mdafidchao> so basically add an ampersand to field
[21:33] <mdafidchao> that should get rid of stack overflow errors in certain conditions
[21:33] <mdafidchao> also note this change in your log!
[21:39] <Kain-18> Alright, works Nicely
[21:39] <Kain-18> I appreciate the help man, Thanks alot
[21:39] <mdafidchao> np
[21:39] <Kain-18> So its ready to get tagged?
[21:40] <mdafidchao> did you complete cvaledit?
[21:40] <Kain-18> yea, I thought thats what you were working with
[21:41] <mdafidchao> yeah but i didn't check if cvaledit is fully functional
[21:41] <mdafidchao> just checked the error
[21:41] <mdafidchao> if you think it works the way its supposed to then commit to trunk and tag it
[21:41] <Kain-18> I did all the requirements
[21:42] <mdafidchao> so if you think it's finished then commit and tag
[21:42] <Kain-18> Alright then
[21:43] <Kain-18> Thanks again, talk to you later
[21:43] <mdafidchao> np, make sure to note the cdialog changes
[21:43] <Kain-18> Yea i did
[21:44] <mdafidchao> did you commit Cdialog yet
[21:44] <Kain-18> only to my branch
[21:45] <mdafidchao> huh i don't see it, all i see is cvaledit
[21:46] <mdafidchao> oh there it is
[21:49] <mdafidchao> so just commit to trunk and tag
[21:53] <Kain-18> done
[21:54] <mdafidchao> shoot i give you the wrong line for CDialog::add
[21:55] <Kain-18> what?
[21:55] <mdafidchao> wait nvm
[21:56] <mdafidchao> i thought it needed to be fixed but i broke it when trying to fix cvaledit =/
[21:57] <Kain-18> Ohh no
[21:57] <Kain-18> we got aproblem
[21:57] <mdafidchao> what
[21:58] <Kain-18> the field doesnt change when I press enter the 2nd time
[21:58] <mdafidchao> so cvaledit wasn't completed then
[21:58] <Kain-18> it works on name, then lastname it doesnt do anything
[21:58] <Kain-18> cant even exit
[21:59] <mdafidchao> you don't check for ESC
[22:00] <Kain-18> It works nicely on the first field "name"
[22:00] <Kain-18> idk what happens on the 2nd one
[22:00] <mdafidchao> because it doesn't have a help message
[22:00] <mdafidchao> but the 2nd and 3rd do have a help message
[22:03] <Kain-18> I see, i see
[22:04] <mdafidchao> and you don't have a condition to see if a validation function doesn't exist
[22:05] <Kain-18> I have the condition, just not the else
[22:09] <mdafidchao> hm i also can't get the help of the 3rd box
[22:14] <Kain-18> The thing is im trying to code it with out fully understanding what its doing.
[22:14] <Kain-18> I've had alot of trouble catching up on how it changes
[22:15] <mdafidchao> check the tester program in matrix: ~fardad.soleimanloo/t5
[22:15] <mdafidchao> what this does is validate a line edit (the text box)
[22:15] <mdafidchao> the firs tand second boxes don't have a method of validation, but the 3rd one does
[22:16] <mdafidchao> if a box with validation is selected, you cannot move out of that box with the navigation keys until that box contains valid date
[22:16] <mdafidchao> data
[22:16] <Kain-18> Oh
[22:16] <mdafidchao> also the text always stays on the screen, it should only display what box is selected
[22:17] <mdafidchao> again check ~fardad.soleimanloo/t5 on matrix
[22:19] <Kain-18> Ok so if the second box doesnt have validation, how come i cant move out of it
[22:20] <mdafidchao> [22:04] <mdafidchao> and you don't have a condition to see if a validation function doesn't exist
[22:20] <mdafidchao> [22:05] <Kain-18> I have the condition, just not the else
[22:20] <mdafidchao> so add the else
[22:20] <mdafidchao> because if you don't, it doesn't know that there's no validation and done will always be 0
[22:24] <Kain-18> ok
[22:25] <Kain-18> so now, its getting rid off the help msg of the second box
[22:25] <mdafidchao> add a case for ESCAPE and F(1)
[22:26] <mdafidchao> you should be allowed to escape the loop with those keys
[22:26] <Kain-18> alright
[22:27] <mdafidchao> actually, i think whenever CLineEdit::edit terminates, it should just loop back with those listed nav keys
[22:27] <mdafidchao> so you should be able to throw in a default case with done=1
[22:28] <Kain-18> so that would take the ESC and F(1) cases out
[22:28] <Kain-18> ?
[22:28] <mdafidchao> yes
[22:28] <mdafidchao> no need to explictly check for those
[22:30] <Kain-18> the f(1) on our prog it actually shows you a help box, fardad's just exits
[22:31] <mdafidchao> you probably don't have putty set up properly
[22:32] <mdafidchao> make sure in Connection->Data, Terminal-type string contains xterm
[22:42] <Kain-18> I dont know whats with this thing signing me off man
[22:42] <mdafidchao> what client ar eyou using
[22:45] <Kain-18> I have Icechat7 but whenever i search for a channel it uses a browser window
[22:45] <Kain-18> with a Java app
[22:46] <mdafidchao> - try mibbit
[22:49] <Kain-18> it says i joined the channel but there is nobody
[22:50] <mdafidchao> [22:42] * Kain-18 (~Kain-18@ has joined #seneca-oop344
[22:51] <Kain-18> so how do you see the ppl in it?
[22:51] <mdafidchao> did you enter freenode as your server?
[22:53] <Kain-18> no
[22:53] <mdafidchao> actually try this:
[22:56] <Kain-18> there is no text box to type on
[22:56] <mdafidchao> on the bottom

Session Start: Sun Nov 20 22:58:09 2011
Session Ident: Kain-180
[22:58] <mdafidchao> see it?
[22:58] <Kain-180> Ohhhhh
[22:59] <Kain-180> I see, and it has an alarm for incoming msg
[22:59] <Kain-180> thats nice
[22:59] <mdafidchao> only works on freenode though
[23:00] <Kain-180> Ohh, well good enough for what i need
[23:00] <Kain-180> tnx
[23:02] <Kain-180> Alright, so cant I take out the help msg with...
[23:02] <Kain-180> _help(MessageStatus::ClearMessage,*this->container());
[23:02] <Kain-180> ?
[23:02] <mdafidchao> yes
[23:02] <Kain-180> no
[23:02] <mdafidchao> doesn't work?
[23:02] <Kain-180> nop
[23:09] <mdafidchao> hm, something to do with drawing it
[23:10] <Kain-180> what do you mean?
[23:10] <mdafidchao> if you press f5 for example, it 'refreshes' the screen
[23:11] <Kain-180> the application?
[23:11] <mdafidchao> so clearmessage is working, but its not re-drawing
[23:11] <mdafidchao> yes
[23:12] <mdafidchao> f1-12 are exit keys
[23:12] <mdafidchao> for clineedit
[23:12] <Kain-180> ohhh i see
[23:12] <Kain-180> so how does f(5) refresh?
[23:14] <Kain-180> so i guess redraw after messageclear
[23:24] <Kain-180> you there?
[23:24] <mdafidchao> yeah
[23:24] <Kain-180> I cant redraw
[23:25] <Kain-180> I should use Clinedit's draw right?
[23:25] <mdafidchao> the entire CDialog needs to be redrawn
[23:26] <Kain-180> If i refer to CDialog::draw() it gives me error
[23:27] <mdafidchao> because its not included by default
[23:27] <mdafidchao> CDialog should be redrawing every time something is pressed but it isn't, trying to figure it out
[23:27] <Kain-180> ok
[23:29] <Kain-180> well if it wasnt then there wouldnt be no characters being typed, no?
[23:29] <mdafidchao> correct
[23:30] <Kain-180> but there are characters being typed
[23:31] <mdafidchao> actually no that's not correct, console.edit writes directly to console, doesn't need to go through CFrame
[23:32] <Kain-180> ohhhhhh
[23:36] <mdafidchao> hm ithink i see it
[23:36] <mdafidchao> the text is being set to blank
[23:37] <mdafidchao> and its supposed to overwrite the text with empty spaces to erase it
[23:37] <mdafidchao> based on the length that was set in the label
[23:37] <mdafidchao> but it's not doing that
[23:38] <Kain-180> where is that supposed to happen?
[23:38] <mdafidchao> could be a problem in CLabel::set or draw
[23:43] <mdafidchao> change void CLabel::set(const void* str) to this:
[23:43] <mdafidchao>     delete [] (char*)_data;
[23:43] <mdafidchao>     int Len = strlen((char*)str);
[23:43] <mdafidchao>     _data = new char [Len + 1];
[23:43] <mdafidchao>     strncpy ((char*)_data, (char*)str, Len + 1);
[23:43] <mdafidchao> note this change in your log again
[23:43] <Kain-180> alright
[23:46] <Kain-180> Ohh that works so nice
[23:46] <mdafidchao> hmm might not be completely right though
[23:46] <Kain-180> I dont know how you find these problems man
[23:48] <mdafidchao>     delete [] (char*)_data;
[23:48] <mdafidchao>     int Len = strlen((char*)str);
[23:48] <mdafidchao>     _data = new char [CFrame::width() + 1];
[23:48] <mdafidchao>     strncpy ((char*)_data, (char*)str, CFrame::width());
[23:48] <mdafidchao> this is the correct code
[23:50] <Kain-180> so could you explain a little
[23:50] <mdafidchao> of what the problem was"
[23:50] <mdafidchao> ?
[23:51] <Kain-180> of how its changing
[23:51] <mdafidchao> the tester code sets the CLabel text to "" when ClearMessage is sent
[23:51] <mdafidchao> but CLabel didn't create blank spaces because it didn't use strncpy
[23:52] <mdafidchao> strncpy works like strcpy, but once it hits the terminating null character, it keeps adding blank characters until it hits the specified width
[23:52] <mdafidchao> i'm guessing that's what fardad intended
[23:52] <Kain-180> Ohhhh
[23:57] <Kain-180> So is that all CValEdit needs?
[23:57] <mdafidchao> does it work like the tesr
[23:57] <mdafidchao> tester on matrix
[23:58] <Kain-180> I've never tested it on matrix
[23:58] <mdafidchao> fardad's tester
[23:58] <Kain-180> oh, yea it does
[23:58] <mdafidchao> then you can commit to branch, trunk and tag
[23:59] <Kain-180> What happens to the tag thats not working properly, just leave it there?
Session Time: Mon Nov 21 00:00:00 2011
[00:00] <mdafidchao> get rid of it
[00:00] <mdafidchao> I thought you had it fully working
[00:00] <Kain-180> I was just exited it worked
[00:00] <Kain-180> I tested it nicely now
[00:03] <mdafidchao> wow i thought the due date was midnight
[00:03] <mdafidchao> apparently it was 1 PM ha
[00:03] <mdafidchao> no 3 PM
[00:03] <Kain-180> yea just looked at that too
[00:03] <mdafidchao> should've asked for help sooner
[00:04] <Kain-180> I know but it wasnt my responsability till yesterday
[00:05] <Kain-180> the other guy couldnt do it either
[00:06] <mdafidchao> well its done at least i guess
[00:06] <Kain-180> Yea, thanks alot man, ill commit and tag
[00:22] <Kain-180> hey, are you here?
[00:22] <mdafidchao> yeah
[00:23] <Kain-180> It doesnt let me merge, it says conflicting cvaledit
[00:23] <mdafidchao> resolve it then
[00:23] <Kain-180> know anything about it?
[00:23] <Kain-180> how?
[00:24] <mdafidchao> compare the code together
[00:24] <mdafidchao> and check if anything's completely different
[00:24] <Kain-180> its differernt ofcourse
[00:24] <mdafidchao> but since you were the only one working on cvaledit
[00:24] <mdafidchao> you can just select "Use repository"
[00:24] <mdafidchao> completely different as in logic
[00:25] <mdafidchao> are there any other conflicts
[00:25] <Kain-180> nop just that
[00:32] <mdafidchao> so everythings committed and completely done now?
[00:58] <Kain-180> Alright, everything is good now
[00:58] <Kain-180> take care man, and thanks again
[00:58] <mdafidchao> np