Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object Names, Case Sensitive?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00391501
Message ID:
00391712
Views:
13
Object names are not case sensitive. Your problem is probably the use of the form name instead of an object reference to the called form. You could loop through the _screen.forms() collection to get an object reference:
local i, oForm
oForm = .null.
for i = 1 to _screen.formcount
   if upper(_screen.forms(i).name) = 'FRMCASHDETAIL'
      oForm = _screen.forms(i)
      exit
   endif
endfor
if !isnull(oForm)
   oForm.cmdNew.SetFocus()
endif
>Are there rules for case sensitivity for objects?
>
>I've run into weird bugs especially when attempting to activate one form object from another form object such that
>
>frmCashDetail.cmdNew.setfocus()
>FRMCASHDETAIL.cmdNew.setfocus()
>frmcashdetail.cmdNew.setfocus()
>
>are all different. The only way I can figure out what the correct name is to look in the debugger to find out what _Screen.ActiveForm.Name is.
>
>This makes me nervous...especially because only the first part of the object name, (the form name) seems to exibit the problem, the buttons and text box names seem not to care if they are uppoer or lower case.
>
>Advice appreciated.
>
>--- Larry
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform