GetActiveGadget compiles without ()

Just starting out? Need help? Post your questions and find answers here.
e2robot
Posts: 38
Joined: Wed Mar 19, 2014 8:34 am

GetActiveGadget compiles without ()

Post by e2robot »

Code: Select all

Enumeration
  #window
  #button1
EndEnumeration  

Procedure button_pressed()
  
  Debug GetActiveGadget
  
EndProcedure


OpenWindow(#window,10,10,200,200,"TEST")

ButtonGadget(#button1,20,20,30,20,"GO")
BindGadgetEvent(#button1,@button_pressed(),#PB_EventType_LeftClick)
The above compiles but doesn't work as expected because GetActiveGadget should be GetActiveGadget()

Thanks,
Phil
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: GetActiveGadget compiles without ()

Post by falsam »

This is not a bug: GetActiveGadget is a variable. Its value is 0.

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: GetActiveGadget compiles without ()

Post by Peter »

use EnableExplicit and you will see, that this is not a bug.

Greetings ... Peter
Post Reply