It appears that:
pControl = GetControl(txtD1Owner1);
Lot.Owner1 = pControl->GetText();
misses the last character in the edit control.
As I test, I tried this, which works:
Lot.Owner1 = *(CEdit)pControl.GetLine(0);
Although there is only 1 line.
Fixed. Thanks.
Fundamental question for dummy:
QuoteLot.Owner1 = pControl->GetText();
Lot.Owner1 = *(CEdit)pControl.GetLine(0);
Can someone please tell me (in dumbese) what the right side of the eqaul sign is telling me in each case?
And type real slow!
It's my code, so I'll give it a try.
The code is incomplete, but was enough for Paul to see the problem. This comes first:
pControl = GetControl(txtD1Owner1);
and provides the pointer to an edit control. ("txtD1Owner1" is my naming convention for a "text box" in dialog D1 for variable Owner1. I never use just numbers.) Once you have the pointer to the control
pControl->GetText(); // pointer function call syntax
gives you the text in it. Since there was a bug in the subroutine, I used:
*(CEdit)pControl.GetLine(0);
instead. I'm not sure why the syntax for derefencing is different, but I guess it has something to do with where the function is defined. This function is supposed to give you a specific line in a multi-line control (starting at zero), but it worked for what I needed to do while Paul does the fix.
Sorry, but I can't type any slowerÂÃ, ;)
*x.y is equivalent to x->y, but Aurora has some bugs at the moment that don't allow you to use the -> operator since it doesn't remember the type of the pointer.
Quote from: Parker on January 06, 2006, 03:10:08 PM
*x.y is equivalent to x->y, but Aurora has some bugs at the moment that don't allow you to use the -> operator since it doesn't remember the type of the pointer.
Thanks. I was worried about my lack of understanding. A bug is not the first thing you think of when dealing with Paul's work.
Actually it does allow it.
CControl *pControl;
CEdit *pEdit = GetControl(txtD1Owner1);
Lot.Owner1 = pEdit->GetLine(0);
See the difference ;)
It does. Easier to read (and type).
I was referring to the fact that there were a couple of times when it doesn't work, I think I found them in function calls and when using arrays. For example (not quite sure if it's right though):
DoWork(item->data[1]);
They should have all been working in the last update.