[Done] 6.02 bug with ToolBarStandardButton()

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

[Done] 6.02 bug with ToolBarStandardButton()

Post by XCoder »

I think I may have discovered a bug in PureBasic version 6.02. If I run the following code from the help file

Code: Select all

  If OpenWindow(0, 0, 0, 150, 25, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If CreateToolBar(0, WindowID(0))
      ToolBarStandardButton(0, #PB_ToolBarIcon_New)
      ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
      ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
    EndIf
    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_Event_Menu
        Debug "ToolBar ID: "+Str(EventMenu())
      EndIf
    Until Event = #PB_Event_CloseWindow 
  EndIf

I get an error message:

ToolBarStandardButton() is not a function, array, list, map or macro.

Also clicking on ToolBarStandardButton() in the IDE does not open the help file at the appropriate function page.

// Moved from "Bugs - Windows" to "General Discussion" (Kiffi)
infratec
Always Here
Always Here
Posts: 6517
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: 6.02 bug with ToolBarStandardButton()

Post by infratec »

It is a bug, but ...

in the documentation. The function is removed since 6.00

viewtopic.php?p=597253
User avatar
mk-soft
Addict
Addict
Posts: 4863
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: 6.02 bug with ToolBarStandardButton()

Post by mk-soft »

For old projects ...

Module ToolBarStandardButtons
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: 6.02 bug with ToolBarStandardButton()

Post by XCoder »

Thanks, mk-soft - I hadn't realised that this function had been removed.
User avatar
spikey
Enthusiast
Enthusiast
Posts: 511
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: 6.02 bug with ToolBarStandardButton()

Post by spikey »

You may also find this thread interesting:
Create your own icons for toolbars etc. with PureBasic
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 1983
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: 6.02 bug with ToolBarStandardButton()

Post by Andre »

As here the ToolBar docs need to be rewritten (including the decision, if and how an alternative to the removed ToolBarStandardButton / related example code should be included), it's a task for @Fred

See: viewtopic.php?p=597253
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Fred
Administrator
Administrator
Posts: 15950
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [Done] 6.02 bug with ToolBarStandardButton()

Post by Fred »

Removed.
Post Reply