Re: TDataGridDlg - compiling with v1.22 help!
V 1.22 still isn't "const" complete yet - still some problems as you've found - but in v_defs.h I have the following:
// VCONST can be defined as const, but that will require changes
// to apps. We will wait until V 2.0 for that to happen officially,
// but for now, this is available, at least on some classes.
// The VMUTABLE const is associated with VCONST.
#define VCONST const
#define VMUTABLE mutable
// #define VCONST
// #define VMUTABLE
You need to add a few more VCONST such as in the vDialog and vModalDialog consructors:
// vdialog.h - duplicate in vdialog.cpp
vDialog(VCONST vBaseWindow* creator, int modal = 0,
VCONST char* title = "");
vDialog(VCONST vApp* creator, int modal = 0, VCONST char* title = "");
// vmodald.h.h - duplicate in vmodald.h.cpp
vModalDialog(VCONST vBaseWindow* creator, VCONST char* title = "");
vModalDialog(VCONST vApp* creator, VCONST char* title = "");
Also, the constructors in the "standard" dialogs need to have VCONST added
// vnotice.h
vNoticeDialog(VCONST vBaseWindow* bw, VCONST char* title = "Notice") :
vModalDialog(bw,title) { _cmdsAdded = 0; }
vNoticeDialog(VCONST vApp* aw, VCONST char* title = "Notice") :
vModalDialog(aw,title) { _cmdsAdded = 0; }
// vreply.h
vReplyDialog(VCONST vBaseWindow* bw, VCONST char* title = "Reply") :
vModalDialog(bw, title) { added = 0;}
vReplyDialog(VCONST vApp* aw, VCONST char* title = "Reply") :
vModalDialog(aw, title) {added = 0;}
// vynreply.h
vYNReplyDialog(VCONST vBaseWindow* bw, VCONST char* title = "Yes or No") :
vModalDialog(bw,title) {added = 0;}
vYNReplyDialog(VCONST vApp* aw, VCONST char* title = "Yes or No") :
vModalDialog(aw,title) { added = 0; }
Those are the ones I remember. If you still have problems with this, I can diff the my modified source with the original 1.22 source and send you all the changes.
----- Original Message -----
From: Martin Waller <polytope_@hotmail.com>
To: <vgui-discuss@other.debian.org>
Sent: Wednesday, September 08, 1999 4:23 AM
Subject: TDataGridDlg - compiling with v1.22 help!
| Hello,
|
| AS per the instructions for TDataGridDlg, I uncommented the #define VCONST
| const and commeneted out #define VCONST in v_defs.h. However, I get errors
| about unable to modify const objects when re-building the V library after
| doing this.
|
| If I don't do it, then TDataGridDlg won't build.
|
| Any way around this 'Catch v1.22' (pardon the poor joke).
|
| Info appreciated,
|
| Ta
|
| Martin
Reply to: