>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: APL+Win crashes when disabling a Combo Box with style property 4096
Nicolai.Ohm
APL+Win crashes when disabling a Combo Box with style property 4096
Posted: Tuesday, January 10, 2006 12:44 PM (EST)

APL+Win crashes when you disable an combo box with style property 4096 (=Indents and images enabled).


Just try out the following sequence

 

'fmForm'ŒWI'New' 'Form'
'fmForm.cbCombo'ŒWI'New' Combo'('style' 2 4096)

Now typing in:

'fmForm.cbCombo'ŒWI'enabled'0

 

and APL+Win is gone.


It doesn’t matter whether you assign an image map to the combo prior to disabling it or not.


I also noticed that you can’t change the ‘where’ property of these combos after you created them. For instance, if you use the AutoResize handler on a form with 4069-style combo boxes, they totally screw up after resizing the form. As a workaround I have put them into a frame, so that their ‘where’ property within the frame isn’t affected by resizing the form.


I’m using Windows XP SP1 and APL+Win 5.2


Comments:

Author Thread:
Support
APL+Win crashes when disabling a Combo Box with style property 4096
Posted: Tuesday, January 10, 2006 1:42 PM (EST)

The problem with disabling a style 4096 Combo box is indeed a bug.  Thank you for reporting it.

As for your second problem, we are unable to reproduce it.  Have you tried setting the where property for the style 4096 combos yourself (not using the AutoResize handler)?  If yes and it behaves correctly, then the problem is likely in your AutoResize handler.

APL2000 Support

     

Nicolai.Ohm
APL+Win crashes when disabling a Combo Box with style property 4096
Posted: Wednesday, January 11, 2006 11:22 AM (EST)

Sorry, I was not precise enough, when I mentioned that the combo “screws up” while resizing.


Here is now more precise description of what I observed:


When you change the ‘where’ property of a style 4096- combo than the drop-down list is reduced to 3 list entries (no matter what the value was you provided in where[3]) and the vertical scroll bar in the list (set with style 16) disappears.


Enclosed the code that demonstrates the effects using your standard AutoResize handler, which found somewhere on this site.

 

'f' Œwi 'Create' 'Form' ('onResize' 'AutoResize')
'f.cb1' Œwi 'Create' 'Combo' ('style'16)('‘where' 0 1 0 1 0 10 1 ¯2)
'f.cb2' Œwi 'Create' 'Combo' ('style'16 4096)('‘where' 0 2 0 1 0 10 1 ¯2)
'f' Œwi 'Resize'

 

 

 

 

 

 

AutoResize;c;s;w
©’AutoResize -- automatically resize the objects on a fm
© each object has a UDP ‘where, either 2x2 or 4x2 matrix or 4 or 8 vector
© Copyright 1998 APL2000 Inc.
© Modified by Brent Hildebrand.  Added ‘where to accept 4 or 8 element vectors and ‘clientwhere for MDIForm
© Modified 9/1999.  Added ‘width to handle object widths of a CommandButton.
© ‘where[1] „… parentrow×
©       [2] „… parentrow+    (same as where[1])
©       [3] „… parentcol×
©       [4] „… parentcol+    (same as where[2])
©       [5] „… parentheight×
©       [6] „… parentheight+ (same as where[3])
©       [7] „… parentwidth×
©       [8] „… parentwidth+  (same as where[4])

© exit on minimize
…(1=¯1†Œwarg)/0

© new height and width
s„2†Œwarg
© handle clientwhere
:if 'MDIForm' ­ Œwi 'class'
    :if (0=2|½,w)^1=½½w„Œwi '‘clientwhere'
        w„(((½w)÷2),2)½w
    :end

    :if (†½w)¹2 4
        w[;Œio]„w[;Œio]×(†½w)½s
        w„+/w
        (2‡w)„0—2‡w
        Œwi 'clientwhere' w
    :endif
:end

:for c :in Œwi 'children'
    :if 'CommandButton' ­ c Œwi 'class'
        :if 0<½½w„c Œwi '‘width'
        :andif (†½w)¹¼2
            w„w×(†½w)†(¯1†s),1
            w„+/w
            w„0—w
            c Œwi 'width' w
        :end
    :end

    :if (0=2|½,w)^1=½½w„c Œwi '‘where'
        w„(((½w)÷2),2)½w
    :end

    :if (†½w)¹2 4
        w[;Œio]„w[;Œio]×(†½w)½s
        w„+/w
        (2‡w)„0—2‡w
        c Œwi 'where' w
    :end

:endfor

     

brent.hildebrand
APL+Win crashes when disabling a Combo Box with style property 4096
Posted: Wednesday, January 11, 2006 12:08 PM (EST)

One possible solution that might work for the resize issue, since you are setting the overall height to be constant, is to explicitly setting the 'where' property early in the object definition but leaving the {delta}where property set so that the width will still be variable on form resizing.  Example:

 

    ’ Test
[1]   'f' Œwi 'Create' 'Form' ('onResize' 'AutoResize')
[2]   'f.cb1' Œwi 'Create' 'Combo' ('style'16)('‘where' 0 1 0 1 0 10 1 ¯2)
[3]   'f.cb2' Œwi 'Create' 'Combo' ('where' 0 0 10 5)('style'16 4096)('‘where' 0 2.5 0 1 0 10 1 ¯2)
[4]   'f.cb3' Œwi 'Create' 'Combo' ('style'16)('‘where' 0 4 0 1 0 5 1 ¯2)
[5]   'f.cb4' Œwi 'Create' 'Combo' ('where' 0 0 8 10)('style'16 4096)('‘where' 0 5.5 0 1 0 10 1 ¯2)
[6]
[7]   'f.cb3' Œwi 'list' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine' 'ten' 'eleven' 'twelve'
[8]   'f.cb4' Œwi 'list' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine' 'ten' 'eleven' 'twelve'
[9]
[10]  'f' Œwi 'Resize'
    ’

     

Support
APL+Win crashes when disabling a Combo Box with style property 4096
Posted: Wednesday, January 11, 2006 5:48 PM (EST)

> When you change the ‘where’ property of a style 4096- combo than the
> drop-down list is reduced to 3 list entries (no matter what the value was you
> provided in where[3]) and the vertical scroll bar in the list (set with style 16)
> disappears.

The new where[3] value doesn't take affect until the combo is closed then reopened.  We are treating this behavior as a bug.

 

The reason the vertical scroll bar isn't visible in the empty style 4096 combo is because the style property value 128 (hide scroll bar if not necessary) is implicitly set for this type of Combo.

 

APL2000 Support

     



APL2000 Official Web Site

You must be the change you wish to see in the world.
--- Mahatma Ghandi

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |