Pas de problème (pb), que du PowerBuilder (PB) ^^

Le forum (ô combien francophone) des utilisateurs de Powerbuilder.

Recherche rapide

Annonce

Certaines rubriques, dont des cours, sont uniquement visibles par les membres du forum ^^.
Dans la rubrique Liens & Références, vous avez accès à un sommaire de téléchargement, profitez-en !
Il existe maintenant un nouveau TOPIC "Votre CV en Ligne" accessible uniquement par demande.

#1 08-08-2007 09:05:26

poche  
Membre Power Geek
Date d'inscription: 19-12-2006
Messages: 282
Pépites: 2,392
Banque: 0

[RESOLU] Fonction Open : Petite question bête

Que signifie :

Code: pb

Open( lw_connect , "w_connect" )

et lw_connect est une variable de type window

Hors ligne

 

#2 08-08-2007 09:06:42

erasorz  
Admin
Lieu: Babylone
Date d'inscription: 23-11-2006
Messages: 5121
Pépites: 97,197
Banque: 2,147,483,647

Re: [RESOLU] Fonction Open : Petite question bête

Bonjour...
que signifie ?


N'envoyez jamais un humain faire le travail d'un programme.

Hors ligne

 

#3 08-08-2007 09:11:06

poche  
Membre Power Geek
Date d'inscription: 19-12-2006
Messages: 282
Pépites: 2,392
Banque: 0

Re: [RESOLU] Fonction Open : Petite question bête

C'est vrai excusez moi, c'est que je suis assez préssé, mais bon c'est pa une raison...
BONJOUR!!!!!!!!!!!!

Et sinon, j'ai essayer F1 mais ça ma l'air pas très clair pour moi (ça fait 3 mois que j'ai pas touché à PB, donc j'ai un peu de mal)...

Dernière modification par poche (08-08-2007 09:12:42)

Hors ligne

 

#4 08-08-2007 09:15:42

thezerg  
Modérateur
Award: calimero
Lieu: Bordeaux
Date d'inscription: 12-09-2006
Messages: 966
Pépites: 22,449
Banque: 154,120,629,477,379,100

Re: [RESOLU] Fonction Open : Petite question bête

Bonjour !
C'est sans intérêt mais :

Open ( windowvar {, parent } )

Argument    Description
windowvar    The name of the window you want to display. You can specify a window object defined in the Window painter (which is a window datatype) or a variable of the desired window datatype. Open places a reference to the opened window in windowvar.
parent
(child and pop-up windows only) (optional)    The window you want make the parent of the child or pop-up window you are opening. If you open a child or pop-up window and omit parent, PowerBuilder associates the window being opened with the currently active window.

Hors ligne

 

#5 08-08-2007 09:16:16

JCZ  
Builder Power
Award: bf
Lieu: 75019 paris
Date d'inscription: 21-05-2007
Messages: 1724
Pépites: 496,453,703,213
Banque: 9,223,372,036,854,776,000

Re: [RESOLU] Fonction Open : Petite question bête

Description

Opens a window object of a known datatype. Open displays the window and makes all its properties and controls available to scripts.

Controls

Window objects

Syntax

Open ( windowvar {, parent } )

Argument Description
   windowvar    The name of the window you want to display. You can specify a window object defined in the Window painter (which is a window datatype) or a variable of the desired window datatype. Open places a reference to the opened window in windowvar.
  parent
(child and pop-up windows only) (optional)    The window you want make the parent of the child or pop-up window you are opening. If you open a child or pop-up window and omit parent, PowerBuilder associates the window being opened with the currently active window.
Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null
, Open returns null.

Usage

You must open a window before you can access the properties of the window. If you access the window's properties before you open it, an execution error will occur.
To reference an open window in scripts, use windowvar.
Calling Open twice    If you call Syntax 1 of the Open function twice for the same window, PowerBuilder activates the window twice; it does not open two instances of the window.
To open an array of windows where each window has different datatype, use Syntax 2 of Open.

Parent windows for the opened window   
Generally, if you are opening a child or a pop-up window and specify parent, the window identified by parent is the parent of the opened window (windowname or windowvar). When a parent window is closed, all its child and pop-up windows are closed too.
Not all types of windows can be parent windows. Only a window whose borders are not confined within another window can be a parent. A child window or a window opened as a sheet cannot be a parent. If you specify a confined window as a parent, PowerBuilder checks its parent, and that window's parent, until it finds a window that it can use as a parent. Therefore if you open a pop-up window and specify a sheet as its parent, PowerBuilder makes the MDI frame that contains the sheet its parent.

If you do not specify a parent for a child or pop-up window, the active window becomes the parent. Therefore, if one pop-up is active and you open another pop-up, the first pop-up is the parent, not the main window. When the first pop-up is closed, PowerBuilder closes the second pop-up too.
However, in an MDI application, the active sheet is not the active window and cannot be the parent. In Windows, it is clear that the MDI frame, not the active sheet, is the active window—its title bar is the active color and it displays the menu.

Mouse behavior and response windows    Controls capture the mouse in order to perform certain operations. For instance, CommandButtons capture during mouse clicks, edit controls capture for text selection, and scroll bars capture during scrolling. If a response window is opened while the mouse is captured, unexpected results can occur.

Because a response window grabs focus, you should not open it when focus is changing, such as in a LoseFocus event.


Face à l'agression, la puissance de l'intelligence

Hors ligne

 

#6 08-08-2007 09:17:40

JCZ  
Builder Power
Award: bf
Lieu: 75019 paris
Date d'inscription: 21-05-2007
Messages: 1724
Pépites: 496,453,703,213
Banque: 9,223,372,036,854,776,000

Re: [RESOLU] Fonction Open : Petite question bête

c'est pas vrai thezerg. Tu fais exprès ???? 


Face à l'agression, la puissance de l'intelligence

Hors ligne

 

#7 08-08-2007 09:18:38

thezerg  
Modérateur
Award: calimero
Lieu: Bordeaux
Date d'inscription: 12-09-2006
Messages: 966
Pépites: 22,449
Banque: 154,120,629,477,379,100

Re: [RESOLU] Fonction Open : Petite question bête

JCZ a écrit:

c'est pas vrai thezerg. Tu fais exprès ???? 

désolé

Hors ligne

 

#8 08-08-2007 09:21:49

poche  
Membre Power Geek
Date d'inscription: 19-12-2006
Messages: 282
Pépites: 2,392
Banque: 0

Re: [RESOLU] Fonction Open : Petite question bête

Cela signifie que j'ouvre une fenêtre de type windondow et qui pareil que son parent.
Pourquoi ne pas avoir mis:

Code: pb

Open(w_connect)

???

Hors ligne

 

#9 08-08-2007 09:24:27

thezerg  
Modérateur
Award: calimero
Lieu: Bordeaux
Date d'inscription: 12-09-2006
Messages: 966
Pépites: 22,449
Banque: 154,120,629,477,379,100

Re: [RESOLU] Fonction Open : Petite question bête

poche a écrit:

Cela signifie que j'ouvre une fenêtre de type windondow et qui pareil que son parent.
Pourquoi ne pas avoir mis:

Code: pb

Open(w_connect)

???

Si tu ouvres ta fenetre de la facon dont c'est fait dans ton premier post, si tu fermes la fenetre parent, la fenetre lw_connect sera fermée automatiquement.

Hors ligne

 

#10 08-08-2007 09:27:17

poche  
Membre Power Geek
Date d'inscription: 19-12-2006
Messages: 282
Pépites: 2,392
Banque: 0

Re: [RESOLU] Fonction Open : Petite question bête

ça veut dire que lorsque je met :

Code: pb

Open( lw_connect , "w_connect" )

ça ouvre deux fenêtre, lw_connect et w_connect???
Je comprend plus rien...

Hors ligne

 

#11 08-08-2007 09:28:12

thezerg  
Modérateur
Award: calimero
Lieu: Bordeaux
Date d'inscription: 12-09-2006
Messages: 966
Pépites: 22,449
Banque: 154,120,629,477,379,100

Re: [RESOLU] Fonction Open : Petite question bête

poche a écrit:

ça veut dire que lorsque je met :

Code: pb

Open( lw_connect , "w_connect" )

ça ouvre deux fenêtre, lw_connect et w_connect???
Je comprend plus rien...

non en fait ça ouvre le fenetre lw_connect et lui assigne w_connect comme parent

Hors ligne

 

#12 08-08-2007 09:32:02

poche  
Membre Power Geek
Date d'inscription: 19-12-2006
Messages: 282
Pépites: 2,392
Banque: 0

Re: [RESOLU] Fonction Open : Petite question bête

A d'accord, mais pourquoi ne pas avoir juste mis :

Code: pb

Open(w_connect)

ça sert à quoi d'assigner un parent à une variable de type windows??

Hors ligne

 

#13 08-08-2007 09:34:01

thezerg  
Modérateur
Award: calimero
Lieu: Bordeaux
Date d'inscription: 12-09-2006
Messages: 966
Pépites: 22,449
Banque: 154,120,629,477,379,100

Re: [RESOLU] Fonction Open : Petite question bête

poche a écrit:

A d'accord, mais pourquoi ne pas avoir juste mis :

Code: pb

Open(w_connect)

ça sert à quoi d'assigner un parent à une variable de type windows??

ce que je disais juste avant, par exemple fermer les fenetres filles quand tu fermes la fenetre parent

Hors ligne

 

#14 08-08-2007 09:35:00

poche  
Membre Power Geek
Date d'inscription: 19-12-2006
Messages: 282
Pépites: 2,392
Banque: 0

Re: [RESOLU] Fonction Open : Petite question bête

Ok, merci

Hors ligne

 

#15 08-08-2007 09:38:45

Chrnico  
N2I Power
Award: bf
Lieu: Vanves
Date d'inscription: 05-06-2007
Messages: 1206
Pépites: 12,884,901,943
Banque: 9,223,372,036,854,776,000
Site web

Re: [RESOLU] Fonction Open : Petite question bête

Cliques sur le mot "Open" puis tape sur Shift + F1 => c'est directe !!!!!!!!!!!!!!!

moi aussi j'ai une touche [! ]
c'est cool


Tu dois donc tu peux (Kant)

Tu peux donc tu dois (N2i)
www.n2i.fr

Hors ligne

 

#16 08-08-2007 15:36:39

Tonio  
Membre
Lieu: Lille
Date d'inscription: 30-07-2007
Messages: 10
Pépites: 30
Banque: 0

Re: [RESOLU] Fonction Open : Petite question bête

C'est du grand niveau chris

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22