[Gambas-user] frm2form 0.01

Rob sourceforge-raindog2 at ...94...
Mon Jul 21 16:11:59 CEST 2003


On Monday 21 July 2003 09:57, Nelson Ferraz wrote:
> I'm trying to fix the previous script. Here is a new version, including
> new strings to translate:

Thanks for helping out with this!  I noticed you had ClientHeight and 
ClientWidth in there as non-translatables.  I was using those as the form's 
height and width fields (since they're always in twips, which I can convert, 
while ScaleHeight and ScaleWidth depend on the value of ScaleMode).  What are 
you using for height and width presently?

Also, be careful, if you just match on Begin and End you may match 
BeginProperty and EndProperty.  That's why I did the ^\s*End\s*$ thing etc.  
I also am not sure it's safe to match the VB form files case sensitively; I 
know VB itself writes the stuff with consistent mixed case but I don't know 
about any third party tools people may have used.

> The resulting form still crashes Gambas; I'm trying to spot the error.
> (Benoit, is it possible that Gambas raise an error, instead of simply
> dying?)

Are you also creating a formname.class file?  It can be empty, but Gambas gets 
mad if it doesn't find one (as in exits without error message.)

But my guess would be your lack of Move(x,y,w,h) for each object on the form. 
;)  Here's the output of one of my unfinished VB frm's converted using my 
program; it doesn't crash Gambas for me (as long as I make a matching class 
file.)

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emuform.class
Type: application/x-java
Size: 39 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20030721/7e972a66/attachment.bin>
-------------- next part --------------
# Gambas Form File 1.0

{ emuform Form
  Move(100, 100, 401, 292)
  Text = ("EmuDisk Command & Control Center")
  Persistent = True
  { Command1 Button 
    Move(312, 254, 71, 34) 
  }
  { Command2 Button 
    Move(14, 254, 71, 34) 
  }
  { GameList ListBox 
    Move(208, 25, 167, 226) 
  }
  { Romlist ListBox 
    Move(4, 4, 167, 32) 
  }
  { SystemCombo ListBox 
    Move(6, 25, 167, 226) 
  }
  { Timer1 Timer 
    #X = 181
    #Y = 262
    Delay = 33
  }
  { vgPicture Image 
    Move(177, 33, 212, 212) 
  }
  { vgText Label 
    Move(183, 43, 210, 212) 
  }


More information about the User mailing list