Yes but in this case it wasn't disabling the value; it wasn't showing it at all for some reason. Here's how I populate the cbo in the Init event:

this.Clear
SELECT curJobTypes
SCAN
        this.AddItem(ALLTRIM(curJobTypes.cJobType))
        this.AddListItem(curJobTypes.cID,this.NewItemId,2)
ENDSCAN

ADDPROPERTY(this,'cOrigValue','')

So when I SET STEP ON and traced in, I could see it add the cryptic keys (cID field) in as expected; however, when the user chose that option in the dropdown, the cbo.value wasn't the full cryptic key. Changing the \ to _ fixed it. So technically, I guess it wasn't the full \0 but perhaps the \, but since that's how escape characters are built and \0 is null iirc, I concluded that I'll just regenerate the key if leading with a \.

--Mike



On 2014-06-11 04:15, Laurie Alvey wrote:
Doesn't "\" in a list box or cbo disable the item?

Laurie


On 10 June 2014 23:50, <[email protected]> wrote:

Found that the leading \0 was the cause/reason-to-blame for the cbo's
misbehavior.  Retooled the CreateKey method by adding this before the
return:

IF LEFT(lcKey,1) = '\' THEN && try again..don't like those as it caused
issue with cboJobType
  lcKey = this.CreateKey(tiLevel)
ENDIF



On 2014-06-10 16:17, [email protected] wrote:

On 2014-06-10 16:15, [email protected] wrote:

I had a record where the primary key was '\0|±ß pM•wÑ ©9†‚' (without
the beginning/ending quotes) and the cbo to which it was tied didn't
like it. I'm not sure if it was the leading \0 or the , near the end.
 Thoughts?  I'm gonna have to retool my key generation routine to
reseed it if detects either character, methinks.



Here's the routine I use:

FUNCTION CreateKey(tiLevel as Integer) as String
* Returns newly created GUID using class from VFP2C32.
        LOCAL lcKey as String
        * 0 = ansi human readable (38 wide)
        * 1 = unicode (76 wide)
        * 2 = binary (16 wide)
        IF VARTYPE(tiLevel) <> "N" THEN
                tiLevel = this.iDefaultKeyLevel
        ENDIF
IF NOT ("vfp2c32.fll" $ SET("Library")) THEN && mjb 04-16-14 minor
tweak.  Happy birthday, Bob!  :-)
                SET LIBRARY TO vfp2c32.fll && mjb 05-17-14 took out
LOCFILE
        ENDIF
        lcKey = CreateGUID(tiLevel)
        RETURN lcKey
ENDFUNC && CreateKey() as String


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to