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: Date picker call back
Topic Summary: call back on selecting date
Created On: 4-May-2007 11:05
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.
 4-May-2007 11:05
User is offline View Users Profile Print this message


Uma Unnikrishnan

Posts: 32
Joined: 7-Aug-2006

Hi,

I tried using the set(select) option to attach a callback function to the date DBE. The intention was to give the user an error message if he were to select a past date from the date picker. However this function is not fired on selecting a date. I did notice that if I were to hit Enter, which is not really required, the function is called.
Any suggestions on how I can get it to call my function??

Rgds,
Uma
Report this to a Moderator Report this to a Moderator
 4-May-2007 13:39
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Use the following.
This fires the callback whenever the DBE gets the focus.

Be aware that this fires twice, once when the user selects the picker, and again when the user clicks on the date.

setGotFocus(dbeDatePicker, doCheckDate)

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


Uma Unnikrishnan

Posts: 32
Joined: 7-Aug-2006

Hi Tony,

 On using the setGotFocus option the call back is being fired too many times and it does not let me close the DB or do anything else at times.

You could test with this code:

void selectDate(DBE option)

{

ack " should show up when date is changed"

}

DB db = create("testing Date picker DBE")

DBE dbeDatePicker = date(db,30,today(),true)

DBE dField = field(db,"","",30,false)

setGotFocus(dbeDatePicker, selectDate)

setSize(db,300,200)

show db

 

Report this to a Moderator Report this to a Moderator
 4-May-2007 14:15
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The problem is the ack box.
Don't show any dialogs or popups from your callback.

If you need to warn the user, then do so after they click OK or Apply.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 4-May-2007 14:43
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I also notice that you can select a date without using the pulldown by clicking on the day, month or year and using the up/down curser keys.

These events do not fire the callback.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 7-May-2007 10:37
User is offline View Users Profile Print this message


Uma Unnikrishnan

Posts: 32
Joined: 7-Aug-2006

 Yes Tony, using the cursor keys also does not fire the callback. Only way it is fired is on hitting Enter .   I guess we would have to scrap the idea of calling a function on selecting a date.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.