Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Newbie question (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Is there are a IRDA Library available for RB 3.5 ?
Next thread: [OFF] Windows Tcp/ip watcher


Re: why is carbon drawing sooo slow??   -   Charles Yeomans
  Newbie question   -   Kenny Anderson
   Re: Newbie question   -   Dennis Birch
    Re: Newbie question   -   Kenny Anderson
    Re: Newbie question   -   Hasan Edain
     Re: Newbie question   -   Hasan Edain
     Re: Newbie question   -   Kenny Anderson
   Re: Newbie question   -   Joseph J. Strout

Newbie question
Date: 29.08.01 21:07 (Wed, 29 Aug 2001 21:07:30 +0100)
From: Kenny Anderson
Hi,

I've had a bit of previous programming experience (Amiga E, anyone?),
but I'm a complete beginner to RB, and I've having a bit of trouble.
Hopefully someone can help!

I've got a program that goes through a list of items, presenting each
one to the user for a choice to be made. The main code goes through a
FOR/NEXT loop of each item; for each item, I open up the option window,
put the text in I require ... and that's where it goes wrong. I want the
program to sit back and wait for the user to decide; however, the
program goes marching on regardless.

I really want to the program to sit and wait for the user to click a
button (and therefore execute the action code associated with that
button). I can't split the NEXT of the loop onto that action, nor can I
manually construct a loop. How can I get the program to wait for the
button to be clicked and the code to be actioned (basically just setting
a variable to be returned from the method)?

Any help gratefully received!

Cheers,

Ken

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Newbie question
Date: 29.08.01 21:13 (Wed, 29 Aug 2001 13:13:36 -0700)
From: Dennis Birch
At 9:07 PM +0100 8/29/01, Kenny Anderson wrote:
>I've got a program that goes through a list of items, presenting
>each one to the user for a choice to be made. The main code goes
>through a FOR/NEXT loop of each item; for each item, I open up the
>option window, put the text in I require ... and that's where it
>goes wrong. I want the program to sit back and wait for the user to
>decide; however, the program goes marching on regardless.
>
>I really want to the program to sit and wait for the user to click a
>button (and therefore execute the action code associated with that
>button).

Use your window's ShowModal method to show the window each time
through the loop. It does exactly what you're looking for.

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Newbie question
Date: 29.08.01 21:20 (Wed, 29 Aug 2001 21:20:54 +0100)
From: Kenny Anderson

On Wednesday, August 29, 2001, at 09:13 PM, Dennis Birch wrote:
> Use your window's ShowModal method to show the window each time through
> the loop. It does exactly what you're looking for.
>
<attached file: sound_of_ken_hitting_forehead_with_palm.wav>

Durr ... thanks for the speedy response!
:)

- -
Ken

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Newbie question
Date: 30.08.01 15:10 (Thu, 30 Aug 2001 07:10:06 -0700)
From: Hasan Edain

>I've got a program that goes through a list of items, presenting each
>one to the user for a choice to be made.

I know that it isn't your question, but I know that a list of modal dialogs
would anoy the heck out of me. Can you describe the problem you are trying
to solve a little more completely? Maybe there is a way to refactor your
design to get all of the questions in a single window.

For instance a list box with a check box / popup list / edit field next to
each item?

Maybe a form?

Often I find that if I'm having dificulty implementing an idea it is
because I havn't planned sufficiently.

Hasan

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Newbie question
Date: 04.09.01 04:59 (Mon, 3 Sep 2001 20:59:15 -0700)
From: Hasan Edain
>> I know that it isn't your question, but I know that a list of modal
>> dialogs
>> would anoy the heck out of me. Can you describe the problem you are
>> trying
>> to solve a little more completely? Maybe there is a way to refactor your
>> design to get all of the questions in a single window.
>
>I've thought about it, and I'm convinced the best way is to go modal. I
>know what you mean, but this isn't a usual list like "Would you like to
>do this?" then "what should this be set to"? The program takes in
>separate lists and then invites the user to compare them specifically
>without considering any of the rest. I can't really describe it that
>well; you'll see when the program is finished :)
>
>Thanks for the response!
No problem, but I think that the explanation you have given so far is all
the more reason to consider your interface.

I recently wrote a program to compare two apache configuration files (the
closest analogy I could get to your description). I could present each line
in sequence, and ask for an opinion. Instead I allow (via a hash,
collection in real basic) for a mapping of disparate lines, and present a
list box, asking if each mapping is ok. Then the user can consider the
entire results in context, rather than experiencing 1970's one choice at a
time UI.

I don't mean to harh, but I get passionate about UI design.

Good coding!

Hasan

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Newbie question
Date: 30.08.01 18:28 (Thu, 30 Aug 2001 18:28:26 +0100)
From: Kenny Anderson
> I know that it isn't your question, but I know that a list of modal
> dialogs
> would anoy the heck out of me. Can you describe the problem you are
> trying
> to solve a little more completely? Maybe there is a way to refactor your
> design to get all of the questions in a single window.

I've thought about it, and I'm convinced the best way is to go modal. I
know what you mean, but this isn't a usual list like "Would you like to
do this?" then "what should this be set to"? The program takes in
separate lists and then invites the user to compare them specifically
without considering any of the rest. I can't really describe it that
well; you'll see when the program is finished :)

Thanks for the response!

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Newbie question
Date: 29.08.01 21:16 (Wed, 29 Aug 2001 13:16:13 -0700)
From: Joseph J. Strout
At 9:07 PM +0100 8/29/01, Kenny Anderson wrote:

>for each item, I open up the option window, put the text in I
>require ... and that's where it goes wrong. I want the program to
>sit back and wait for the user to decide; however, the program goes
>marching on regardless.

You need the to show the window with someWindow.ShowModal. ShowModal
opens the window, and blocks execution of your code until the window
is closed. (Remember to provide some way to close that dialog, like
putting "self.Close" in the Action event of the OK and Cancel
buttons.)

Cheers,
- Joe