PureBasic Docs - Errors & needed improvements to the man

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

Moderator: Documentation Editors

Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Trond »

GetClipboardImage() mentions obsolete constant #PB_Image_DisplayFormat.
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Demivec »

None of the commands in the LinkedList library (i.e. AddElement(), SwapElements(), etc.) are brought up when pressing F1 in the IDE.

The help file displays "This program cannot display the webpage" instead.

The help file does contain the information, it just isn't available using F1 from the IDE so I might need to post this in the Bug section instead. Please let me know.
User avatar
HwyStar
Enthusiast
Enthusiast
Posts: 101
Joined: Mon Apr 05, 2010 7:13 pm
Location: Reno, Nevada

Re: PureBasic Docs - Errors & needed improvements to the man

Post by HwyStar »

SortStructuredList() and SortList() do not appear in the main "PureBasic - LinkedList" section.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: PureBasic Docs - Errors & needed improvements to the man

Post by luis »

PB 4.50
luis wrote:Help on DESFingerprint()

"compatiable which any standard linux hash password " should be "compatible with ..."
Now it's " compatible which " ... almost there ! :mrgreen:

luis wrote:in 4.40 B7
in the PureBasic - Map (overview) the link to the sample program Map.pb doesn't work, at least on my system...
Now the link to the sample program it's vanished altogether :?:

luis wrote:AddMapElement()
Note: This function isn't mandatory when dealing with maps, as elements are automatically added when affecting a value to them
Affecting ? Maybe should be "assigning" ? Or "storing a value into them" ?
Still there.
luis wrote: Maps - Overview
You can add as many elements as you want (or as many as will fit into the memory of your computer), and accessing it back using a key.
Maybe "access them back" ?
Still there.

Trond wrote:- Typing ArraySize() and pressing F1 leads to the wrong manual page (Array instead of ArraySize()).
Just found this me too, still present in 4.50 final
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: PureBasic Docs - Errors & needed improvements to the man

Post by luis »

PB4.50

Structures

"ClearStructure can be used to clear a structured memory area. It's for advanced use only, when pointers are involved."

probably would be better this way:

"ClearStructure can be used to clear a structured memory area. It's for advanced use only, when dynamically allocated structures are involved and it's not intended to be used on a normal structured variable."

see this thread for more info: http://www.purebasic.fr/english/viewtop ... 13&t=41702

and the relative example under

Compiler Functions

The ClearStructure() example should probably use ClearStructure() on a dynamically allocated structure.

something like this:

Code: Select all

Structure People
    Name$
    LastName$
    Age.l
EndStructure

*Student.People = AllocateMemory(SizeOf(People))

*Student\Name$ = "Paul"
*Student\LastName$ = "Morito"
*Student\Age = 10
  
ClearStructure(*Student, People) ; this is needed to release the strings
  
; Will print empty strings as the whole structure has been cleared. All other fields have been resetted to zero.

Debug *Student\Name$
Debug *Student\LastName$
Debug *Student\Age

FreeMemory(*Student) ; now is safe to release the memory
instead of the current

Code: Select all

  Structure People
    Name$
    LastName$
    Age.l
  EndStructure

  Student.People\Name$ = "Paul"
  Student\LastName$ = "Morito"
  Student\Age = 10
  
  ClearStructure(@Student, People)
  
  ; Will print empty strings as the whole structure has been cleared. All other fields have been resetted to zero.
  ;
  Debug Student\Name$
  Debug Student\LastName$
  Debug Student\Age
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Demivec »

The manual's explanation for the Bitwise Not operator '~' includes the example code:

Code: Select all

; Shown using binary numbers as it will be easier to see the result
a.w = ~%1000 ; Result will be %0111
b.w = ~%1010 ; Result will be %0101
The commented results are wrong. They will be %1111111111110111 for a.w and %1111111111110101 for b.w . :D

Clearer demonstration code should be provide or the comments corrected.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Vera »

Demivec wrote:None of the commands in the LinkedList library (i.e. AddElement(), SwapElements(), etc.) are brought up when pressing F1 in the IDE.
The help file displays "This program cannot display the webpage" instead.
The help file does contain the information, it just isn't available using F1 from the IDE so I might need to post this in the Bug section instead. Please let me know.
I've cross-checked the helps with PB 4.41. The current help popsup correct with the former version and the old help neither with PB 4.50 so it should be a bug within the IDE.
If that's evident enough to report, please do so.

greetings ~ Vera
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Demivec »

Vera wrote:
Demivec wrote:None of the commands in the LinkedList library (i.e. AddElement(), SwapElements(), etc.) are brought up when pressing F1 in the IDE.
The help file displays "This program cannot display the webpage" instead.
The help file does contain the information, it just isn't available using F1 from the IDE so I might need to post this in the Bug section instead. Please let me know.
I've cross-checked the helps with PB 4.41. The current help popsup correct with the former version and the old help neither with PB 4.50 so it should be a bug within the IDE.
If that's evident enough to report, please do so.
@Vera: Thankyou for your response I've reported it in thread http://www.purebasic.fr/english/viewtopic.php?f=4&t=42616
User avatar
HwyStar
Enthusiast
Enthusiast
Posts: 101
Joined: Mon Apr 05, 2010 7:13 pm
Location: Reno, Nevada

Re: PureBasic Docs - Errors & needed improvements to the man

Post by HwyStar »

The help text is lacking when it talks about "CatchImage", "DataSections" and "IncludeBinary"...

Modify the "CatchImage" help text code with something like this to help us understand several concepts that the above commands support:

Code: Select all

If OpenWindow(0, 0, 0, 500, 400, "Embed Icon", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  TrayIcon = CatchImage(1, ?Icon)
  Tray = AddSysTrayIcon(2, WindowID(0), TrayIcon)
  SysTrayIconToolTip(2, "Embedded Icon Example")

  Quit = #False
  Repeat
    Event = WaitWindowEvent()
    Select event
    Case #PB_Event_CloseWindow
      RemoveSysTrayIcon(2)
      Quit = #True
    EndSelect
  Until Quit = #True
  CloseWindow(0)
EndIf

;Embed Tray Icon into exe using DataSection
DataSection
Icon: 
  IncludeBinary "c:\Images\MyIcon.ico" ;Change This!
EndDataSection 
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Foz »

Windows 4.50: Pressing F1 on ChangeCurrentElement results in "This program cannot display the webpage" in the Help window.

Clicking through from the reference library works just fine.

*** edit: SelectElement does the same as well.
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: PureBasic Docs - Errors & needed improvements to the man

Post by jamirokwai »

Hi Andre,

in the English manual: The text #PB_Date_CheckBox in the 3rd paragraph of Description should be red.
Would be great to have plateform-dependant information in bold fonttype - e.g. DateGadget #PB_Date_UpDown only supported on Windows.
Regards,
JamiroKwai
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Comtois »

Mod() is not in the doc
Please correct my english
http://purebasic.developpez.com/
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Vera »

moved posting
Michael Vogel wrote:Just found one (small) problem, but maybe some more could be added to this thread :wink:

PB4.50 German
• Page "Anpassen der IDE": pictures missing below "Editor - Einrückung" and "Compiler"
:)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: PureBasic Docs - Errors & needed improvements to the man

Post by PB »

The manual for MovieStatus() says:
Note: Be careful with this function when using sounds (e.g. MP3) as no pictures (frames) exist.
This warning now seems to be obsolete, because MovieStatus() works
for MP3s and returns 0 when the MP3 has finished playing. See here:

http://www.purebasic.fr/english/viewtop ... 13&t=32020
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Vera »

Font.pb - example is 'corrupt'

since PB 4.41 the DrawText doesn't show anymore because for StartDrawing() the front color has been set to white and transparent mode is turned on.

So a white background color parameter for the BOX is obsolete (except to overwrite the default black background of all objects)

Now - any object is white => the box-area is white , => the text is white while his background is removed

Quickest solution : remove the transparent mode or (nicer) change the box color

greetings ~ Vera
Locked