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

Getting current datawindow object as dwObject

1,333 views
Skip to first unread message

Terry Hannon

unread,
Jan 9, 2004, 7:09:32 PM1/9/04
to
Hi DT,

Unfortunately, I am using the dwo argument quite a bit in my ItemChanged
event and also have a user event ue_PostItemChanged event that uses that
object as well.

Thanks for the responses.
Terry Hannon

"DT" <david....@integritycompanies.com> wrote in message
news:3fff43b6$1@forums-2-dub...
> You could write up "old school" pre version 5?
>
> dw_1.TriggerEvent("itemchanged")
>
> then in the itemchanged event code, do not use any of the passed
variables ->
> instead, use GetColumnName and GetText
>
>
> "Terry Hannon" <tha...@terryhannon.com> wrote in message
> news:3fff41cc$1@forums-2-dub...
> > Hi DT,
> >
> > The problem is I cannot hard code the column name, as I need it to be
> > generic, so all I can do is use the GetColumnName() function to find out
> > what column is current.
> >
> > Thanks
> > Terry Hannon
> >
> > "DT" <david....@integritycompanies.com> wrote in message
> > news:3fff3de0@forums-1-dub...
> > > DWObject ldwo
> > > ldwo = dw_1.Object.{column}
> > >
> > >
> > >
> > > "Terry Hannon" <tha...@terryhannon.com> wrote in message
> > > news:3fff3ee4$1@forums-2-dub...
> > > > Hi Everyone,
> > > >
> > > > I have noticed that there are certain events (ie. ItemChanged), that
> > have an
> > > > argument of dwo, but is there a way of getting/creating this
variable in
> > an
> > > > event that does not have it as an argument?
> > > >
> > > > What I need to do is force an ItemChanged event from a user event
called
> > > > ue_Keystroke, based on the pbm_dwnkey event, but in order for me to
> > force
> > > > the ItemChanged event I need to know the dwObject to pass in as an
> > argument,
> > > > but the pbm_dwnkey event does not have that as an argument so I need
to
> > > > create it somehow. Is this even possible.
> > > >
> > > > Thanks for the help
> > > > Terry Hannon
> > > >
> > > >
> > >
> > >
> >
> >
>
>


DT

unread,
Jan 9, 2004, 7:04:44 PM1/9/04
to

Terry Hannon

unread,
Jan 9, 2004, 6:56:34 PM1/9/04
to

DT

unread,
Jan 9, 2004, 7:31:06 PM1/9/04
to
Try this

DWObject ldwo
String ls_data
ls_data = dw_1.GetText()
ldwo.Name = dw_1.GetColumnName()
//You can set all the dwobject properties via describe function

dw_1.EVENT itemchanged(dw_1.Getrow(), ldwo,ls_data)


"Terry Hannon" <tha...@terryhannon.com> wrote in message

news:3fff44d6@forums-2-dub...

DT

unread,
Jan 9, 2004, 6:48:48 PM1/9/04
to

dave

unread,
Jan 9, 2004, 7:34:00 PM1/9/04
to
Couldn't you just do an AcceptText() to force the ItemChanged event?

Dave

Terry Hannon

unread,
Jan 9, 2004, 6:44:10 PM1/9/04
to

Philip Salgannik

unread,
Jan 9, 2004, 8:39:59 PM1/9/04
to
There is an undocumented way of doing this, but judging by your description,
you are trying to do something that shouldn't be done anyway, even without
undocumented techniques...


pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"Terry Hannon" <tha...@terryhannon.com> wrote in message
news:3fff3ee4$1@forums-2-dub...

Terry Hannon

unread,
Jan 12, 2004, 11:54:30 AM1/12/04
to
Hi Philip,

What is the undocumented way?

All I am trying to do is, when you press CTRL-D on a date field it
automatically enters the current date. I cannot use SetText, which does
work the way I need, because SetText does not work when you use different
date formats, for example, I use dd/mm/yyyy for all of our European offices
and mm/dd/yyyy for the US, and for some reason the data looks correct when
you do a SetText but when you tab off of the field it does not evaluate it
correctly, when you use the dd/mm/yyyy format. Therefore, I need to use the
SetItem command, but that does not cause an ItemChanged event even if you
use AcceptText after the SetItem.

I am getting very frustrated with this, so if you know of any way to help me
with this, I would really appreciate it.

Thanks
Terry Hannon

"Philip Salgannik" <philema...@comcast.net> wrote in message
news:3fff57ef@forums-1-dub...

dhun_Spa...@mmm.com

unread,
Jan 12, 2004, 12:16:42 PM1/12/04
to
<<I cannot use SetText, which does
work the way I need, because SetText does not work when you use different
date formats, for example, I use dd/mm/yyyy for all of our European
offices
and mm/dd/yyyy for the US, and for some reason the data looks correct when
you do a SetText but when you tab off of the field it does not evaluate it
correctly, when you use the dd/mm/yyyy format>>

This part sounds like a much larger concern than setting up a DWObject.

Does this perform differently when entering a date ni dd/mm/yyyy format
from the keyboard rather than SetTexting it from code? (i.e. if someone
from your European offices needed to enter a date other than today)

If it works differently between SetText and actually typing it in, then I
think you have a bug to document and send off to sybase.

If it works the same then it's likely your format or your windows date
setup if you left the formatting to shortdate or something.

仝海生

unread,
Jan 15, 2004, 3:48:27 AM1/15/04
to
Try this:

DWObject ldwo_Test

//You can get dwobject use undocument function __Get_Attribute
ldwo_Test = dw_1.Object.__Get_Attribute('Write column name here',FALSE)
//Then,ldwo_Test is dwobject which the column ref to
//And,now,you can write your codes below
....
....
....
//Finally,you should DESTROY this dwobject
Destroy ldwo_Test

Though,this is not a good idea ,but ,it is useful

--------------------------
Tong Haisheng.

"Terry Hannon" <tha...@terryhannon.com> 写入邮件
news:3fff3ee4$1@forums-2-dub...

Terry Hannon

unread,
Jan 15, 2004, 3:28:03 PM1/15/04
to
Thanks very much. I will try it out today.

Thanks
Terry Hannon

"仝海生" <hst...@263.net> wrote in message news:40065608$1@forums-2-dub...

0 new messages