December 01, 2024, 09:46:30 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


2D Example - Clock - not working

Started by GWS, April 25, 2016, 10:38:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

Hi,

I don't understand this.  In IWB the program crashes - In EBasic, it runs OK.

The source code has been chenged slightly.  Since the original version did not have the Autodefine "off" statement, the sprite variables in IWB have been preceded by the type POINTER.  This is OK, although I normally would place that definition amongst the DEF's at the start of the program.

Loading the sprites is done by:

spr1 = LoadSprite(GETSTARTPATH()+"back.jpg")

.. a bit of Sapero fetish with empty brackets ..  ;)

spr1 = LoadSprite(GETSTARTPATH+"back.jpg")

should be fine.

In IWB the program still crashes.

But if you compile it with Debug - then press F9 to start the program - it will run successfully  :o

I don't see where this is going wrong. 

Best wishes, :)

Graham



Tomorrow may be too late ..

LarryMc

Quote from: GWS on April 25, 2016, 10:38:25 PM
spr1 = LoadSprite(GETSTARTPATH()+"back.jpg")
You're absolutely correct; the "()" are not needed with this builtin command.

Quote from: GWS on April 25, 2016, 10:38:25 PM
In IWB the program still crashes.

But if you compile it with Debug - then press F9 to start the program - it will run successfully  :o

I don't see where this is going wrong. 
Are you using IWBasic3.x? It doesn't have a working debugger?

But, to the point of why the program crashes in IWBasic;
After playing with it for a while I determined that it is caused by using the @TRANSROTOZOOM (or @ROTOZOOM) flag with
the SpriteDrawMode command.  I don't have the source code so I can't tell you why right now.  But something got changed in the switch over back when.  Maybe LarryS will add it to his list of items to look into.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

GWS

Hi Larry,

Yep, I've just set up Version 3.03 ..  ;D

I compiled the clock program for Windows with the Debug option ticked .. I assume that created a debugable exe.

Then I pressed F9 to start debug with an 'active single' - it confirmed an exe existed - and it worked  ;D

Puzzling isn't it ..  :)

Graham
Tomorrow may be too late ..

LarryMc

3.03 has the skeleton of a debugger that I was working on in it.  I inadvertently left the buttons active when I issued the release.

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library