|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - DbC
Shouldnt this constructor catch that hbm is null in the OUT contract ?
class Bitmap
{
public:
HBITMAP hbm;
BITMAP bm;
this()
{
hbm = null;
bm.bmWidth = -1;
bm.bmHeight = -1;
}
this( char[] name )
out { // here, this never gets executed it seems
wassert( hbm !== null ,"hbm !== null in File : [images.d] Line : (25) ");
msgBox("HERE");
}
body {
hbm = LoadImage( WA.globalInstance, c_str(name), IMAGE_BITMAP, 0, 0,
LR_LOADFROMFILE|LR_CREATEDIBSECTION );
if ( hbm !== null )
{
GetObject( hbm, bm.size, &bm );
}
else
{
msgBox("image load failed");
msgBox(OS.getLastError() );
}
}
It seems that the out part of the contuctor is never hit , am I missing
something ? Im getting a message box with image load failed ... but no
wassert, and no msgbox in out contract.
C
Dec 31 2003
Try putting a printf in the out and see if it gets executed. "Charles" <sanders-consulting comcast.net> wrote in message news:bsv43n$1lhg$1 digitaldaemon.com... Dec 31 2003
My fault, a -release got slipped in there, it works as expected :). On a side-note , ive been using D alot lately , and I've run into almost no trouble at all , be it internal errors , weird compiler error messages , import troubles etc. I think D is a perfect candidate for extreme programming ( though I think we've all been practicing this long before they had a name for it ) , which almost elimiates the need for a debugger. With the upcoming template revisions I think it will be ready for full blown use! Can't wait for the new release! C "Walter" <walter digitalmars.com> wrote in message news:bsvbvj$20m1$1 digitaldaemon.com...Try putting a printf in the out and see if it gets executed. "Charles" <sanders-consulting comcast.net> wrote in message news:bsv43n$1lhg$1 digitaldaemon.com... Dec 31 2003
I've not yet used a debugger on D. Haven't had the need. :) "Charles" <sanders-consulting comcast.net> wrote in message news:bsvfdd$25kq$1 digitaldaemon.com...My fault, a -release got slipped in there, it works as expected :). On a side-note , ive been using D alot lately , and I've run into almost Dec 31 2003
On Wed, 31 Dec 2003 15:42:04 -0800, Charles wrote:On a side-note , ive been using D alot lately , and I've run into almost no trouble at all , be it internal errors , weird compiler error messages , import troubles etc. Dec 31 2003
"Ant" <duitoolkit yahoo.ca> wrote in message news:pan.2003.12.31.23.38.59.666895 yahoo.ca...On Wed, 31 Dec 2003 15:42:04 -0800, Charles wrote:On a side-note , ive been using D alot lately , and I've run into almost Dec 31 2003
On Thu, 01 Jan 2004 11:09:47 +1100, Matthew wrote:"Ant" <duitoolkit yahoo.ca> wrote in messageI think my weekend import epiphany will cover most of the problems I was having... Dec 31 2003
"Charles" <sanders-consulting comcast.net> wrote in message news:bsvfdd$25kq$1 digitaldaemon.com...On a side-note , ive been using D alot lately , and I've run into almost Jan 01 2004
|