Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ending one GUI from another

0 views
Skip to first unread message

Neeraj

unread,
Jul 18, 2008, 2:00:17 PM7/18/08
to
How do I end or delete one GUI that is open and inactive at
the back from the one that is active and in front.

PS. These GUI's are not connected. i.e one did not trigger
the other. There was a gui window say GUI_1. It opened GUI_2
which was modal. GUI_2 had 2 options. 1st option led to
GUI_1 by simply deleting itself. 2nd option opened up a new
gui GUI_3. GUI_3 has to be able to delete GUI_2 at starting
i.e. its openfunction.

Please suggest something

Bruno Luong

unread,
Jul 18, 2008, 2:48:03 PM7/18/08
to
"Neeraj " <nav...@gmail.com> wrote in message
<g5qlnh$1qr$1...@fred.mathworks.com>...

Statement_A


>
> PS. These GUI's are not connected. i.e one did not trigger
> the other.

Statement_B


> There was a gui window say GUI_1. It opened GUI_2
> which was modal. GUI_2 had 2 options. 1st option led to
> GUI_1 by simply deleting itself. 2nd option opened up a new
> gui GUI_3. GUI_3 has to be able to delete GUI_2 at starting
> i.e. its openfunction.
>

This is how my brain is triggered:

if Statement_A && Statement_B
warning(['Be careful, ' ...
'paradox detected ...' ...
'please take a rest!!!'])
end

% Bruno

Neeraj

unread,
Jul 18, 2008, 4:45:04 PM7/18/08
to
It took me a while thinking... he he
sorry my fault... really apologize for the negligence
ill restate it..

How do I end or delete one GUI that is open and inactive at
the back from the one that is active and in front.

PS. These GUI's are not connected. i.e one did not trigger
the other. There was a gui window say GUI_1. It opened GUI_2


which was modal. GUI_2 had 2 options. 1st option led to
GUI_1 by simply deleting itself. 2nd option opened up a new

gui GUI_3. GUI_3 has to be able to delete GUI_1 at starting
i.e. its openfunction.

please note that the 2nd last line has been changed...

sorry once again

Neeraj


"Bruno Luong" <b.l...@fogale.fr> wrote in message
<g5qoh3$6n7$1...@fred.mathworks.com>...

Neeraj

unread,
Jul 18, 2008, 4:49:02 PM7/18/08
to
"Bruno Luong" <b.l...@fogale.fr> wrote in message
<g5qoh3$6n7$1...@fred.mathworks.com>...

I had just replied to this msg my it got lost somewhere.
rewriting it again...
"
this one seriously required an apology from my side. Sorry
for my negligence. I am restating my problem statement
again. Really sorry

How do I end or delete one GUI that is open and inactive at
the back from the one that is active and in front.

PS. These GUI's are not connected. i.e one did not trigger
the other. There was a gui window say GUI_1. It opened GUI_2


which was modal. GUI_2 had 2 options. 1st option led to
GUI_1 by simply deleting itself. 2nd option opened up a new

gui GUI_3. GUI_3 has to be able to delete GUI_1 at starting
i.e. its openfunction.

please notice that the last line has been changed.

"

Steven Lord

unread,
Jul 18, 2008, 5:14:11 PM7/18/08
to

"Neeraj " <nav...@gmail.com> wrote in message
news:g5qvcg$gn5$1...@fred.mathworks.com...

> It took me a while thinking... he he
> sorry my fault... really apologize for the negligence
> ill restate it..
>
> How do I end or delete one GUI that is open and inactive at
> the back from the one that is active and in front.
>
> PS. These GUI's are not connected. i.e one did not trigger
> the other. There was a gui window say GUI_1. It opened GUI_2
> which was modal. GUI_2 had 2 options. 1st option led to
> GUI_1 by simply deleting itself. 2nd option opened up a new
> gui GUI_3. GUI_3 has to be able to delete GUI_1 at starting
> i.e. its openfunction.

Get a handle to GUI_1 using FINDOBJ or some other method. Call CLOSE or
DELETE on said handle, depending on whether you want its CloseRequestFcn to
run or not.

--
Steve Lord
sl...@mathworks.com


Neeraj

unread,
Jul 20, 2008, 5:45:03 AM7/20/08
to
> Get a handle to GUI_1 using FINDOBJ or some other method.

The problem is if i get this handle in GUI_1 i wont be able
to send it to GUI_3 and I dont really know how to take the
handle of 1 figure from another figure being active.

Bruno Luong

unread,
Jul 20, 2008, 7:17:01 AM7/20/08
to
"Neeraj " <nav...@gmail.com> wrote in message
<g5v1ev$icl$1...@fred.mathworks.com>...

You can of course pass any kind of data (so handle) among
GUIs. Here is a few ways (non exhaustive) to do it:

- GUI program can accept input parameter (Note: if you have
single handle, it might be good to put it in struct data for
example, otherwise it can be intefered with GUI engine).
- Use GUIDATA mechanism
- Use SEPAPPDATA and GETAPPDATA functions
- Use private field 'UserData' in graphic handle and SET and
GET functions
- Use GLOBAL variables,
- Use nested function,
etc

Pick a way.

Bruno

Neeraj

unread,
Jul 20, 2008, 2:17:01 PM7/20/08
to
> - Use SEPAPPDATA and GETAPPDATA functions
> - Use private field 'UserData' in graphic handle and SET and
> GET functions
> - Use GLOBAL variables,
> - Use nested function,
> etc
>
> Pick a way.

GETAPPDATA works cool..
thanks a ton...

0 new messages