bug in hiGetFieldInfo ? (skill)

Discussion in 'Cadence' started by stefano, Oct 21, 2004.

  1. stefano

    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, Oct 21, 2004
    #1
  2. 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, Oct 21, 2004
    #2
  3. stefano

    stefano Guest

    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 ) )





    -----------
     
    stefano, Oct 22, 2004
    #3
  4. 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, Oct 25, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.