Open main menu

CDOT Wiki β

Changes

Assignment 2 (Release 0.2): Q & A

2,454 bytes added, 13:30, 16 November 2012
Bug Reports
== Q & A ==
'''Question by: Team # 3'''<br>
For CButton, it says it needs to be a clickable button.<br>
My question is, how do you record said click.<br>
While looking this up on cplusplus.com and google, all i could find were examples with the windows API.<br>
Is that what we're supposed to use to record the click action?<br>
'''A:''' Since we are not building a Graphical User Interface (GUI), we change the label of a CButton object to indicate that the button has been "clicked." For a demo, run the execuatable code posted on the Practical Guidelines wiki page. (pliu} <br><br> '''Q:''' The CField constructor receives a bool value that stores the <u>'''border's'''</u> visibility. The guidelines say that it passes all but one value to its base class constructor, CFrame. However, the CFrame constructor does not take an argument for the border's visibility and only takes one for the frame's visibility. How would we send this as an argument to the base class constructor?<br>'''A:''' We can use the bordered(bool) function of the CFrame class to assign the border's visibility.<br>'''Submitted by:''' Team 15<br><br> '''Q:''' The CLabel::draw(int) function receives a parameter that indicates the border's visibility i.e. C_NO_FRAME or C_FULL_FRAME. However, the specifications state that a label is never bordered, so how would we make use of the parameter passed through this function?<br>'''Question Submitted by: ''' Team # 315<br>'''A:''' No, the parameter value will NOT be used for drawing a CLabel object. <br>'''Answer Submitted by:pliu'''<br><br>
'''Q:''' The CLine constructor (the first one which takes the line's data as a parameter) is supposed to pass this parameter's address directly to the CField constructor receives (according to the specifications) which takes a bool value that stores void* data argument. But, since the data parameter in CLine has const attached to it, we cannot send it to the CField constructor. How would we resolve this?<ubr>'''border'sQuestion Submitted by:'''Team 15</ubr> visibility'''A:''' Good observation! Declare the data parameter without using the const keyword. The guidelines say that Indeed, the data parameter should NOT be declared as a const string because it passes all but one value could be EDITED! <br>* Adding to its base class constructor, CFrame. Howeverthat, the CFrame constructor same does not apply to the CLabel/CButton class constructor, it will still take an a const char* str argument for . - Team 15'''Answer Submitted by: pliu''' <br><br> '''Q:''' What is the bordersize of void pointer? <br>'s visibility and only takes one for ''A:''' Pointer variables always contain the frame's visibilityaddress of variable.so size of pointer is independent of its type. How would we send this as an argument to Size of pointer depends on the base class constructor?environment. On 32-bit environment size of pointer is 4 bytes. <br>''' Question Submitted by:''' Shajinth Pathmakulaseelan and Auquib Rasul, Team 152 <br><br> '''Q:''' Does declaring virtual function in class increase the size of object of class? <br>'''A:''' Any class that is having virtual function has a vtable associated with it. So that class contains a vptr(virtual pointer) containing a base address of that vtable. Hence size of any object of that class is increased by one pointer variable. <br>'''Answer Submitted by:''' Shajinth Pathmakulaseelan and Auquib Rasul, Team 2 <br><br>
== Bug Reports ==
'''*''' In the provided cio-fields-test-3, the backspace still does not stop when the start of the line is reached.
 
'''''Submitted by: Team 4'''''
== Possible/Challenging Enhancements ==