BUI logoDWC logo BBjBusyIndicator::hasAttribute

In BBj 26.02 and higher, this method returns a boolean value indicating whether the BBjBusyIndicator has the specified attribute.

Syntax

Return Value Method
boolean hasAttribute(String attribute)

Parameters

Parameter Description
attribute Specifies the name of an attribute.

Return Value

Returns a boolean value indicating whether the BBjBusyIndicator has the specified attribute.

Remarks

This functionality is primarily intended for setting low-level BUI element attributes or DWC component attributes. When running in GUI, the attributes don't affect the control itself, but may be used by the developer.

Example

rem ' BBjBusyIndicator::hasAttribute

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()

title$ = "BBjBusyIndicator::hasAttribute"

window! = sysgui!.addWindow(100,100,400,400,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")

button! = window!.addButton(100,125,25,250,25,"Button activates busy indicator",$$)
button!.setCallback(button!.ON_BUTTON_PUSH,"busy")

window!.addStaticText(201,5,75,100,25,"Attribute:",$8000$)
window!.addStaticText(202,5,125,100,25,"Value:",$8000$)
attribute! =  window!.addEditBox(101,125,75,250,25,"attribute",$$)
value! =  window!.addEditBox(102,125,125,250,25,"",$$)
setAttribute! = window!.addButton(103,125,175,250,25,"setAttribute",$$)
setAttribute!.setCallback(setAttribute!.ON_BUTTON_PUSH,"setAttribute")
getAttribute! = window!.addButton(104,125,225,250,25,"getAttribute",$$)
getAttribute!.setCallback(getAttribute!.ON_BUTTON_PUSH,"getAttribute")
hasAttribute! = window!.addButton(105,125,275,250,25,"hasAttribute",$$)
hasAttribute!.setCallback(hasAttribute!.ON_BUTTON_PUSH,"hasAttribute")
removeAttribute! = window!.addButton(106,125,325,250,25,"removeAttribute",$$)
removeAttribute!.setCallback(removeAttribute!.ON_BUTTON_PUSH,"removeAttribute")

web! = bbjapi().getWebManager()
busy! = web!.getBusyIndicator(err=*next)

process_events

eoj:
   release

busy:
  busy! = web!.getBusyIndicator(err=*return)
  busy!.setText("BBjBusyIndicator")
  busy!.setVisible(1)
  wait 3 
  busy!.setVisible(0)
return

setAttribute:
  busy! = web!.getBusyIndicator(err=*return)
  attribute$ = attribute!.getText()
  value$ = value!.getText()
  busy!.setAttribute(attribute$,value$)
return

getAttribute:
  busy! = web!.getBusyIndicator(err=*return)
  attr$ = attribute!.getText()
  attr! = busy!.getAttribute(attr$)
  i = msgbox("value = """ + str(attr!) + """",0,"getAttribute "+attr$)
return

hasAttribute:
  busy! = web!.getBusyIndicator(err=*return)
  attr$ = attribute!.getText()
  has! = busy!.hasAttribute(attr$)
  i = msgbox("has "+attr$+" = "+Boolean.toString(has!),0,"hasAttribute "+attr$)
return

removeAttribute:
  busy! = web!.getBusyIndicator(err=*return)
  attr$ = attribute!.getText()
  busy!.removeAttribute(attr$)
return

See Also

BBjAPI

BBjSysGui

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.