FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Gestion d'un système client-serveur.
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar Klaus Ven 17 Mai 2024 - 14:02

» item_index(résolu)
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar jjn4 Mar 14 Mai 2024 - 19:38

» Bataille terrestre
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar jjn4 Lun 13 Mai 2024 - 15:01

» SineCube
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar Marc Sam 11 Mai 2024 - 12:38

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar Marc Sam 11 Mai 2024 - 12:22

» Philharmusique
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar jjn4 Ven 10 Mai 2024 - 13:58

» PANORAMIC V 1
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar papydall Jeu 9 Mai 2024 - 3:22

» select intégrés [résolu]
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0(résolu)
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar Klaus Lun 6 Mai 2024 - 11:41

» @Jack
Nouvel  AU SECOURS KLAUS !!! - Page 2 Emptypar Jack Mar 30 Avr 2024 - 20:40

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le deal à ne pas rater :
Cartes Pokémon : la prochaine extension Pokémon sera EV6.5 Fable ...
Voir le deal

 

 Nouvel AU SECOURS KLAUS !!!

Aller en bas 
2 participants
Aller à la page : Précédent  1, 2
AuteurMessage
Yannick




Nombre de messages : 8611
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Nouvel  AU SECOURS KLAUS !!! - Page 2 Empty
MessageSujet: re   Nouvel  AU SECOURS KLAUS !!! - Page 2 EmptyLun 15 Avr 2013 - 1:25

Un état de l' avancée de ma progression avec BDR.
Code:
' ____________________________________________________________________CONSTANTES
Dim dll$ : dll$ = "BDR.dll": dll_on dll$
Dim path$: path$= dir_current$+"\"
Dim bdr$ : bdr$ = path$+"Chevaux.nam"
Dim syst1$ : syst1$ = "Cheval_est_soigné_par"
Dim syst2$ : syst2$ = "Cheval_est_stationné_à"
Dim Cheval$: Cheval$= "Cheval_"
Dim Lad$  : Lad$  = "Lads_"
Dim Site$  : Site$  = "Sites_"
' _____________________________________________________________________VARIABLES
Dim Clic%

' ______________________________________________________________EVENEMENTS CLICK
Label Clic,Close

' __________________________________________________________________________MAIN
Interface()
Init()
On_close 0,close
end

' _______________________________________________________________INITIALISATIONS
Sub Init()
  Dim_Local i%
  BDRstatus()
  if BDRstatus=1 then BDRclose()
  BDRopen(bdr$)
  caption 0,"Contacts avec BDR - ["+file_extract_name$(bdr$)+"]"
  BDRlistallentities(39)
  if BDRlistallentities=0
    BDRadd(syst1$,"")
    BDRadd(syst2$,"")
    BDRadd(Cheval$,"")
    BDRadd(Lad$,"")
    BDRadd(Site$,"")
  else
    afficher_effectif()
  end_if
End_Sub

' _____________________________________________________________________INTERFACE
Sub Interface()
  O_Form(0,0,1,0,0,350,500,""):font_name 0,"arial"
  O_Main_Menu(1,0)
  O_Sub_Menu(2,1,"View",1,1)
  O_Sub_Menu(3,1,"Add",1,1)
  O_Sub_Menu(4,1,"Modify",1,1)
  O_Sub_Menu(5,1,"Remove",1,1)
  O_Sub_Menu(44,1,"Etat",1,1)
  O_List(6,0,1,0,0,height(0)-58,180,"",1)
'  Container View---------------------------------------------------------------
  O_Container(7,0,0,0,185,height(0)-63,Width(0)-206,"  View  ")
  font_color 7,255,0,0
  O_Alpha(8,7,1,25,10,0,0,"Nom du cheval"):font_color 8,0,0,0
  O_Edit(9,7,1,40,10,0,160,"",0):font_color 9,0,0,0:text 9,""
  O_Alpha(10,7,1,65,10,0,0,"Lad"):font_color 10,0,0,0
  O_Edit(11,7,1,80,10,0,0,"",0):font_color 11,0,0,0 :text 11,""
  O_Alpha(12,7,1,105,10,0,0,"Stationnement"):font_color 12,0,0,0
  O_Edit(13,7,1,120,10,0,0,"",0):font_color 13,0,0,0:text 13,""
  O_Button(35,7,0,height(7)-28,215,0,0,"",1)
'  Container Add----------------------------------------------------------------
  O_Container(14,0,0,0,185,height(0)-63,Width(0)-206,"  Add  ")
  font_color 14,255,0,0
  O_Alpha(15,14,1,25,10,0,0,"Nom du cheval"):font_color 15,0,0,0
  O_Edit(16,14,1,40,10,0,160,"",0):font_color 16,0,0,0
  O_Alpha(17,14,1,65,10,0,0,"Lad"):font_color 17,0,0,0
  O_Combo(18,14,1,80,10,0,0,"",0):font_color 18,0,0,0
  O_Alpha(19,14,1,105,10,0,0,"Stationnement"):font_color 19,0,0,0
  O_Combo(20,14,1,120,10,0,0,"",0):font_color 20,0,0,0
  O_Button(36,14,1,height(14)-28,215,0,0,"Add",1)
  O_Button(42,14,1,top(18),160,21,21,"+",1):font_bold 42
  O_Button(43,14,1,top(20),160,21,21,"+",1):font_bold 43
'  Container Modify-------------------------------------------------------------
  O_Container(21,0,0,0,185,height(0)-63,Width(0)-206,"  Modify  ")
  font_color 21,255,0,0
  O_Alpha(22,21,1,25,10,0,0,"Nom du cheval"):font_color 22,0,0,0
  O_Edit(23,21,1,40,10,0,160,"",0):font_color 23,0,0,0
  O_Alpha(24,21,1,65,10,0,0,"Lad"):font_color 24,0,0,0
  O_Combo(25,21,1,80,10,0,0,"",0):font_color 25,0,0,0
  O_Alpha(26,21,1,105,10,0,0,"Stationnement"):font_color 26,0,0,0
  O_Combo(27,21,1,120,10,0,0,"",0):font_color 27,0,0,0
  O_Button(37,21,1,height(21)-28,215,0,0,"Modify",1)
'  Container Remove-------------------------------------------------------------
  O_Container(28,0,0,0,185,height(0)-63,Width(0)-206,"  Remove  ")
  font_color 28,255,0,0
  O_Alpha(29,28,1,25,10,0,0,"Nom du cheval"):font_color 29,0,0,0
  O_Edit(30,28,1,40,10,0,160,"",0):font_color 30,0,0,0
  O_Alpha(31,28,1,65,10,0,0,"Lad"):font_color 31,0,0,0
  O_Edit(32,28,1,80,10,0,0,"",0):font_color 32,0,0,0
  O_Alpha(33,28,1,105,10,0,0,"Stationnement"):font_color 33,0,0,0
  O_Edit(34,28,1,120,10,0,0,"",0):font_color 34,0,0,0
  O_Button(38,28,1,height(28)-28,215,0,0,"Remove",1)
'  Objets invisibles------------------------------------------------------------
  O_Memo(39,0,0,0,0,500,500,"") :' memo chevaux
  O_Memo(40,0,0,0,0,500,500,"") :' memo lads
  O_Memo(41,0,0,0,0,500,500,"") :' memo sites
End_Sub

' __________________________________________________________________________MENU
Clic:
  Clic%=Number_Click
  Select Clic%
  case 2  :Init_vue(7)
  case 3  :Init_vue(14):Affiche_Lads(18):Affiche_sites(20)
  Case 4  :Init_vue(21):Affiche_Lads(25):Affiche_sites(27)
  case 5  :Init_vue(28)
  Case 6  :Sel(item_index$(6))
  case 35
  case 36 :AddHorse()
  case 37 :ModifyHorse()
  case 38 :RemoveHorse()
  case 42 :NewLad()
  case 43 :NewSite()
  case 44 :Etat()
  End_Select
return

' ___________________________________________________________AFFICHAGE DE LA VUE
Sub Init_vue(C%)
  Dim_Local x%
  for x%=7 to 28 step 7:hide x%:inactive 6:next x%
  show c%
  if c%=7 or c%=21 or c%=28
      active 6
  end_if
End_Sub

' _________________________________________________AJOUT DE LA FICHE D UN CHEVAL
Sub AddHorse()
  Dim_Local s$,d$
  BDRstatus()
  if BDRstatus=0
      message "La BDR n'est pas ouverte"
      exit_sub
  end_if
  s$ = trim$(text$(16))
  if s$=""
      message "Le nom est obligatoire"
      exit_sub
  end_if
  BDRfindname(s$)
  if BDRfindname=BDR_ERROR_missing
      d$ = trim$(text$(18))+"²"+trim$(text$(20))
      BDRadd(s$,d$)
      BDRsetelement(s$,Cheval$)
      afficher_effectif()
  else
      message "Ce cheval est déjà enregistré !"
      exit_sub
  end_if
End_Sub

' __________________________________________MODIFICATION DE LA FICHE D UN CHEVAL
Sub ModifyHorse()
  Dim_Local s$,d$
  BDRstatus()
  if BDRstatus=0
      message "La BDR n'est pas ouverte"
      exit_sub
  end_if
  s$ = trim$(text$(16))
  if s$=""
      message "Le nom est obligatoire"
      exit_sub
  end_if
  BDRfindname(s$)
  if BDRfindname=BDR_ERROR_missing
    message "Ce cheval n'est pas enregistré !"
    exit_sub
'  partie inutile puisque le nom est récupéré dans la liste
  else
    d$ = trim$(text$(25))+"²"+trim$(text$(27))
    BDRreplaceref(BDRfindname,d$)
    message "Les données ont été remplacées"
  end_if
  return
End_Sub

' ___________________________________________SUPPRESSION DE LA FICHE D UN CHEVAL
Sub RemoveHorse()
  Dim_Local s$
  BDRstatus()
  if BDRstatus=0
    message "La BDR n'est pas ouverte"
    exit_sub
  end_if
  s$ = trim$(text$(30))
  if s$=""
    message "Le nom est obligatoire"
    exit_sub
  end_if
  BDRfindname(s$)
  if BDRfindname=BDR_ERROR_missing
    message "Ce contact n'existe pas"
    exit_sub
  else
    if message_confirmation_yes_no("Voulez-vous vraiment supprimer "+text$(30)+" ?")=1
      BDRdeleteref(BDRfindname)
      message "Cet enregistrement a été supprimé !"
      afficher_effectif()
    end_if
  end_if
  text 30,"" :text 32,"":text 34,""
End_Sub
' _____________________________________________________________________AFFICHAGE
sub afficher_effectif()
  clear 39
  BDRlistset(Cheval$,39)
  file_save 39,"Chevaux.tmp"
  file_load 6,"Chevaux.tmp"
  file_delete "Chevaux.tmp"
end_sub

' _______________________________________________________SELECTION DANS LA LISTE
Sub sel(T$)
  Dim_Local x%,s$,s1$,i% ,no_nom%,no_lad%,no_site%
  for x%=7 to 28 step 7
    if show(x%)=1:no_nom%=x%+2:no_lad%=x%+4:no_site%=x%+6:exit_for:end_if
  next x%

  s$ = T$
  if no_nom%=0 :exit_sub:end_if
  BDRfindname(s$)
  BDRreadref(BDRfindname,3)
  text no_nom%,s$

  i% = instr(BDRreadref$,"²")
  s1$ = left$(BDRreadref$,i%-1)
  BDRreadref$ = mid$(BDRreadref$,i%+1,len(BDRreadref$))
  text no_lad%,s1$

  text no_site%,BDRreadref$

  clear 39
End_Sub

' ________________________________________________________________AJOUT D UN LAD
Sub NewLad()
  Dim_Local s$,x%
  if message_input("Ajouter un lad à la liste","Nom : ","")=1
      BDRstatus()
      if BDRstatus=0 :Exit_sub :message "La BDR n'est pas ouverte":end_if
      s$=Trim$(message_text$)
      if s$="":message "Le nom est obligatoire":exit_sub:end_if
      BDRadd(s$,"")
      BDRsetelement(s$,Lad$)
  end_if
  Affiche_Lads(18)
End_Sub

' ______________________________________________AJOUT D UN SITE DE STATIONNEMENT
Sub NewSite()
  Dim_Local s$,x%
  if message_input("Ajouter un site à la liste","Nom : ","")=1
      BDRstatus()
      if BDRstatus=0 :Exit_sub :message "La BDR n'est pas ouverte":end_if
      s$=Trim$(message_text$)
      if s$="":message "Le nom est obligatoire":exit_sub:end_if
      BDRadd(s$,"")
      BDRsetelement(s$,Site$)
  end_if
  Affiche_sites(20)
End_Sub

' ____________________________________________________________AFFICHAGE DES LADS
Sub Affiche_Lads(No%)
  clear No%
  BDRlistset(Lad$,40)
  file_save 40,"Lads.temp"
  file_load No%,"Lads.temp"
  file_delete "Lads.temp"
End_Sub

' ___________________________________________________________AFFICHAGE DES SITES
Sub Affiche_Sites(No%)
  clear No%
  BDRlistset(Site$,41)
  file_save 41,"Sites.temp"
  file_load No%,"Sites.temp"
  file_delete "Sites.temp"
End_Sub

' ________________________________________________________________AFFICHAGE ETAT
Sub Etat()
  Dim_Local x%,s$
  If Object_exists(100)=0
      O_Form(100,0,1,top(0),left(0)+width(0),550,400,"Etat")
      O_Memo(101,100,1,0,0,height(100)-38,width(100)-16,"")
      font_bold 101:Bar_vertical 101
  Else
      Show 100
      Clear 101
  End_if
  Item_add 101,string$(90,"-")
  Item_add 101,string$((90-4)/2," ")+"Etat"
  Item_add 101,string$(90,"-")
End_sub

' __________________________________________________INSTRUCTIONS AVANT FERMETURE
Close:
  BDRstatus()
  if BDRstatus=1 then BDRclose()
return

' ______________________________________________________________________INCLUDES
' ______________________________________________________________________________
Sub O_Form(No%,P%,V%,T%,L%,H%,W%,C$)
  if No%> 0 then FORM No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 : Top No%,T% : Else : Top No%,(Screen_y-H%)/2 : End_If
  If L% > 0 : Left No%,L%: Else : Left No%,(Screen_x-W%)/2: End_If
  if C$<>"" then Caption No%,C$
End_Sub
' ______________________________________________________________________________
Sub O_Alpha(No%,P%,V%,T%,L%,H%,W%,C$)
  ALPHA No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' ______________________________________________________________________________
Sub O_Edit(No%,P%,V%,T%,L%,H%,W%,T$,Ch%)
  EDIT No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  If T$<>"" Then Text No%,T$
  If Ch%=1  Then On_Change No%,Change
End_Sub
' ______________________________________________________________________________
Sub O_Button(No%,P%,V%,T%,L%,H%,W%,C$,Cl%)
  BUTTON No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
  if Cl%> 0 then on_click No%,Clic
  cursor_point No%
End_Sub
' ______________________________________________________________________________
Sub O_Memo(No%,P%,V%,T%,L%,H%,W%,F$)
  MEMO No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if F$<>""
  if file_exists F$ then file_load No%,F$
  end_if
End_Sub
' ______________________________________________________________________________
Sub O_Combo(No%,P%,V%,T%,L%,H%,W%,F$,Cl%)
  COMBO No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if F$<>""
  if file_exists F$ then file_load No%,F$
  end_if
  if Cl%> 0 then on_click No%,Clic
End_Sub
' ______________________________________________________________________________
Sub O_List(No%,P%,V%,T%,L%,H%,W%,F$,Cl%)
  LIST No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if F$<>""
  if file_exists F$ then file_load No%,F$
  end_if
  if Cl%> 0 then on_click No%,Clic
End_Sub
' ______________________________________________________________________________
Sub O_Picture(No%,P%,V%,T%,L%,H%,W%,P$)
  PICTURE No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if P$<>"" then File_load No%,P$
End_Sub
' ______________________________________________________________________________
Sub O_Main_Menu(No%,P%)
  MAIN_MENU No%
  if P% > 0 then Parent No%,P%
End_Sub
' ______________________________________________________________________________
Sub O_Sub_Menu(No%,P%,C$,Cl%,A%)
  SUB_MENU No%
  if P% > 0 then Parent No%,P%
  if C$<>"" then Caption No%,C$
  If Cl%=1 : on_click No%,Clic  : end_if
  If Cl%=2 : on_click No%,Clic2 : end_if
  If Cl%=3 : on_click No%,Clic3 : end_if
  If Cl%=4 : on_click No%,Clic4 : end_if
  If A%=0 then inactive No%
End_Sub
' ______________________________________________________________________________
Sub O_Open_Dialog(No%,Out%,DD$,Filtre$,O%)
  dim_local F$
  If Object_Exists(No%)=0
      OPEN_DIALOG No%
  End_if
  if DD$<>"" then Dir_Dialog No%,DD$
  if filtre$<>"" then Filter No%,Filtre$
  F$=File_name$(No%)
  if variable("File$")=0:Dim File$:End_If
  if F$<>"_"
      if O%=1 then text out%,F$
      if O%=2 then Caption Out%,F$
      if O%=3 then item_add Out%,F$
      if O%=4 then file_load Out%,F$
      if O%=5 then File$=F$
  end_if
  Delete No%
End_Sub
' ______________________________________________________________________________
Sub O_Progress_Bar(No%,P%,V%,T%,L%,H%,W%)
  PROGRESS_BAR No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' ______________________________________________________________________________
Sub O_Dlist(No%,F$)
  DLIST No%
  if F$<>"" then file_load No%,F$
End_Sub
' ______________________________________________________________________________
Sub O_Timer(No%,OO%,Inter%)
  TIMER No%
  if OO%=1 then timer_on No%
  if OO%=0 then timer_off No%
  if inter%>0 then timer_interval No%,inter%
End_Sub
' ______________________________________________________________________________
Sub O_Container(No%,P%,V%,T%,L%,H%,W%,C$)
  CONTAINER No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' KGF_SUB.bas

' Ce fichier implémente l'accès aux fonctions de BDR.dll sous forme de procédures.
' Il n'y a rien d'autre à insérer dans le programme.

' ############# ici, le #INCLUDE BDR_SUB.bas contenant tout ce qui suit #########
' ===============================================================================
' interface de procédures autour de BDR.dll
' Auteur: Klaus

' =============== dipatching des fonctions ====================================
message "BDR: on ne peut pas executer ce module directement !"
terminate

' *****************************************************************
' wrapper BDR_SUB.bas
' *****************************************************************
'  res% = dll_call1("BDRopen",adr(s$))
sub BDRopen(fic$)
  if variable("BDR_res%")=0
    dim BDR_res%
    if variable("BDR_OK")=0
      dim BDR_OK,BDR_ERROR_syntax,BDR_ERROR_invdir,
      dim BDR_ERROR_open,BDR_ERROR_missing, BDR_ERROR_invnam
      dim BDR_ERROR_double, BDR_ERROR_structure
      BDR_OK =                      0
      BDR_ERROR_syntax =          -1
      BDR_ERROR_invdir =          -2
      BDR_ERROR_open =            -3
      BDR_ERROR_missing =          -4
      BDR_ERROR_invnam =          -5
      BDR_ERROR_double =          -6
      BDR_ERROR_structure =        -7
    end_if
  end_if
  if variable("BDRopen")=0 then dim BDRopen
  BDR_res% = dll_call1("BDRopen",adr(fic$))
  BDRopen = BDR_res%
end_sub

'  res% = dll_call1("BDRfindname",adr(s$))
sub BDRfindname(nom$)
  if variable("BDRfindname")=0 then dim BDRfindname
  BDR_res% = dll_call1("BDRfindname",adr(nom$))
  BDRfindname = BDR_res%
end_sub

' res% = dll_call2("BDRfindid",i%,adr(s1$))
sub BDRfindid(id%)
  if variable("BDRfindid")=0 then dim BDRfindid
  if variable("BDRfindid$")=0 then dim BDRfindid$
  BDRfindid$ = string$(255," ")
  BDR_res% = dll_call2("BDRfindid",id%,adr(BDRfindid$))
  BDRfindid = BDR_res%
  BDRfindid$ = trim$(BDRfindid$)
end_sub

' res% = dll_call2("BDRadd",adr(s$),adr(s1$))
sub BDRadd(nom$,donnee$)
  if variable("BDRadd")=0 then dim BDRadd
  BDR_res% = dll_call2("BDRadd",adr(nom$),adr(donnee$))
  BDRadd = BDR_res%
end_sub

' res% = dll_call0("BDRclose")
sub BDRclose()
  if variable("BDRclose")=0 then dim BDRclose
  BDR_res% = dll_call0("BDRclose")
  BDRclose = BDR_res%
end_sub

' res% = dll_call0("BDRsave")
sub BDRsave()
  if variable("BDRsave")=0 then dim BDRsave
  BDR_res% = dll_call0("BDRsave")
  BDRsave = BDR_res%
end_sub

' res% = dll_call3("BDRreadref",i%,part%,adr(s1$))
sub BDRreadref(ref%,part%)
  if variable("BDRreadref")=0 then dim BDRreadref
  if variable("BDRreadref$")=0 then dim BDRreadref$
  BDRreadref$ = string$(255," ")
  BDR_res% = dll_call3("BDRreadref",ref%,part%,adr(BDRreadref$))
  BDRreadref = BDR_res%
  BDRreadref$ = trim$(BDRreadref$)
end_sub

' res% = dll_call4("BDRreadseq",i%,0,part%,adr(s1$))
sub BDRreadnext(ref%,part%)
  if variable("BDRreadnext")=0 then dim BDRreadnext
  if variable("BDRreadnext$")=0 then dim BDRreadnext$
  BDRreadnext$ = string$(255," ")
  BDR_res% = dll_call4("BDRreadseq",ref%,0,part%,adr(BDRreadnext$))
  BDRreadnext = BDR_res%
  BDRreadnext$ = trim$(BDRreadnext$)
end_sub

' res% = dll_call4("BDRreadseq",i%,0,part%,adr(s1$))
sub BDRreadprevious(ref%,part%)
  if variable("BDRreadprevious")=0 then dim BDRreadprevious
  if variable("BDRreadprevious$")=0 then dim BDRreadprevious$
  BDRreadprevious$ = string$(255," ")
  BDR_res% = dll_call4("BDRreadseq",ref%,0,part%,adr(BDRreadprevious$))
  BDRreadprevious = BDR_res%
  BDRreadprevious$ = trim$(BDRreadprevious$)
end_sub

' res% = dll_call1("BDRdeleteref",i%)
sub BDRdeleteref(ref%)
  if variable("BDRdeleteref")=0 then dim BDRdeleteref
  BDR_res% = dll_call1("BDRdeleteref",ref%)
  BDRdeleteref = BDR_res%
end_sub

' res% = dll_call2("BDRreplaceref",i%,adr(s$))
sub BDRreplaceref(ref%,donnee$)
  if variable("BDRreplaceref")=0 then dim BDRreplaceref
  BDR_res% = dll_call2("BDRreplaceref",ref%,adr(donnee$))
  BDRreplaceref = BDR_res%
end_sub

' res% = dll_call3("BDRsetrelation",adr(sa$),adr(sr$),adr(sb$))
sub BDRsetrelation(sa$,sr$,sb$)
  if variable("BDRsetrelation")=0 then dim BDRsetrelation
  BDR_res% = dll_call3("BDRsetrelation",adr(sa$),adr(sr$),adr(sb$))
  BDRsetrelation = BDR_res%
end_sub

' res% = dll_call4("BDRfindrelation",adr(sa$),adr(sr$),adr(sb$),handle(no_memo%))
sub BDRfindrelation(sa$,sr$,sb$,memo%)
  if variable("BDRfindrelation")=0 then dim BDRfindrelation
  BDR_res% = dll_call4("BDRfindrelation",adr(sa$),adr(sr$),adr(sb$),handle(memo%))
  BDRfindrelation = BDR_res%
end_sub

' res% = dll_call4("BDRfindrelationset",adr(sa$),adr(sr$),adr(sb$),adr(set$))
sub BDRfindrelationset(sa$,sr$,sb$,set$)
  if variable("BDRfindrelationset")=0 then dim BDRfindrelationset
  BDR_res% = dll_call4("BDRfindrelationset",adr(sa$),adr(sr$),adr(sb$),adr(set$))
  BDRfindrelationset = BDR_res%
end_sub

' res% = dll_call3("BDRdeleterelation",adr(sa$),adr(sr$),adr(sb$))
sub BDRdeleterelation(sa$,sr$,sb$)
  if variable("BDRdeleterelation")=0 then dim BDRdeleterelation
  BDR_res% = dll_call3("BDRdeleterelation",adr(sa$),adr(sr$),adr(sb$))
  BDRdeleterelation = BDR_res%
end_sub

' res% = dll_call1("BDRlistallentities",handle(memo%))
sub BDRlistallentities(memo%)
  if variable("BDRlistallentities")=0 then dim BDRlistallentities
  BDR_res% = dll_call1("BDRlistallentities",handle(memo%))
  BDRlistallentities = BDR_res%
end_sub

' res% = dll_call2("BDRmacro",handle(memo1%),handle(memo2%))
sub BDRmacro(memo1%,memo2%)
  if variable("BDR_res%")=0
    dim BDR_res%
    if variable("BDR_OK")=0
      dim BDR_OK,BDR_ERROR_syntax,BDR_ERROR_invdir,
      dim BDR_ERROR_open,BDR_ERROR_missing, BDR_ERROR_invnam
      dim BDR_ERROR_double, BDR_ERROR_structure
      BDR_OK =                      0
      BDR_ERROR_syntax =          -1
      BDR_ERROR_invdir =          -2
      BDR_ERROR_open =            -3
      BDR_ERROR_missing =          -4
      BDR_ERROR_invnam =          -5
      BDR_ERROR_double =          -6
      BDR_ERROR_structure =        -7
    end_if
  end_if
  if variable("BDRmacro")=0 then dim BDRmacro
  BDR_res% = dll_call2("BDRmacro",handle(memo1%),handle(memo2%))
  BDRmacro = BDR_res%
end_sub

' res% = dll_call0("BDRstatus")
sub BDRstatus()
  if variable("BDR_res%")=0
    dim BDR_res%
    if variable("BDR_OK")=0
      dim BDR_OK,BDR_ERROR_syntax,BDR_ERROR_invdir,
      dim BDR_ERROR_open,BDR_ERROR_missing, BDR_ERROR_invnam
      dim BDR_ERROR_double, BDR_ERROR_structure
      BDR_OK =                      0
      BDR_ERROR_syntax =          -1
      BDR_ERROR_invdir =          -2
      BDR_ERROR_open =            -3
      BDR_ERROR_missing =          -4
      BDR_ERROR_invnam =          -5
      BDR_ERROR_double =          -6
      BDR_ERROR_structure =        -7
    end_if
  end_if
  if variable("BDRstatus")=0 then dim BDRstatus
  BDR_res% = dll_call0("BDRstatus")
  BDRstatus = BDR_res%
end_sub

' res% = dll_call2("BDRsetelement",adr(elem$),adr(set$))
sub BDRsetelement(elem$,set$)
  if variable("BDRsetelement")=0 then dim BDRsetelement
  BDR_res% = dll_call2("BDRsetelement",adr(elem$),adr(set$))
  BDRsetelement = BDR_res%
end_sub

' res% = dll_call2("BDRfindelement",adr(elem$),adr(set$))
sub BDRfindelement(elem$,set$)
  if variable("BDRfindelement")=0 then dim BDRfindelement
' message "a1"
  BDR_res% = dll_call2("BDRfindelement",adr(elem$),adr(set$))
' message "a2"
  BDRfindelement = BDR_res%
' message "a3"
end_sub

' res% = dll_call2("BDRdeleteelement",adr(elem$),adr(set$))
sub BDRdeleteelement(elem$,set$)
  if variable("BDRdeleteelement")=0 then dim BDRdeleteelement
  BDR_res% = dll_call2("BDRdeleteelement",adr(elem$),adr(set$))
  BDRdeleteelement = BDR_res%
end_sub

' res% = dll_call1("BDRtestset",adr(set$))
sub BDRtestset(set$)
  if variable("BDRtestset")=0 then dim BDRtestset
  BDR_res% = dll_call1("BDRtestset",adr(set$))
  BDRtestset = BDR_res%
end_sub

' res% = dll_call1("BDRclearset",adr(set$))
sub BDRclearset(set$)
  if variable("BDRclearset")=0 then dim BDRclearset
  BDR_res% = dll_call1("BDRclearset",adr(set$))
  BDRclearset = BDR_res%
end_sub

' res% = dll_call2("BDRlistset",adr(set$),handle(memo%))
sub BDRlistset(set$,memo%)
  if variable("BDRlistset")=0 then dim BDRlistset
  BDR_res% = dll_call2("BDRlistset",adr(set$),handle(memo%))
  BDRlistset = BDR_res%
end_sub

' res% = dll_call3("BDRsetunion",adr(set1$),adr(set2$),adr(set3$))
sub BDRsetunion(set1$,set2$,set3$)
  if variable("BDRsetuniion")=0 then dim BDRsetunion
  BDR_res% = dll_call3("BDRsetunion",adr(set1$),adr(set2$),adr(set3$))
  BDRsetunion = BDR_res%
end_sub

' res% = dll_call3("BDRsetintersection",adr(set1$),adr(set2$),adr(set3$))
sub BDRsetintersection(set1$,set2$,set3$)
  if variable("BDRsetintersection")=0 then dim BDRsetintersection
  BDR_res% = dll_call3("BDRsetintersection",adr(set1$),adr(set2$),adr(set3$))
  BDRsetintersection = BDR_res%
end_sub

' res% = dll_call0("BDRdoublekeyYES")
sub BDRdoublekeyYES()
  if variable("BDRdoublekeyYES")=0 then dim BDRdoublekeyYES
  BDR_res% = dll_call0("BDRdoublekeyYES")
  BDRdoublekeyYES = BDR_res%
end_sub

' res% = dll_call0("BDRdoublekeyNO")
sub BDRdoublekeyNO()
  if variable("BDRdoublekeyNO")=0 then dim BDRdoublekeyNO
  BDR_res% = dll_call0("BDRdoublekeyNO")
  BDRdoublekeyNO = BDR_res%
end_sub

' res% = dll_call0("BDRcircularsetYES")
sub BDRcircularsetYES()
  if variable("BDRcircularsetYES")=0 then dim BDRcircularsetYES
  BDR_res% = dll_call0("BDRcircularsetYES")
  BDRcircularsetYES = BDR_res%
end_sub

' res% = dll_call0("BDRdoublekeyNO")
sub BDRcircularsetNO()
  if variable("BDRdoublekeyNO")=0 then dim BDRcircularsetNO
  BDR_res% = dll_call0("BDRcircularsetNO")
  BDRcircularsetNO = BDR_res%
end_sub

' res% = dll_call0("BDRsearchexactYES")
sub BDRsearchexactYES()
  if variable("BDRsearchexactYES")=0 then dim BDRsearchexactYES
  BDR_res% = dll_call0("BDRsearchexactYES")
  BDRsearchexactYES = BDR_res%
end_sub

' res% = dll_call0("BDRsearchexactNO")
sub BDRsearchexactNO()
  if variable("BDRsearchexactNO")=0 then dim BDRsearchexactNO
  BDR_res% = dll_call0("BDRsearchexactNO")
  BDRsearchexactNO = BDR_res%
end_sub





' res% = dll_call4("DelimitedTextExtract",adr(chaine$),adr(sep$),n%,adr(DelimitedTextExtract$))
sub DelimitedTextExtract(chaine$,sep$,n%)
  dim_local DTE_res%
  if variable("DelimitedTextExtract")=0 then dim DelimitedTextExtract
  if variable("DelimitedTextExtract$")=0 then dim DelimitedTextExtract$
  DelimitedTextExtract$ = string$(255," ")
  DTE_res% = dll_call4("DelimitedTextExtract",adr(chaine$),adr(sep$),n%,adr(DelimitedTextExtract$))
  DelimitedTextExtract = DTE_res%
  DelimitedTextExtract$ = trim$(DelimitedTextExtract$)
end_sub

' res% = dll_call5("DelimitedTextReplace",adr(chaine$),adr(sep$),adr(elem$),n%,adr(DelimitedTextReplace$))
sub DelimitedTextReplace(chaine$,sep$,elem$,n%)
  dim_local DTR_res%
  if variable("DelimitedTextReplace")=0 then dim DelimitedTextReplace
  if variable("DelimitedTextreplace$")=0 then dim DelimitedTextReplace$
  DelimitedTextReplace$ = string$(255," ")
  DTR_res% = dll_call5("DelimitedTextReplace",adr(chaine$),adr(sep$),adr(elem$),n%,adr(DelimitedTextReplace$))
  DelimitedTextReplace = DTR_res%
  DelimitedTextReplace$ = trim$(DelimitedTextReplace$)
end_sub

' res% = dll_call5("DelimitedTextInsert",adr(chaine$),adr(sep$),adr(elem$),n%,adr(DelimitedTextInsert$))
sub DelimitedTextInsert(chaine$,sep$,elem$,n%)
  dim_local DTI_res%
  if variable("DelimitedTextInsert")=0 then dim DelimitedTextInsert
  if variable("DelimitedTextInsert$")=0 then dim DelimitedTextInsert$
  DelimitedTextInsert$ = string$(255," ")
  DTI_res% = dll_call5("DelimitedTextInsert",adr(chaine$),adr(sep$),adr(elem$),n%,adr(DelimitedTextInsert$))
  DelimitedTextInsert = DTI_res%
  DelimitedTextInsert$ = trim$(DelimitedTextInsert$)
end_sub

' res% = dll_call4("DelimitedTextRemove",adr(chaine$),adr(sep$),n%,adr(DelimitedTextRemove$))
sub DelimitedTextRemove(chaine$,sep$,n%)
  dim_local DTR_res%
  if variable("DelimitedTextRemove")=0 then dim DelimitedTextRemove
  if variable("DelimitedTextRemove$")=0 then dim DelimitedTextRemove$
  DelimitedTextRemove$ = string$(255," ")
  DTR_res% = dll_call4("DelimitedTextRemove",adr(chaine$),adr(sep$),n%,adr(DelimitedTextRemove$))
  DelimitedTextRemove = DTR_res%
  DelimitedTextRemove$ = trim$(DelimitedTextRemove$)
end_sub

' res% = dll_call3("BDRfilterelementnamestomemo",adr(set$),adr(mask$),handle(memo%))
sub BDRfilterelementnamestomemo(set$,mask$,memo%)
  if variable("BDRfilterelementnamestomemo")=0 then dim BDRfilterelementnamestomemo
  BDR_res% = dll_call3("BDRfilterelementnamestomemo",adr(set$),adr(mask$),handle(memo%))
  BDRfilterelementnamestomemo = BDR_res%
end_sub

' res% = dll_call3("BDRfilterelementnamestoset",adr(setin$),adr(mask$),adr(setout$))
sub BDRfilterelementnamestoset(set$,mask$,memo%)
  if variable("BDRfilterelementnamestoset")=0 then dim BDRfilterelementnamestoset
  BDR_res% = dll_call3("BDRfilterelementnamestoset",adr(setin$),adr(mask$),adr(setout$))
  BDRfilterelementnamestoset = BDR_res%
end_sub

' res% = dll_call2("FilterString",adr(chaine$),adr(filtre$))
sub FilterString(chaine$,filtre$)
  if variable("FilterString")=0 then dim FilterString
  BDR_res% = dll_call2("FilterString",adr(chaine$),adr(filtre$))
  FilterString = BDR_res%
end_sub

' res% = dll_call2("BDRfilterentitynamestomemo",adr(mask$),handle(memo%))
sub BDRfilterentitynamestomemo(mask$,memo%)
  if variable("BDRfilterentitynamestomemo")=0 then dim BDRfilterentitynamestomemo
  BDR_res% = dll_call2("BDRfilterentitynamestomemo",adr(mask$),handle(memo%))
  BDRfilterentitynamestomemo = BDR_res%
end_sub

' res% = dll_call2("BDRfilterentitynamestoset",adr(mask$),adr(setout$))
sub BDRfilterentitynamestoset(mask$,memo%)
  if variable("BDRfilterentitynamestoset")=0 then dim BDRfilterentitynamestoset
  BDR_res% = dll_call2("BDRfilterentitynamestoset",adr(mask$),adr(setout$))
  BDRfilterentitynamestoset = BDR_res%
end_sub

' res% = dll_call1("BDRgetidofname",adr(nom$))
sub BDRgetidofname(nom$)
  if variable("BDRgetidofname")=0 then dim BDRgetidofname
  BDR_res% = dll_call1("BDRgetidofname",adr(nom$))
  BDRgetidofname = BDR_res%
end_sub
 
' res% = dll_call2("BDRrenameref",ref%,adr(nom$))
sub BDRrenameref(ref%,nom$)
  if variable("BDRrenameref")=0 then dim BDRrenameref
  BDR_res% = dll_call2("BDRrenameref",ref%,adr(nom$))
  BDRrenameref = BDR_res%
end_sub
Maintenant j'essaye de faire un état:

Site
--Lad
----cheval 1
----cheval 2
----...

çà avance mais çà met du temps à rentrer dans ma petite caboche... Laughing
Revenir en haut Aller en bas
Yannick




Nombre de messages : 8611
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Nouvel  AU SECOURS KLAUS !!! - Page 2 Empty
MessageSujet: re   Nouvel  AU SECOURS KLAUS !!! - Page 2 EmptyLun 15 Avr 2013 - 5:08

L' avancée de ma petite base BDR_Chevaux

BDR_Chevaux.zip

c'est un début qui commence à ressembler à quelque chose.... Laughing
Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12301
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Nouvel  AU SECOURS KLAUS !!! - Page 2 Empty
MessageSujet: Re: Nouvel AU SECOURS KLAUS !!!   Nouvel  AU SECOURS KLAUS !!! - Page 2 EmptyLun 15 Avr 2013 - 9:20

Félicitations ! Tu as saisi le principe, et ton programme marche.

Une petite question: pour le cheval, pourquoi du mets en data le lad et le site (lignes 148 et 149) ? Il me semble que ce n'est pas utilisé par la suite. Et tu peux obtenir l'information par la recherche selon la relation, par la fonction BDRfindrelation(a$,r$,b$,memo%). Pour trouver le lad pour un cheval, tu peux faire:
Code:
BDRfindrelation(c$,syst1$,"?",39)
Et le mémo 39 contiendra la liste des noms des lads s'occupant du cheval dont le nom est dans c$. Et si count(39)=1, alors item_read$(3ç,1) est le nom du lad.

Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Yannick




Nombre de messages : 8611
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Nouvel  AU SECOURS KLAUS !!! - Page 2 Empty
MessageSujet: re   Nouvel  AU SECOURS KLAUS !!! - Page 2 EmptyLun 15 Avr 2013 - 13:47

C'est utilisé pour "Sub Sel()" qui affiche la fiche du cheval
lorsque l'on est en mode "view", "Modify" ou "Remove".

Lors de la création d' une fiche cheval, je dois pouvoir piocher dans une liste complète de tout les lads
pour attribuer un lad à un cheval.
findrelation ne me donne que le lad d'un cheval existant et comme je suis entrain de créer la fiche... Laughing
Donc je crée un ensemble "lad" et idem pour "site"

Pour l'affichage des détails de la fiche, j'ai besoin qu'ils soient regroupé par cheval donc je les joints au cheval.

Cela peut paraître biscornu et chiant de détailler tout et de créer des groupes ,des relations etc...
mais pour avoir beaucoup utilisé "Approach" de chez lotus ( à une époque où il faisait partie de la suite bureautique "Lotus"
qui était pré-installé et gratuite sur le pc que j'avais acheté, un IBM ) je peux dire que c'est essentiel de le faire dès le départ,
même si c'est inutile dans un proche immédiat, par la suite tu peux imaginer tout un tas de combinaisons
plus tordus les unes que les autres Rolling Eyes .
C' est un peu dans le même esprit que de déclarer les ensembles à l'ouverture d'une base vide plutôt que dans une procédure,
une fois que c'est fait, c'est fait et tu sais que c'est fait... Laughing

PS : BDR me donne un coup de jeune et me renvoie au début mon apprentissage en informatique. J'ai commencé à explorer la programmation
et ses divers langages sérieusement lorsque j'ai changé mon pc et que je ne pouvais plus me servir de "Approach".
il m'aura fallu presque 20 ans pour trouver l'outils que je cherchais... Laughing .
Alors un énorme MERCI à Jack et à toi pour ce cadeau.
Revenir en haut Aller en bas
Contenu sponsorisé





Nouvel  AU SECOURS KLAUS !!! - Page 2 Empty
MessageSujet: Re: Nouvel AU SECOURS KLAUS !!!   Nouvel  AU SECOURS KLAUS !!! - Page 2 Empty

Revenir en haut Aller en bas
 
Nouvel AU SECOURS KLAUS !!!
Revenir en haut 
Page 2 sur 2Aller à la page : Précédent  1, 2
 Sujets similaires
-
» Au secours !
» Au secours !
» Au secours !
» Au secours ! j'ai les neurones qui bug !
» Au secours : TERMINATE ne m'aime plus!

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: A l'aide!-
Sauter vers: