- Dan Black
- PowerBuilder
- Friday, 15 May 2020 06:42 PM UTC
Hey,
Here's some background. I am trying to add a 'restore layout' feature so that when the user logs in their active sheets from the previous session restore to their position. I've got it working pretty nicely but I've ran up against a snag.
1. The layout is saved by saving the w_sheet.classname() and the position values to a string.
2. The layout is restored by reading the string and using OpenSheet like this:
Window w_sheet
OpenSheet (w_sheet, 'w_that_is_cool', w_main, ing_window_menu, Original!)
but afterwards any calls to IsValid(w_that_is_cool)
return FALSE. I assume this is because w_sheet was of type Window when OpenSheet was called, but that doesn't really help me.
This is contrasted with how windows are usually opened in our program with
OpenSheet (w_that_is_cool, w_main, ing_window_menu, Original!)
afterwards IsValid(w_that_id_cool)
returns TRUE as expected.
Does anyone know have any ideas how I can dynamically open windows but also have them be recognized by IsValid?
Thanks,
Dan
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.