[Fxruby-users] make FXFontDialog robust to illegal fontdesc
Status: Inactive
Brought to you by:
lyle
From: Simon S. <ne...@ad...> - 2004-07-06 09:09:43
|
if one initializes FXFontDialog with an illegal fontdesc, then no font appears to choose among.. the dialog box is just empty. If I put a check in the 'All Fonts:', then I see the full list of fonts. Wouldn't it be an idea to make FXFontDialog robust to illegal font descriptions? def onSpawnFontDialog(sender, sel, ptr) win = FXFontDialog.new(self, "Choose Font", DECOR_TITLE|DECOR_BORDER) win.fontSelection = fxparsefontdesc("[nonexistingfont] 0 1 2 3 4 5") if win.execute != 0 @font = FXFont.new(getApp(), win.fontSelection) @font.create recalc_cellarea end return 1 end Can I do anything to validate the font/fontdesc, to avoid this from happening? Thanks in advance -- Simon Strandgaard |