Home > Archive > microsoft.public.cert.exam.mcsd > July 2002 > MCSD Training Kits errata--where?? (exam 70-176)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author MCSD Training Kits errata--where?? (exam 70-176)
Scott Glasgow

2002-07-26, 3:25 pm

Got an odd one here. I'm using the MS Press "Desktop
Applications for Microsoft Visual Basic 6.0 MCSD Training
Kit" to prep for 70-176. At the end of Chapter 3 appears
the following routine, which should fall out if no Option
Buttons are selected for Payment Type. However, the test
fails every time, permitting DisableControls to be called,
even if no buttons are selected. To check if I was missing
a typo on my part or something, I loaded the pre-finished
exercise from the Solutions folder for chapter three. It
does precisely the same thing, permitting DisableControls
even if no Option Button selected.

Two questions:
1. Why does the routine not work as expected?

2. Where can I locate the errata file(s) for these
training kits, if any
exist?

Thanks for any help you can offer. [code follows below]

Scott Glasgow
==============================
=
Private Sub cmdDone_Click()
Dim ctl As Control

For Each ctl In Controls
If TypeOf ctl Is TextBox Then
If ctl.Text = "" Then
MsgBox "All fields must be entered."
Exit Sub
End If
ElseIf TypeOf ctl Is MaskEdBox Then
If ctl.ClipText = "" Then
MsgBox "All fields must be entered."
Exit Sub
End If
ElseIf TypeOf ctl Is OptionButton Then
If ctl.Value = "" Then
MsgBox "Payment type is required."
Exit Sub
End If
End If
Next ctl
DisableControls
End Sub

Tim

2002-07-26, 3:25 pm

It's been a while, but search for the book at mspress.microsoft.com and then
'support' or 'errata'. This book has a ton of errors, but as I recall their
errata listing covers most of it.

Despite the errors, I think it's pretty good prep for the exam, and I took
it before they'd published the official errata.


RichardJW

2002-07-26, 3:56 pm

That's correct. There were a ton of errors in the MS Press 70-016 C++ book as well. I found a whole bunch of additional errors not in the errata, listed them all and the way they could be corrected and e-mailed them to Microsoft. They never e-mailed back (which was nice )
RichardJW

2002-07-26, 4:03 pm

BTW this code runs:

Private Sub cmdDone_Click()
Dim ctl As Control

For Each ctl In Controls
If TypeOf ctl Is TextBox Then
If ctl.Text = "" Then
MsgBox "All fields must be entered."
Exit Sub
End If
'ElseIf TypeOf ctl Is MaskEdBox Then
'If ctl.ClipText = "" Then
'MsgBox "All fields must be entered."
'Exit Sub
'End If
ElseIf TypeOf ctl Is OptionButton Then
If ctl.Value = "" Then
MsgBox "Payment type is required."
Exit Sub
End If
End If
Next ctl
'DisableControls
End Sub

So 'MaskEdBox' is wrong and the 'DisableControls' call
Scott Glasgow

2002-07-27, 12:25 am

Thanks, Tim. I'll check it out. In the meantime, could you
perhaps tell me how one uses form-level validation to
determine that at least one member of a radio group
(sorry, option group; I'm coming from Delphi--exigencies
of the job market) has been selected? Thanks.

Cheers,
Scott

>-----Original Message-----
>It's been a while, but search for the book at

mspress.microsoft.com and then
>'support' or 'errata'. This book has a ton of errors, but

as I recall their
>errata listing covers most of it.
>
>Despite the errors, I think it's pretty good prep for the

exam, and I took
>it before they'd published the official errata.
>
>
>.
>

Scott Glasgow

2002-07-27, 1:25 am

Alright! Found it. Whew! You're right; there seem to be
quite a few errors. But, what the hey, errors... ummm,
happen, and the book does seem to be pretty good, so far.
Besides, I've purchased the entire Transcender set for 70-
176, 70-175, 70-100, and 70-029 (including the Desktop and
PDA Flash sets), as well as the associated MS Press
Training Kits for each test. I plan on working through
each kit, then using the Transcender sets to study before
testing. I've been programming one language or another
since 1983, so I think I'll be OK.

Thanks for the pointer to the errata; that'll help. It
confirmed what I thought--there's no single test that will
do it; you have to test each radio button to determine if
any have been selected. There's no single "group" test to
see if they're all off or all on, since the group (i.e.
panel... er, frame--sorry, old time Delphi guy here) is
basically nothing but a container. Thanks again, Tim.

Cheers,
Scott

>-----Original Message-----
>It's been a while, but search for the book at

mspress.microsoft.com and then
>'support' or 'errata'. This book has a ton of errors, but

as I recall their
>errata listing covers most of it.
>
>Despite the errors, I think it's pretty good prep for the

exam, and I took
>it before they'd published the official errata.
>
>
>.
>

Scott Glasgow

2002-07-27, 1:25 am

Hunh? The code as given in the book ran, that wasn't the
issue (i.e. it was a logic error). The point was supposed
to be that if one of the option buttons wasn't selected,
DisableControls (which put the app back into an idle state
between entering reservations) would not be called, and a
message would appear in the status bar to alert the
operator that there was missing data (the chapter is
*entirely* concerned with data validation).

The problem was that the code, as written, failed the test
every time even though no button was selected, so the
message never appeared and DisableControls was always
called (assuming that the masked edit and the text boxes
had data, of course). The solution is that each option
button's state must be individually tested. The revision
given in the errata to that effect *does* work.

Since DisableControls _must_ be called for the normal
operation of the application (i.e. it is only called if
all data is validated), I'm not certain what the
alterations described below would accomplish, other than
to eliminate validation checking altogether for the masked
edit, while preserving the inefficacy of the validation of
the option buttons.

Thanks anyway for your response, Richard. I know it's
kinda hard to see the point of the code without having the
whole bloody app spread out before you. It's one of
those "build-it-as-you-go-through-the-book" things. This
excerpt is rather like the proverbial "sensing what an
elephant is like by feeling his trunk while blindfolded" ;-
).

Cheers,
Scott

>-----Original Message-----
>
>BTW this code runs:
>
>Private Sub cmdDone_Click()
>Dim ctl As Control
>
>For Each ctl In Controls
>If TypeOf ctl Is TextBox Then
>If ctl.Text = "" Then
>MsgBox "All fields must be entered."
>Exit Sub
>End If
>'ElseIf TypeOf ctl Is MaskEdBox Then
>'If ctl.ClipText = "" Then
>'MsgBox "All fields must be entered."
>'Exit Sub
>'End If
>ElseIf TypeOf ctl Is OptionButton Then
>If ctl.Value = "" Then
>MsgBox "Payment type is required."
>Exit Sub
>End If
>End If
>Next ctl
>'DisableControls
>End Sub
>
>So 'MaskEdBox' is wrong and the 'DisableControls' call
>
>---
>View this thread:

http://www.examnotes.net/article51910.html
>RichardJW-------------------------------------------------

-----------------------
>RichardJW's Profile:

http://www.examnotes.net/forums/member.php?
action=getinfo&userid=75238
>
>.
>

Me2

2002-07-27, 4:25 pm

Just look at debugging the examples as part of the training! You don't get
examples in the real world, but you do end up debugging other people's
errors.

--

Ralph Page
MBA, MCDBA, MCSE
---------------------------------------------------------------------------
"Victory waits upon unity of action."
-- Publius Syrus (85-43 B.C.)
----------------------------------------------------------------------------
"Scott Glasgow" <paladin@fuse.net> wrote in message
news:15a801c234e6$d4cd4520$a4e
62ecf@tkmsftngxa06...
> Got an odd one here. I'm using the MS Press "Desktop
> Applications for Microsoft Visual Basic 6.0 MCSD Training
> Kit" to prep for 70-176. At the end of Chapter 3 appears
> the following routine, which should fall out if no Option
> Buttons are selected for Payment Type. However, the test
> fails every time, permitting DisableControls to be called,
> even if no buttons are selected. To check if I was missing
> a typo on my part or something, I loaded the pre-finished
> exercise from the Solutions folder for chapter three. It
> does precisely the same thing, permitting DisableControls
> even if no Option Button selected.
>
> Two questions:
> 1. Why does the routine not work as expected?
>
> 2. Where can I locate the errata file(s) for these
> training kits, if any
> exist?
>
> Thanks for any help you can offer. [code follows below]
>
> Scott Glasgow
> ==============================
=
> Private Sub cmdDone_Click()
> Dim ctl As Control
>
> For Each ctl In Controls
> If TypeOf ctl Is TextBox Then
> If ctl.Text = "" Then
> MsgBox "All fields must be entered."
> Exit Sub
> End If
> ElseIf TypeOf ctl Is MaskEdBox Then
> If ctl.ClipText = "" Then
> MsgBox "All fields must be entered."
> Exit Sub
> End If
> ElseIf TypeOf ctl Is OptionButton Then
> If ctl.Value = "" Then
> MsgBox "Payment type is required."
> Exit Sub
> End If
> End If
> Next ctl
> DisableControls
> End Sub
>



RichardJW

2002-07-27, 7:07 pm

Scott, I never used any of the Transcenders excepting 70-100. The MS Press book for 70-016 did not go into nearly enough depth. So I guess if you've got two distinct sets of option buttons you end up with yet more inelegant code. The point of the alterations is that the code ran as you presented it. I never stuck a masked edit box on the form BTW.
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net