bug in hiGetFieldInfo ? (skill)

S

stefano

Guest
Hello,
I have problem with the function hiGetFieldInfo, that should return the
dimensions of the form field, however I always
get width:width (two equal values) instead of width:length values. Could
it be some bug or
am I doing something wrong (some settings conflict or switch or anything) ?

thank you very much

Best regards,

stefano
 
stefano wrote:
I have problem with the function hiGetFieldInfo, that should return the
dimensions of the form field, however I always
get width:width (two equal values) instead of width:length values. Could
it be some bug or
am I doing something wrong (some settings conflict or switch or anything) ?
What tool/version are you using? Also, do you have a testcase which
reproduces this?

I tried the following code, which works fine on my end (5.00.33):

------
(setq stringField (hiCreateStringField ?name 'afield
?prompt "prompt"))
(setq aform (hiCreateAppForm ?name 'myform
?formTitle "myform"
?fields (list stringField)))

(hiDisplayForm aform)
(printf "hiGetFieldInfo -> %L\n" (hiGetFieldInfo aform 'afield))
------

On my system, this prints:
hiGetFieldInfo -> ((0 0) (600 35) 63)

which looks about right for the form produced.

--
David Cuthbert (dacut@cadence.com) Tel: (412) 599-1820
Cadence Design Systems R&D
 
Thank you very much for the quick reply
I'm using the version 5.00.500.20

your code snip works fine for me , the problem is then, that I get the
wrong numbers after changing the form position.

best regards,

stefano

(test code follows:)
------------

; Cadence version: 5.0.0.500.20

xbut=hiCreateButton(
?name 'xbut
?buttonText "X"
?callback ""
)

xform=hiCreateAppForm(
?name 'xform
?formTitle "x"
?formType 'nonoptions
?dontBlock t
?buttonLayout 'OKCancel
?unmapAfterCB t
?fields list(
list( xbut 10:20 25:31 )
)

?attachmentList list( nil )
?callback ""
?initialSize list( 200 200 )
?minSize list( 200 200 )
?maxSize hiGetMaxScreenCoords()
)

hiDisplayForm( xform )

println( "Original coords:" )
println( hiGetFieldInfo( xform 'xbut ) )
println( "Now changing the x position by +1:" )
hiReattachField( xform 'xbut list( list( 11 20 ) list( 25 31 ) ) 0 )
println( "New coords:" )
println( hiGetFieldInfo( xform 'xbut ) )





-----------
David Cuthbert wrote:
stefano wrote:

I have problem with the function hiGetFieldInfo, that should return the
dimensions of the form field, however I always
get width:width (two equal values) instead of width:length values.
Could it be some bug or
am I doing something wrong (some settings conflict or switch or
anything) ?


What tool/version are you using? Also, do you have a testcase which
reproduces this?

I tried the following code, which works fine on my end (5.00.33):

------
(setq stringField (hiCreateStringField ?name 'afield
?prompt "prompt"))
(setq aform (hiCreateAppForm ?name 'myform
?formTitle "myform"
?fields (list stringField)))

(hiDisplayForm aform)
(printf "hiGetFieldInfo -> %L\n" (hiGetFieldInfo aform 'afield))
------

On my system, this prints:
hiGetFieldInfo -> ((0 0) (600 35) 63)

which looks about right for the form produced.
 
stefano wrote:
Thank you very much for the quick reply
I'm using the version 5.00.500.20

your code snip works fine for me , the problem is then, that I get the
wrong numbers after changing the form position.
Hm... yes, this does look like a bug. (I confirmed it on Linux and
Solaris, 5.00.33 USR3 and 5.10.41; it also doesn't matter whether the
field is a button or label or ...).

I don't quite see why this is happening, but I'm not an expert on the HI
forms code. I've filed a PCR on it and attached a modified version of
your testcase.
--
David Cuthbert (dacut@cadence.com) Tel: (412) 599-1820
Cadence Design Systems R&D
 

Welcome to EDABoard.com

Sponsor

Back
Top