Re: Q: New Era - Closing the main top
Posted in 1997
Kelly Ringwald <kellyr_@_kinkos.com> wrote:
Store all your normal top window references in a shared vector and the
main top window in a shared variable. When you close a window, remove
the reference from the vector. When the vector is empty, close the
main top.
e.g.
class goWindow derived from ixWindow
function goWindow(...)
function close() returning boolean
shared protected winVector ixVector
shared public mainWin goWindow
end class
function goWindow::goWindow(...):ixWindow(...)
variable pos integer = winVector.insert(self)
end function
function goWindow::close()
if not ixWindow::close() then
return false
end if
# find reference and delete it
... # close main top when finished
if winVector.getCount() = 1 then
# only main top remaining
if mainWin.close() then
let mainWin = winVector.delete(1)
let mainWin = null
end if
end if
return true
end function
>Hi all,
>I'd like to be able to have a normal top window which functions as a
>stand-alone program but which also can be tied together by a main menu
>program.
>I'm attempting to do this by using a dummy program as the main top
>window and hiding it while the normal top window I want to run is in
>operation. However I'm having trouble figuring out how to close it when
>my normal top closes without embedding a reference to my main window in
>the normal top window.
>Any advice on how to do this or a better method to achieve the same
>result?
>--
>TIA,
>Kelly
>[To reply directly remove "_" from address]
David W Chan
GO5 Limited
david@go5.com (work)
dwc@cix.compulink.co.uk (home)