DeleteButton with DoubleBuffer gives error, bug or a feature?

Report any Hollywood bugs here
Post Reply
Bugala
Posts: 1181
Joined: Sun Feb 14, 2010 7:11 pm

DeleteButton with DoubleBuffer gives error, bug or a feature?

Post by Bugala »

Code: Select all

BeginDoubleBuffer()
MakeButton(1, #SIMPLEBUTTON, 100, 100, 200, 200, {OnMouseUp=Function() EndFunction})
DeleteButton(1)
will complain "A BGPic needs to be active while calling button functions!"

Problem can be got around by turning doublebuffering off before DeleteButton and then back on after having done DeleteButton.

Is this a bug or a feature? for it seems odd that I can create and use buttons when DoubleBuffering is on, but I cant delete them until I first turn DoubleBuffering off.
User avatar
airsoftsoftwair
Posts: 5450
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DeleteButton with DoubleBuffer gives error, bug or a feature?

Post by airsoftsoftwair »

That's actually a feature. Double buffer puts Hollywood in a rather lowlevel state and it's expected that you handle everything manually. Layers and sprites aren't available in double buffering mode either.
Post Reply