Droopy's Lib

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Droopy's Lib

Post 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.
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Post 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
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Code: Select all

GetFileVersion(File,#GFVI_CompanyName,#True)) 
Does not seem to work. Error for ,#GFVI_CompanyName, doesn't seem defined.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Post 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
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

well...DuH!

Thanks chi :)
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post 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)
Proud registered Purebasic user.
Because programming should be fun.
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post 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)
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post 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.
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post 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.
Proud registered Purebasic user.
Because programming should be fun.
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post 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 = ""
Proud registered Purebasic user.
Because programming should be fun.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Post 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)
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post 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
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post 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 ?
Last edited by SFSxOI on Mon Sep 01, 2008 11:34 pm, edited 1 time in total.
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post 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....
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post 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.
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
Post Reply