On Sun, Feb 23, 2014 at 1:51 PM, <amphitr...@ok.de> wrote:

> > The select() method will select the first item in the combo box that
> > exactly matches s.
>
> Select and show seems to be something different. It appears that
> the item I'd like to see _is_ selected but not shown. I send you
> an running excerpt from my application to you offlist.
>
>
Hi Mike,

The problem you are having with the combo box is due to automatic data
detection.  You should read the section titled Data Attribute Methods under
The Dialog Object chapter. Particularly the first couple of sections.
 Problems with Data Attributes has this paragraph:

"With auto detection on, the states of the dialog controls are set to the
data (values) of the corresponding data attributes. This is done after
initDialog is invoked. The consequence of this is that, if the programmer
explicitly sets the state of the dialog controls in the initDialog()
method, the ooDialog framework will then reset the state of all the dialog
controls afterwards. This can be disconcerting to the programmer if
automatic data field detection is not understood."

It is no secret that I'm not overly fond of the whole concept of data
attributes.  Automatic data detection is on by default.  What you want to
do is turn it off.  You can do that globaly for your whole application by
putting this statement towards the beginning of your program:

.application~autoDetection(.false)

Or you can turn it off on a per dialog basis by adding this method to a
dialog:

::method initAutoDetection
    self~noAutoDetection

Basically, what is happening is that, in initDialog() you set the combo box
to select item 4, and then after that the framework sets the combo box back
to unselected.

--
Mark Miesfeld
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to