Page 2 of 3

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 5:33 pm
by GeBonet
Ok, understand...
but you say "PB Doc for AddMapElement wrote... " Where you find the PB Doc :)
I have just the "Survival Guide" and some sample from the "v440_examples"
Many Thanks for all...

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 5:38 pm
by Kaeru Gaman
GeBonet wrote:Where you find the PB Doc
press [F1]

or look here: http://www.purebasic.com/documentation/index.html
... but the online doc maybe not yet updated...

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 5:52 pm
by USCode
Fred wrote:We updated third part libs as well, so if you use SQLite, RegExp, etc. it could explain that.
I noticed that the SQLite lib is at 3.6.14.2 but there have been 4 releases since then, with the latest release (just released Sept 11) at 3.6.18.
Can you update the SQLite lib for PB 4.40 to 3.6.18 please ???
Thanks Fred!

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 6:56 pm
by Little John
netmaestro wrote:Lovely! Lots of docs for the new stuff and optional number-of-slots parameter is added for the NewMap command. Thanks for this 8)
PB doc for NewMap wrote: NewMap Cars.Car()
;
Cars("Ferrari F40")\Weight = 1000
Cars()\Speed = 320
Cars()\Price = 500000

Cars("Lamborghini Gallardo")\Weight = 1200
Cars()\Speed = 340
Cars()\Price = 700000
PureBasic must be selling well, somebody's been looking at catalogues... :wink:
Uuuh, there is a severe bug: Porsche is missing on that map! :lol:
The new release rocks! Thanks a lot to the PB team.

Regards, Little John

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 7:03 pm
by GeBonet
Kaeru Gaman wrote:
GeBonet wrote:Where you find the PB Doc
press [F1]
or look here: http://www.purebasic.com/documentation/index.html
... but the online doc maybe not yet updated...
Normaly, you are right and from many year... But With the news version a Doc it's not update...
Search with [F1] or somthing other for "AddMapElement(Map(), Key$ [, Flags])" or "NewMap" etc... :(

I tried this new thing, and it simply can [Flag] that I know and my NetMaestro a dimly lit ...
In any case, Thanks :D

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 8:40 pm
by Flype
Thank you very much for all the efforts you made since the beginning.
I will test this new beta with quite big programs right now.

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 8:50 pm
by blueznl
I pretty much skipped 4.40b2 but I'll try this one a bit more extensively...

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 9:27 pm
by Flype
blueznl wrote:I pretty much skipped 4.40b2 but I'll try this one a bit more extensively...
@pbteam
you might have to prepare a Beta4 :lol:

Quizz :
what was the max betas record in the past ?

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 9:36 pm
by adshead
Thought I'd just posted this message but didn't seem to appear so here it is again...

I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 9:42 pm
by Flype
adshead wrote:Thought I'd just posted this message but didn't seem to appear so here it is again...

I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small
Can't you zoom the text using CTRL + MOUSE WHEEL ?
As PB use Scintilla, isn't it a buitin feature on Mac ?

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 9:48 pm
by netmaestro
Flype wrote:Quizz :
what was the max betas record in the past ?
I think it's 14 for PureBasic 4.0... might only be 13, not 100% sure. But it's at least 13.

Re: PureBasic 4.40 Beta 3 released

Posted: Wed Sep 16, 2009 10:42 pm
by Kale
adshead wrote:Thought I'd just posted this message but didn't seem to appear so here it is again...

I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small
Why is this still NOT done!?!?!?! It's been posted time after time!!!! I really does irk me, because i use PB on my Mac and the font is awful!

Re: PureBasic 4.40 Beta 3 released

Posted: Thu Sep 17, 2009 12:51 am
by GeBonet
netmaestro wrote:
PB Doc for AddMapElement wrote:'Flags' is an optional parameter which can be one of the following value:
#PB_Map_ElementCheck : Checks if an element with a same key already exists, and replaces it (default).
#PB_Map_NoElementCheck: No element check, so if a previous element with the same key was already present, it will be lost and couldn't be accessed anymore. Its memory will be only released if ClearMap() is used.
...but they don't seem to be actually included yet :? I would guess that elementcheck is 0 as it's the default, and noelementcheck 1. I tested it and it seems right, but I wouldn't take my word for anything.
With this version... I have found only for 'Flags' "#PB_Map" with for value #PB_Map=9, but not what for ? :?:
It's not very important... Just wait for :D

Here one little code issue from V440Exemple with various form to use the Map... With Array to !

Code: Select all

; -------------------------------------------------------------------------------------------------------
;                Map exemple   Single Key$ :  ou Table avec clef d'accès unique...
; ---------------------------------------------------------------------------------------------------------------
;
;  Commandes disponibles :
;
; AddMapElement(Map(), Key$ [, Flags])   - Ajoute un nouvel element vide dans la "map".
; ClearMap(Map())                                   - Efface tout les elements dans la "map" et libère la mémoire.
; FindMapElement(Map(), Key$)               - Cherche l'element spécifié dans la "map".
; DeleteMapElement(Map() [, Key$])        - Enlève l'élément en cours de la "map" .
; MapKey(Map())                                     - Renvois la Clef de l'element courant de la map.
; MapSize(Map())                                    - Rendvois le nombre d'éléments contenu dans la "map".
; NextMapElement(Map())                        - Deplace l'élement courent vers le suivant dans la "map".
; ResetMap(Map())                                  - Deplace le pointeur en tête de la "map"
;
; Map()                                                  - Accéde à l'élement courant dans la "map"; access the current element in the map
; Map("key")                                           - Accéde à l'élément correspondant à la clef et il devient l'élement courant 
;                                                           
; -----------------------------------------------------------------------------------------------------------------------  
; Une table de hachage est une Structure de données qui permet une association clé-élément. 
; ==================================================================      
;   Autre Exemple / Other sample  :                                                                                                    
; ==================================================================   
    
    NewMap Test.s()   ; Table indexé selon le Hascode Sur la Clef .....                                            
    Dim T$(6)              ; Table qui contientdrait les clefs.... indépendament de  Test.s()                
    ;                                                                                                                                       
    ;                                                    Ordre de création ....                                                               
        T$(1)="Fred"      :Test(T$(1)) = "1 - Any sentence that contains all the desired item"
        T$(2)="Timo"     :Test(T$(2)) = "2- Is two or 2"
        T$(3)="Albert"    :Test(T$(3)) = "3- And this is the additional writing"
        T$(4)="Joseph" :Test(T$(4)) = "4- c'est une série B"
        T$(5)="Dorothe":Test(T$(5)) = "5- It's not a joke but not serious"


    T$(1)="Fred"      :Test(T$(1)) = "1 - Any sentence that contains all the desired item"
    T$(2)="Timo"     :Test(T$(2)) = "2- est deux ou écrit 2"
    T$(3)="Albert"    :Test(T$(3)) = "3- And this is the additional writing"
    T$(4)="Joseph" :Test(T$(4)) = "4- It's some picture 'B' serie"
    T$(5)="Dorothe":Test(T$(5)) = "5- It's not a joke but not serious"
    T$(6)="Roberto":Test(T$(6)) = "6- Eu acho que o pais de você e o Brasil ?"
    
    AddMapElement(Test(), "Gerhard", #PB_Map) ; - Addjoute un nouvel element vide dans la "Map".
    ;
    ;--------------------------------------------------------
    Debug " == Organisation de la table selon le Hash coding de Map ==="
    ResetMap(Test())                        ;  Move to the begin of the Map - Deplace le pointeur en tête de la "map"
    While NextMapElement(Test())
        Debug Str(l+1)+" - "+Test()      ; Here is the order of the map....  Ici l'ordre dans la table 
        l+1
    Wend
    l=0
    Debug "====================================================="   
    Debug " Ordre selon l'appel par les clefs... donc de l'enregistrement correspondant"    
    Debug "-----------------------------------------------------------------------------------------------"
    ;--------------------------------------------------------------------------------------------------------------------    
    ;  Ordre d'extraction par appel en utilisant la clef    / Calling Forme 
    ;-------------------------------------------------------------------------------------------------------------------- 
    ;  1 on appelle la première clef du de T$(1) --- Various Calling form ! 
    FindMapElement(Test.s(), "Fred")
        Debug "Fred="+Test.s()
    
    ;  2  on appelle la quatrième clef de T$(4)
    FindMapElement(Test.s(), "Joseph")
        Debug "Joseph"+"="+Test.s()
    
    ;   3 on appelle la cinquième clef de T$(5)
    FindMapElement(Test.s(), "Dorothe")
        Debug "Dorothe"+"="+Test.s()
    
    ;  4  on appelle la cinquième clef de T$(2)
    B$="Timo"
    FindMapElement(Test.s(), B$)
        Debug B$+"="+Test.s()
    
    ; 5  on appelle la cinquième clef de T$(3) ="Albert"
    ;           
    FindMapElement(Test.s(), T$(3))
        Debug B$+"="+Test.s()
        
    ; ----------------------------------------------------------------------------------------------    
    Debug "===== Numero element ======="
    Debug "Donné par MapSize()="+Str(MapSize(Test()))
    Debug "========================="        
    ; ---------------------------------------------------------------------------------------------- 
    ResetMap(Test())                        ;  Move to the begin of the Map - Deplace le pointeur en tête de la "map"
    
    While NextMapElement(Test())
        Debug Str(l+1)+" - "+Test()    ; Here is the order of the map....  Ici l'ordre dans la table 
        l+1
    Wend
    
    Debug "======================="   
    Debug " classement par ordre des clefs"
    Debug "-------------------------------------------------"
    ;                                            OR 
    ResetMap(Test())                        ;  Move to the begin of the Map - Deplace le pointeur en tête de la "map"
    For i=1 To 6
        Debug Str(i)+" - "+Test(T$(i)) ; Here is we find with the key.... geved from the array T$(i)...  recupère par la clef... 
    Next i        
    ; ------------------------ Other form to call -------------------
    Debug "--------------- Autre forme d'utilisation de Map -----------------"
    ;
    FindMapElement(Test.s(),InputRequester("Recherche","Donnez la clef d'accès : ", Clef$))
    MessageRequester("Votre réponse est : ",Test.s(),#PB_MessageRequester_Ok  )
    ;
    Debug Test.s()
    Debug "---------------- FIN ---- END -------------"
    ;
    ClearMap(Test.s()) 
    
End
; ===================================================
;    Simplified form using the features "MAP"
;                                                                                                   GeBonet
; ===================================================
; If you have ....
;
        NewMap Test.s() ;
        Dim T$(5)              ; Array with somme name or other thiing.... Here name.
        ;                           
        ;                               Buld of the Map and array with the key...
        ;
        T$(1)="Fred"      :Test(T$(1)) = "1 - Any sentence that contains all the desired item"
        T$(2)="Timo"     :Test(T$(2)) = "2- Is two or 2"
        T$(3)="Albert"    :Test(T$(3)) = "3-   And this is the additional writing"
        T$(4)="Joseph" :Test(T$(4)) = "4- c'est une série B"
        T$(5)="Dorothe":Test(T$(5)) = "5- It's not a joke but not serious"
        T$(6)="Roberto":Test(T$(6)) = "6- Eu acho que o pais de você e o Brasil ?"
        ; -------------------------------------------------
        ;   A Simple access of this is ...
        ; -------------------------------------------------
        FindMapElement(Test.s(),InputRequester("research","Give the key name : ", Clef$))
        MessageRequester("Your answers is / Votre réponse est : ",Test.s(),#PB_MessageRequester_Ok  )
        ;
        End

Re: PureBasic 4.40 Beta 3 released

Posted: Thu Sep 17, 2009 1:30 am
by freak
Kale wrote:
adshead wrote:Thought I'd just posted this message but didn't seem to appear so here it is again...

I still can't change the font size on the Mac version - makes the product unusable in my opinion as the font is just too small
Why is this still NOT done!?!?!?! It's been posted time after time!!!! I really does irk me, because i use PB on my Mac and the font is awful!
Maybe because it is not as simple as you think ?

Re: PureBasic 4.40 Beta 3 released

Posted: Thu Sep 17, 2009 6:26 am
by Azul
Thanks :)