Mike,

Just move the lines like this:

  self~constDir[EDIT_CTRL] = 100      /* see oodialog.pdf p 21 */
  self~constDir[PUSH_BUTTON] = 110    /* see oodialog.pdf p 21 */
  self~create(30, 30, 257, 123, "Simple Dialog 3", "CENTER")

You need to add the symbolic IDs, *before* you call create().  Internally,
the create() method will call the define() method before it returns to your
init() method..  So, in your define() method, the symbolic IDs have not yet
been added to the constDir.

--
Mark Miesfeld

On Tue, Nov 6, 2012 at 1:19 PM, <amphitr...@ok.de> wrote:

> in ooDialog Reference Version 4.2.0 the use of symbolic IDs is
> praised here and there. I tryed to do so as described in the
> example within paragraph 2.3.13 'Using Symbolic IDs in ooDialog'
> on page 21. As shown there I defined two symbolic IDs in the
> ::method init by self~constDir[SYMBOLIC_ID] = ID (with ID being a
> number > 50 as adviced in paragraph 2.3.7 'Predefined Symbolic
> IDs' on page 16.
>
> But I just get the hint that the symbolic ID I defined "is an
> undefined, non-numeric, identification number". Well, at least it
> is a number, even an identification number, but with my poor
> English I do not understand 'non-numeric number'. And I did define
> it as stated it the manual, look here:
>
>   /* Simple Dialog with an edit control and system menu */
>   dlg = .SimpleDialog~new
>   dlg~execute("SHOWTOP")
>   ::requires "ooDialog.cls"
>   ::class 'SimpleDialog' subclass UserDialog
>
>   ::method init
>   forward class (super) continue
>   self~create(30, 30, 257, 123, "Simple Dialog 3", "CENTER")
>   self~constDir[EDIT_CTRL] = 100      /* see oodialog.pdf p 21 */
>   self~constDir[PUSH_BUTTON] = 110    /* see oodialog.pdf p 21 */
>
>   ::method defineDialog
>   self~createEdit(EDIT_CTRL, 7, 7, 243, 85, "MULTILINE VSCROLL",
>   "NOBORDER NOTAB READONLY")
>   self~createPushButton(PUSH_BUTTON, 7, 99, 50, 14, , "Write",
> onWrite)
>   self~createPushButton(IDCANCEL, 197, 99, 50, 14, , "Quit")
>
>   ::method initDialog
>   self~setControlSysColor(EDIT_CTRL, 7, 4)
>   hFont = self~createFontEx("Courier New", 9)
>   self~setControlFont(EDIT_CTRL, hFont, .false)
>
>   ::method onWrite unguarded
>   expose editControl charcount     /* remember until next time */
>   line = 'It is now' date() time()
>   if editControl~defaultName = 'a String', /* 1st time here */
>    then do
>    editControl = self~newEdit(EDIT_CTRL)  /* get an edit object */
>    charcount = 1                          /* first cursor pos */
>   end
>   else line = .endOfLine || line            /* insert a CRLF */
>   editControl~select(charcount, charcount)  /* set cursor to the
> very end */
>   charcount = charcount + length(line) /* remember for next time */
> editControl~replaceSelText(line) /* add text and scroll display */
>
> What have I overlooked?
>
> TIA for any helpful hint.
> Mike
>
> --------------------------------------------
> Kostenlose E-Mail-Adresse mit unbegrenztem Speicherplatz für E-Mails, Free
> SMS und OK-Drive, der Online-Festplatte.
> Sicher Dir jetzt Deine Wunschadresse @ OK.de: www.ok.de
>
>
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> Oorexx-users mailing list
> Oorexx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to