Menu

#660 UserDialog Center fails with syntax error

v4.0
closed
5
2012-08-14
2009-04-30
No

I have a UserDialog subclass and within the InitDialog method, it calls self~Center. With the 4525 version of the beta, this has started failing with a syntax error:

==>dialog
1558 - return WndShow_Pos("P",self~DlgHandle, (sx - dcx * self~FactorX) %2,
(sy - dcy * self~FactorY) %2, 0, 0,, "NOSIZE "||showOptions)
44 - self~Center
2735 - self~InitDialog
702 - if self~startit(icon, nomodal) \= 0
7 - dlg~Execute("SHOWTOP")
Error 41 running C:\bin\ooRexx\OODPLAIN.CLS line 1558: Bad arithmetic conversion
Error 41.1: Nonnumeric value ("") used in arithmetic operation

The previous 4.0 betas that I've been running did not receive this error. I'm running on Windows XP (SP 3) on a 1920x1200 resolution display (not sure if that's relevant, but since it's trying to center, maybe it is).

I'm attaching a simple dialog.rex/dilaog.rc that recreates the problem.

Discussion

  • Brian Jongekryg

    Brian Jongekryg - 2009-04-30
     
  • Brian Jongekryg

    Brian Jongekryg - 2009-04-30
     
  • Mark Miesfeld

    Mark Miesfeld - 2009-04-30

    Thanks Brian, I'll take a look at this.

    I get the error, but I don't see right off the bat what has changed to cause it. Surely something I did though.

     
  • Mark Miesfeld

    Mark Miesfeld - 2009-04-30

    Committed revision 4563.

    Brian, this is fixed now. Thanks for reporting it.

     
  • Mark Miesfeld

    Mark Miesfeld - 2009-04-30

    Brian,

    We'll probably do another update of the beta in a few days because we've fixed a number of bugs.

    But, if you like to fix you installation now, you could the oodPlain.cls file.

    I'm attaching a file with the fixed code for the center() method. Just locate the center method in oodPlain.cls which will be around line 1556 and change the methd to read the same as the attached centerMehod.rex

     
  • Mark Miesfeld

    Mark Miesfeld - 2009-04-30

    Fix for the center() method in oodPlain.cls

     
  • Brian Jongekryg

    Brian Jongekryg - 2009-04-30

    Thanks. I updated my oodPlain.cls with your fix and my app now works again.

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-02-19

    The fix for this item was in the 4.0.0 release.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB