Documentation problems

Report any Hollywood bugs here
User avatar
airsoftsoftwair
Posts: 4667
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Documentation problems

Post by airsoftsoftwair »

Code: Select all

- Fix [Doc]: Rnd() and RndF() were both documented as being inclusive whereas they were exclusive in
  reality; for RndF() the documentation was wrong since Hollywood 1.5, for Rnd() only Hollywood 7.1's
  manual was wrong

User avatar
Clyde
Posts: 335
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Documentation problems

Post by Clyde »

The object that is passed to the event handler callback function which is called when creating a layer button contains a property called "layername", which is not documented in the MakeButton section of the documentation:

Code: Select all

Function _handleMouseClickEvents(msg)
    DebugPrint("msg.id", msg.id)
    DebugPrint("msg.layername", msg.layername) ; this is not documented
    ; ...
EndFunction

mouseEventTable = {OnMouseUp = handleMouseClickEvents, OnMouseDown = handleMouseClickEvents}

MakeButton(Nil, #LAYERBUTTON, layername, True, True, mouseEventTable)
Currently using: Hollywood 9 with Windows IDE and Hollywood 8 with Visual Studio Code and hw4vsc

User avatar
airsoftsoftwair
Posts: 4667
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Documentation problems

Post by airsoftsoftwair »

Good spot! Seems to have been added in Hollywood 4.5 but never documented... fixed now.

Code: Select all

- Fix [Doc]: MakeButton() didn't mention that buttons of type #LAYERBUTTON would receive two additional
  message parameters named "Layer" and "LayerName" since Hollywood 4.5

User avatar
Juan Carlos
Posts: 722
Joined: Mon Sep 06, 2010 1:02 pm

Re: Documentation problems

Post by Juan Carlos »

With RndStrong also there is a problem with the documentation because the example:
num=RndStrong(49) show this Error in line: Not enough arguments!
When the correct is
num=RndStrong(#INTEGER, 49)

Other question is with paramater #STRING it creates a non sense characters code like this:
Òðx¨0ÆPXˆ’du¤EڈBåk+Ú!UîmnR:˜Ö‘º¢†§¿JdC³Œ—9
What is something like this for? :?:

User avatar
lazi
Posts: 587
Joined: Thu Feb 24, 2011 11:08 pm

Re: Documentation problems

Post by lazi »

DisplayBGPicPart() doc has an example which has old (pre 1.5) syntax and it fails in new versions.
The optional dx, dy parameters missing before the table.

Code: Select all

        width = GetAttribute(#DISPLAY, 0, #ATTRWIDTH)
        height = GetAttribute(#DISPLAY, 0, #ATTRHEIGHT)
        id = GetAttribute(#DISPLAY, 0, #ATTRBGPIC)
        CreateBrush(1, width, height)
        SelectBrush(1)
        DisplayBGPicPart(id, 0, 0, width, height, {Layers = TRUE})
        EndSelect
The correct would be:

Code: Select all

        width = GetAttribute(#DISPLAY, 0, #ATTRWIDTH)
        height = GetAttribute(#DISPLAY, 0, #ATTRHEIGHT)
        id = GetAttribute(#DISPLAY, 0, #ATTRBGPIC)
        CreateBrush(1, width, height)
        SelectBrush(1)
        DisplayBGPicPart(id, 0, 0, width, height, 0, 0, {Layers = TRUE})
        EndSelect
Is there a way to use the table without repeating x and y in this case?

User avatar
airsoftsoftwair
Posts: 4667
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Documentation problems

Post by airsoftsoftwair »

Juan Carlos wrote:
Sat Nov 21, 2020 8:10 pm
With RndStrong also there is a problem with the documentation because the example:
num=RndStrong(49) show this Error in line: Not enough arguments!
When the correct is
num=RndStrong(#INTEGER, 49)
Right, fixed.
Juan Carlos wrote:
Sat Nov 21, 2020 8:10 pm
Other question is with paramater #STRING it creates a non sense characters code like this:
Òðx¨0ÆPXˆ’du¤EڈBåk+Ú!UîmnR:˜Ö‘º¢†§¿JdC³Œ—9
What is something like this for? :?:
This is just a sequence of random bytes. Hollywood strings can contain binary data and this is what you get from RndStrong() with type #STRING. A sequence of strong random bytes.
lazi wrote:
Sun May 23, 2021 8:31 pm
DisplayBGPicPart() doc has an example which has old (pre 1.5) syntax and it fails in new versions.
The optional dx, dy parameters missing before the table.
True, fixed.
lazi wrote:
Sun May 23, 2021 8:31 pm
Is there a way to use the table without repeating x and y in this case?
No, the table must be in argument 8.

Post Reply