On Thu, May 26, 2011 at 4:41 PM,  <[email protected]> wrote:

> Using ResDialog, I cannot initially display data in an edit control. The
> test I ran to try to isolate the problem is as follows:

The reason that the text does not display when you set it in
initDialog() is due to ooDialog's data attributes and automatic data
detection feature.  This feature was never documented well and
probably not well understood.

In the 4.2.0 ooDialog doc I have written a couple of sections trying
to explain it better.  Please read the intro to section 3.6 Data
Attribute Methods and section 3.6.1 Understanding Data Attributes to
get an explanation for the feature.  Sections 3.6.2 and 3.6.3 are also
useful.

For anyone that doesn't yet know how to get a hold of the very latest
ooDialog documentation, you can a copy from the build machine, go to:

http://build.oorexx.org/builds/docs/

scroll down to the directory with the highest numerical name, and in
that directory get oodialog.pdf.

Back to your problem Oliver, specifically what happens is that
setData() is executed by the ooDialog framework to set the "values" of
all the dialog controls to match the Rexx data attributes *after*
initDialog() has finished.  The value of the data attribute for the
edit control is the empty string and your edit control text gets reset
to that.

I don't like data attributes personally.  Partly because of this
behavior you are seeing.

If you don't use data attributes, you can fix your problem by turning
automatic data protection off.  Add this method, the two following
lines, to your dialog:

::method initAutoDetection
  self~noAutoDetection


> I have two identical programs, except that one uses RcDialog while the other
> uses ResDialog.

I would expect the same problem to exist in the RcDialog.  If you
could send me both programs without any changes so I could why the
RcDialog is behaving differently, I'd appreciate it.  Just send them
to miesfeld at gmail.  I don't think you send attachments to the list.

Thanks for bringing this up Oliver.

--
Mark Miesfeld

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to