OpenSheet ( sheetrefvar {, windowtype }, mdiframe {, position
{, arrangeopen } } )
Argument Description
sheetrefvar The name of any window variable that is not an MDI frame
window. OpenSheet places a reference to the open sheet in sheetrefvar
windowtype (optional) A s-t-r-i-n-g whose value is the data type of the
window you want to open. The data type of windowtype must be the same or a
descendant of sheetrefvar
OpenSheetWithParm ( sheetrefvar, parameter {, windowtype }, mdiframe
{, position {, arrangeopen } } )
Greg
"Rosalind" <r...@brcf.org> wrote in message
news:u$NHbUf$CHA.317@forums-1-dub...
IF is_window[row] = 'w_post_gl' THEN
OpenSheet(w_post_gl,w_brcf_frame, 0, layered!)
ELSEIF ...
END IF
Just wondering if there was another way...
<Philip_Salgannik> wrote in message
news:FC98DB0C815B007C0052C8FD85256D03.004E2CB385256D03@webforums...
Instead of:
>IF is_window[row] = 'w_post_gl' THEN
> OpenSheet(w_post_gl,w_brcf_frame, 0, layered!)
>ELSEIF ...
>
>END IF
You need this:
window w_toopen
OpenSheet(w_toopen, is_window[row], w_brcf_frame, 0, layered!)
If you have potential errors in the names contained in the file with window
names, then you can use FindClasssDefinition function for defensive
coding...
string ls_window = 'w_mywindow'
OpenSheet(ls_window,w_frame,0,layered!)
<Philip_Salgannik> wrote in message
news:E91345FC02D754BD005B02B385256D03.0059877285256D03@webforums...
Round and round we go... :-)
<Philip_Salgannik> wrote in message
news:05636EB15AE6D6C40068538A85256D03.0067B76A85256D03@webforums...
OpenSheet ( sheetrefvar {, windowtype }, mdiframe {, position
{, arrangeopen } } )
So, you'd need something like:
window lw_RefVar
OpenSheet (lw_RefVar, 'w_mywindow', w_frame, 0, layered!)
Good luck,
Terry [TeamSybase] and Sequel the techno-kitten
Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a PowerBuilder Developer's Toolkit.
Version 2.2.05 now available at the Sandbox
See the new PB Troubleshooting Guide at the Sandbox
^ ^
o o
=*=
From the seldom seen help file:
Syntax
OpenSheetWithParm ( sheetrefvar, parameter {, windowtype }, mdiframe
{, position {, arrangeopen } } )
Argument Description
sheetrefvar The name of any window variable that is not an MDI frame window.
OpenSheet places a reference to the open sheet in sheetrefvar
parameter The parameter you want to store in the Message object when the sheet
is opened. Parameter must have one of these data types:· String· Numeric·
PowerObject
windowtype (optional) A string whose value is the data type of the window you
want to open. The data type of windowtype must be the same or a descendant of
sheetrefvar
mdiframe The name of the MDI frame window in which you want to open this sheet.
position (optional) The number of the menu item (in the menu associated with the
sheet) to which you want to append the names of the open sheets. Menu bar menu
items are numbered from the left, beginning with 1. The default is to list the
open sheets under the next-to-last menu item
arrangeopen (optional) A value of the ArrangeOpen enumerated data type
specifying how you want the sheets arranged in the MDI frame when they are
opened:· Cascaded! — (Default) Cascade the sheet relative to other open sheets
so that its title bar is below the previously opened sheet· Layered! — Layer the
sheet so that it fills the frame and covers previously opened sheets· Original!
— Open the sheet in its original size and cascade it
Instead of:
>IF is_window[row] = 'w_post_gl' THEN
> OpenSheet(w_post_gl,w_brcf_frame, 0, layered!)
>ELSEIF ...
>
>END IF
You need this:
window w_toopen
OpenSheet(w_toopen, is_window[row], w_brcf_frame, 0, layered!)
where is_window[row] is YOUR string variable containing the classname of
the window.
I believe you can do what you're asking with some caveats.
Firstly the syntax is correct.
OpenSheet ( sheetrefvar {, windowtype }, mdiframe {, position {,
arrangeopen } } )
We use this in our app; but heres the caveat.
The sheetrefvar represents the parent window class.
windowtype is a string, but the window it references must be inherited from
sheetrefvar. Also sheetrefvar must be in a PBD, it cannot be in the EXE's
pbl.
If the window represented by the string is not in your applications Pbl
list, you can add it on the fly using GetApplication().SetLibraryList (
lv_library_list )
so...
string lv_my_window = "w_whatever" // w_whatever is inherited from
w_parent
OpenSheet ( w_parent, lv_my_window, w_frame )
We use this to open customer specific window without the need to include any
customer specific references in the base code, we just store the custom
window name (and PBL name) in the database and refer to that before opening
the window.
I hope this helps. If I've missed the point (happens a bit) I'm sorry
Norm
"Rosalind" <r...@brcf.org> wrote in message
news:u2Vs7F2$CHA.287@forums-1-dub...
> I guess that I never understood what the window type variable was. Thank
> you all.
>
>
> <Philip_Salgannik> wrote in message
> news:48DFFD519A033C930070CEFA85256D03.00703B0485256D03@webforums...
<Philip_Salgannik> wrote in message
news:48DFFD519A033C930070CEFA85256D03.00703B0485256D03@webforums...
Good luck,
Terry [TeamSybase] and Sequel the techno-kitten