Re: Compile Q
Bryan Bulten <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
> Checkbox: "Can not cast from source to destination type"
> but I cannot find what exactly is the offending code.
> Casting the flags to (int) didn't help either. Do you
> have any idea or is this a compiler bug?
Hmmm... It seems as if the line number that msc reports is incorrect.
By changing the item0.Add(...) line shown below I was able to get it to
compile.
public static Sizer MyDialogFunc(Window parent, bool call_fit, bool
set_sizer)
{
BoxSizer item0 = new BoxSizer( Orient.Vertical );
CheckBox item1 = new CheckBox( parent, ID_CHECKBOX, "Check" );
item0.Add(item1, 0, (int)Alignment.Center|(int)Direction.All,
5, null );
....
}
Currently, the wx interface is far from complete, so many of the
constructors/methods used in your sample aren't implemented yet.
Unfortunately, C# treats the enum's as data types, requiring these
casts. I think it might be better if the flags used are kept as int's
instead of enum's.
I'm planning on filling out a few of the classes this weekend, as well
as changing a few of the naming schemes, and adjusting the flags to
int's, unless there is a better solution to this, or anyone objects.
--
Bryan Bulten
http://opendev.ods.org/
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+cAyI32WFWIzmzHgRAnf+AJ98bMpexnS+kvlC0qhY0LPwGby8XACfV1nX 9UAXBS7VlTeVpNAqiJJqjZs= =EM0q -----END PGP SIGNATURE-----