Code Comments
Programming Forum and web based access to our favorite programming groups.Using Clarion6.1 legacy I am using two splash procedures in my application. If splash1 is open when I call splash2, I want splash1 to close. Can someone please help me with this code in legacy. something like IF splash1=open close(splash1) END Thanks and happy new year and please PEACE this year.
Post Follow-up to this messageDick: Global: UserDefinedEventClosingSpash1 EQUATE(400h) !See Help about post User-defined Events !They need to start at 400h ------------------------------- In MainFrame. ThreadQ QUEUE,PRE(ThreadQ) Nbr LONG ProcName STRING(100) END Create a Queue in the Main Frame that contains Thread# and Procedure Name When a Thread Starts put the Procedure into the Thread# and ProcedureName into the Queue. START will give you the TRHREAD# you may need to OMIT what is generated to capture the Thread#. When the Splash1 Screen is closed POST(UserDefinedEventClosingSplash1,,1) have Main Frame Remove Item from Queue. CASE EVENT() OF UserDefinedEventClosingSpash1 ThreadQ.ProcName='Spash1' GET(ThreadQ,ThreadQ.ProcName) IF NOT ErrorCode() DELETE(ThreadQ) END END Before Splash2 is open you need to check to see if Splash1 is in Queue. IF it is in your Queue you need to POST(Event:CloseWindow,,ThreadQ.Nbr) for your Spash1 Thread. I think something like this should work. You probably need similiar stuff for Spash2 also, since I assume you want Spash2 to close if Spalsh1 is opened. Jim Mumford
Post Follow-up to this messageJim...thanks I'll try it.....Have a happy new year. Dick Foster "JMumf" <jmmfrd@yahoo.com> wrote in message news:1104603606.786922.63390@z14g2000cwz.googlegroups.com... > Dick: > > Global: > UserDefinedEventClosingSpash1 EQUATE(400h) !See Help about post > User-defined Events > !They need to start at > 400h > ------------------------------- > In MainFrame. > ThreadQ QUEUE,PRE(ThreadQ) > Nbr LONG > ProcName STRING(100) > END > > > Create a Queue in the Main Frame that contains > > Thread# and Procedure Name > When a Thread Starts put the Procedure into the Thread# and > ProcedureName into the Queue. > START will give you the TRHREAD# you may need to OMIT what is > generated to capture the Thread#. > > When the Splash1 Screen is closed > POST(UserDefinedEventClosingSplash1,,1) have Main Frame Remove Item > from Queue. > > CASE EVENT() > OF UserDefinedEventClosingSpash1 > ThreadQ.ProcName='Spash1' > GET(ThreadQ,ThreadQ.ProcName) > IF NOT ErrorCode() > DELETE(ThreadQ) > END > END > > Before Splash2 is open you need to check to see if Splash1 is in > Queue. > > IF it is in your Queue you need to > POST(Event:CloseWindow,,ThreadQ.Nbr) for your Spash1 Thread. > > I think something like this should work. You probably need similiar > stuff for Spash2 also, since I assume you want Spash2 to close if > Spalsh1 is opened. > > Jim Mumford >
Post Follow-up to this messageDick: Global: UserDefinedEventClosingSpash1 EQUATE(400h) !See Help about post User-defined Events !They need to start at 400h ------------------------------- In MainFrame. ThreadQ QUEUE,PRE(ThreadQ) Nbr LONG ProcName STRING(100) END Create a Queue in the Main Frame that contains Thread# and Procedure Name When a Thread Starts put the Procedure into the Thread# and ProcedureName into the Queue. START will give you the TRHREAD# you may need to OMIT what is generated to capture the Thread#. When the Splash1 Screen is closed POST(UserDefinedEventClosingSplash1,,1) have Main Frame Remove Item from Queue. CASE EVENT() OF UserDefinedEventClosingSpash1 ThreadQ.ProcName='Spash1' GET(ThreadQ,ThreadQ.ProcName) IF NOT ErrorCode() DELETE(ThreadQ) END END Before Splash2 is open you need to check to see if Splash1 is in Queue. IF it is in your Queue you need to POST(Event:CloseWindow,,ThreadQ.Nbr) for your Spash1 Thread. I think something like this should work. You probably need similiar stuff for Spash2 also, since I assume you want Spash2 to close if Spalsh1 is opened. Jim Mumford
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.