Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: getting string from DialogBox??
Topic Summary:
Created On: 26-Sep-2006 11:02
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 26-Sep-2006 11:02
User is offline View Users Profile Print this message


Mussie Woldemicael

Posts: 95
Joined: 12-Sep-2006

Hello,
is there doGet method that is not void??
I want to return b!!

Buffer b = create
DB exBox = create "DBE example"
DBE stringIn = field(exBox, "ID??", "Example", 20)
void doGet(DB exBox) {
b = getBuffer(stringIn)
print b "\n"
return b;
} // doGet
apply(exBox, "Get", doGet)
show exBox

best regards,
Mussie

Report this to a Moderator Report this to a Moderator
 26-Sep-2006 11:55
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

No, callbacks must be void.

You can call another function from within the callback and send the parameter, or use global variables.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 26-Sep-2006 13:59
User is offline View Users Profile Print this message


Mussie Woldemicael

Posts: 95
Joined: 12-Sep-2006

can you tell me why this one

string b;
void hey(){
b = "hi";
}
hey()
print b

works and that one

string a
Buffer b = create
DB exBox = create "DBE example"
DBE stringIn = field(exBox, "ID??", "Example", 20)
void doGet(DB exBox) {
b = getBuffer(stringIn)
print b "\n"
a = "hi"
} // doGet
apply(exBox, "Get", doGet)
show exBox
print a

doesn't?

In the second case can't print a!?

Or is there a pre-defined method for
getting a string out of a Textbox, Dialogbox etc.
into my code?

Report this to a Moderator Report this to a Moderator
 26-Sep-2006 15:34
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

The second one doesn't work because the show statement is end of processing.

i.e., the print a is never processed
Report this to a Moderator Report this to a Moderator
 28-Sep-2006 20:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Yes, nothing executes after the show command. Specifically it does NOT pick up there when the Dialog is closed (via hide(db)). If you need it to pick up there then you should use 'block' instead of 'show', but block is clumsy in that the rest of the interface is suppressed. If you are simply asking the user to input a string before you continue, block is the way to go.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.