Good point.  I've changed that LEFT(lcKey,1) to "\" $ lcKey:

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

Do you think I'd have a problem with non-USA folks using this app if I'm not using option level 1 or 2?

                * 0 = ansi human readable (38 wide)
                * 1 = unicode (76 wide)
                * 2 = binary (16 wide)

I feel dirty having primary keys 76 characters wide.



On 2014-06-11 10:59, Richard Kaye wrote:
I would think that if you ever get a CHR(0) in your generated value
then much merriment will also ensue... ;-) I'd also think that you
want to disallow the \ anywhere in the value to avoid any standard
combo behavior.

--

rk
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of
mbsoftwaresoluti...@mbsoftwaresolutions.com
Sent: Wednesday, June 11, 2014 10:41 AM
To: profoxt...@leafe.com
Subject: Re: Interesting GOTCHA from 16-byte binary key

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
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
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/2c708fab8b9f2edf8eeb6d1b2921c...@mbsoftwaresolutions.com
** 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