problem with hash

104 views
Skip to first unread message

Quique

unread,
Sep 6, 2022, 12:17:48 PM9/6/22
to Harbour Users
Hi.
 
I have  

hConfig := { => }
hConfig:oCursorHand" := TCursor():New(, Upper("hand") )

and obtain

Error: BASE/1005
Message not found: HASH:_OCURSORHAND
Args:
[ 1 ] = Type: H Val: { Hash of 0 Items }

if I change

hConfig := { => } 

by 

hConfig := { "OCURSORHAND" => nil }

obtain

Message not found: HASH:_OCURSORHAND
Args:
[ 1 ] = Type: H Val: { Hash of 1 Items }

I changed

hConfig:oCursorHand" := TCursor():New(, Upper("hand") )

by

hConfig[ "OCURSORHAND" ] := TCursor():New(, Upper("hand") )

and then same.

I have this in hbm file

-n -m -a -w
#-b
-p

-gtwin

-inc
-mt

-main=_qs_main

#xhb.ch
xhb.hbc
hbnf.hbc
#hbmysql.hbc
hbmisc.hbc
hbhpdf.hbc

Quique

unread,
Sep 6, 2022, 12:48:22 PM9/6/22
to Harbour Users
Sorry, if I use

hConfig[ "OCURSORHAND" ] := TCursor():New(, Upper("hand") )

it works fine, but the problem is I have many cases like

hConfig:oCursorHand" := TCursor():New(, Upper("hand") )

that not works

Quique

unread,
Sep 8, 2022, 3:32:39 PM9/8/22
to Harbour Users
Only as comment.

I delete all changes to test useing hash style instad object like I started and it compiled and run without problems, I don't have any idea why, but it works fine now.

Reply all
Reply to author
Forward
0 new messages