Page 1 of 4

Droopy's Lib

Posted: Mon Aug 18, 2008 2:15 pm
by lexvictory
Topic for bugs, feedback or discussion on Droopy's Lib.
Old thread was too disorganised

If reporting a bug please state version of Droopy's Lib, PB version, and the exact error messages you are receiving.

Posted: Mon Aug 18, 2008 3:37 pm
by chi
hi, thanks for keeping droopy´s lib alive...

a libfunction that never worked correctly :

Code: Select all

test=ChangeDisplaySettings(1024,768,16,70,0)
Select test
  Case #DISP_CHANGE_SUCCESSFUL; The settings change was successful.
    Debug 0
  Case #DISP_CHANGE_RESTART ; The computer must be restarted in order for the graphics mode to work.
    Debug 1
  Case #DISP_CHANGE_BADFLAGS ; An invalid set of flags was passed in.
    Debug -4
  Case #DISP_CHANGE_FAILED ; The display driver failed the specified graphics mode.
    Debug -1
  Case #DISP_CHANGE_BADMODE ; The graphics mode is not supported.
    Debug -2
  Case #DISP_CHANGE_NOTUPDATED ; Windows NT only: Unable to write settings to the registry.
    Debug -3
EndSelect
MessageRequester("Change Display Settings","OK to Restore")
if i run this code it switches to 1024x768, 16bit ,60Hz. seems like it ignores
totaly the choosen Hz frequency...

tested with pb 4.20 and Droopy's Lib 1.31.13 and still don´t work :?

would be nice if you could fix that function!! thx, chi

Posted: Sun Aug 24, 2008 6:48 pm
by SFSxOI

Code: Select all

GetFileVersion(File,#GFVI_CompanyName,#True)) 
Does not seem to work. Error for ,#GFVI_CompanyName, doesn't seem defined.

Posted: Sun Aug 24, 2008 7:37 pm
by chi
@SFSxOI:

Code: Select all

#GFVI_FileVersion      = $0001
#GFVI_FileDescription  = $0002
#GFVI_LegalCopyright   = $0004
#GFVI_InternalName     = $0008
#GFVI_OriginalFilename = $0010
#GFVI_ProductName      = $0020
#GFVI_ProductVersion   = $0040
#GFVI_CompanyName      = $0080
#GFVI_LegalTrademarks  = $0100
#GFVI_SpecialBuild     = $0200
#GFVI_PrivateBuild     = $0400
#GFVI_Comments         = $0800
#GFVI_Language         = $1000
#GFVI_All              = $1FFF

File.s = "c:\windows\regedit.exe"
MessageRequester(GetFilePart(File)+" (with FieldName)",GetFileVersion(File,#GFVI_All,#True))
here you can find the updated version of the author... ( 14.06.08 )
http://www.purebasic.fr/english/viewtop ... 9022cdd9ac

cheers, chi

Posted: Mon Aug 25, 2008 6:41 pm
by SFSxOI
well...DuH!

Thanks chi :)

Posted: Sat Aug 30, 2008 7:35 pm
by byo
About those errors in the last version, were they fixed? I mean there were some commands which had some issues with Tailbite.

Keep up the good work. 8)

Posted: Sun Aug 31, 2008 2:18 am
by SFSxOI
The help file for the lib, for Odd(Number.l) says that it returns 1 if the number is odd.

Code: Select all

Example from the help file:

x=2
Debug Odd(x)

2 is even but the function returns 1 which according to the help file means its odd which it isn't.

The help file for the lib, for Even(Number.l) says that it returns 1 if the number is even.

Code: Select all

Example from the help file:

x=2
Debug Even(x)

2 is even but the function returns 0 which according to the help file means its not even but 2 is an even number.
Looks like either the help is mixed up or the functions are swapped.

The example in the help file for FlashWindow is wrong:

Code: Select all

It shows this:

hWnd=OpenWindow(0,0,0,640,480,#PB_Window_ScreenCentered, ,"FlashWindow")
FlashWindow(hWnd,500,10)

It should be this:

hWnd=OpenWindow(0,0,0,640,480,,"FlashWindow", #PB_Window_ScreenCentered")
FlashWindow(hWnd,500,10)

Posted: Sun Aug 31, 2008 3:48 am
by lexvictory
byo wrote:About those errors in the last version, were they fixed? I mean there were some commands which had some issues with Tailbite.
which ones?


@SFSxOI: fixed for next version
it seems to have been a lost in translation issue. when i corrected the help file for the PB3.94 1.31 version, I changed based on the function name, when the inverse was the case. Now the functions return 1 based on the function name.

Posted: Sun Aug 31, 2008 7:53 pm
by byo
I don't remember which ones but I remember the Printer commands at least. With the source code the problem was solved. It's in the other Droopy's lib thread, I guess.

Posted: Sun Aug 31, 2008 9:01 pm
by byo
Ah, I remember now. This is gonna cause an invalid memory access:

Code: Select all

Define.s printer

Repeat
	printer = PrinterEnum()
	Debug printer
Until printer = ""

Posted: Mon Sep 01, 2008 12:18 am
by chi
i´ll get an ima-error with following code from the helpfile...

Code: Select all

UseJPEGImageDecoder() ; Needed with a jpeg logo 
IconId=ExtractIcon_(0,"c:\windows\system32\shell32.dll",130) 
LogoId=LoadImage(0,"Logo.jpg") 
SubText.s="²This is an AboutBox created using²" 
SubText+"the Droopy Lib 1.31." 
SubText+"²²Visit PureBasic Homepage (www.PureBasic.com)" 
SubText+"²²Droopy : December 2005" 
AboutBox(IconId,LogoId,"AboutBox","Example of AboutBox",SubText)

Posted: Mon Sep 01, 2008 9:37 am
by lexvictory
@byo: the error remains due to a tailbite error if i recall correctly. I'm not sure if I will be able to fix it, but I'll have a look at it.

@chi: I will look into it, I get the same error

Posted: Mon Sep 01, 2008 1:23 pm
by SFSxOI
In regards to byo's post;

Code: Select all

AboutBox(IconId,LogoId,"AboutBox","Example of AboutBox",SubText)
can you change the AboutBox in such a way as IconId and LogoId can be #Null ?

Posted: Mon Sep 01, 2008 1:29 pm
by lexvictory
SFSxOI wrote:can you change the AboutBox in such a way as IconId and LogoId can be #Null ?
I'll look into it when I get a moment, although I think that it uses the LogoId to calculate the size of the box or something....

Posted: Sun Sep 21, 2008 12:31 pm
by lexvictory
For those using 4.30 Beta(s):

grab droopy.pb from <PB4.20 directory>\droopys lib\ (or from the download for PB4.20 or SVN), put it somewhere accessible, then use

Code: Select all

IncludeFile "path\to\droopy.pb"
it should then work as normal :)

I have decided there is too much work to compile for every beta at this point in time (you might notice there was only 1 release for 4.20 beta :)).
This is due to constraints on free time.