bug in hiGetFieldInfo ? (skill)
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
bug in hiGetFieldInfo ? (skill)

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Cadence
Author Message
stefano
Guest





Posted: Thu Oct 21, 2004 5:16 pm    Post subject: bug in hiGetFieldInfo ? (skill) Reply with quote

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

Back to top
David Cuthbert
Guest





Posted: Thu Oct 21, 2004 7:08 pm    Post subject: Re: bug in hiGetFieldInfo ? (skill) Reply with quote

stefano wrote:
Quote:
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
Back to top
stefano
Guest





Posted: Fri Oct 22, 2004 11:52 am    Post subject: Re: bug in hiGetFieldInfo ? (skill) Reply with quote

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:
Quote:
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.


Back to top
David Cuthbert
Guest





Posted: Mon Oct 25, 2004 7:54 pm    Post subject: Re: bug in hiGetFieldInfo ? (skill) Reply with quote

stefano wrote:
Quote:
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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Cadence All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB