Sync TCursor to UIobject 
Author Message
 Sync TCursor to UIobject

Quote:


>>I cannnot find a way to pass a record number to the TCursor and sync
>>it to the form's detail table. I must be missing something pretty
>>obvious.
>Just attach the tcursor to the tableframe and do what you need to do.
>The tcursor will be pointing to whichever record has focus in the
>tableframe so you can immediately start working on that record.
>tc.attach(tableframename)
>tc.edit()
>;etc.
>tc.close()
>etc. plus the gotcha

Thanks for pointing out what should be the obvious.
I tried it. It works. It beats the{*filter*}ens out of the nested locate()
. locateNext() I've been hammering the problem with (unsuccessfully).
After years of programming linear PAL I often cannot see the
appropriate OPAL solution.
I'm much obliged!


Thu, 04 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

Quote:

>I have placed a detail table on a form. Five of the table's seven
>fields are on the form. I want to do some background processing on the
>current record in the two fields that are not on the form.
>I cannnot find a way to pass a record number to the TCursor and sync
>it to the form's detail table. I must be missing something pretty
>obvious.
>I'd appreciate a pointer to a method or a dribble of explanatory
>sample code.
>Thanks for the guidance!

Just attach the tcursor to the tableframe and do what you need to do.
The tcursor will be pointing to whichever record has focus in the
tableframe so you can immediately start working on that record.

tc.attach(tableframename)
tc.edit()
;etc.
tc.close()

The only gotcha is that you'll have to make sure the record is not
locked by the form before you attempt to put the tcursor in edit mode.
This is just a matter of issuing a formvar.endedit() before attaching
the tcursor. Also, it might save you some grief if you do an
action(datapostrecord) before ending edit mode to prevent the record
from flying away on you.

Hope this helps
Bob Barrows



Thu, 04 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

Quote:


>>I have placed a detail table on a form. Five of the table's seven
>>fields are on the form. I want to do some background processing on the
>>current record in the two fields that are not on the form.
>>I cannnot find a way to pass a record number to the TCursor and sync
>>it to the form's detail table.
>Just attach the tcursor to the tableframe and do what you need to do.
>The tcursor will be pointing to whichever record has focus in the
>tableframe so you can immediately start working on that record.

>tc.attach(tableframename)
>tc.edit()
>;etc.
>tc.close()

>The only gotcha is that you'll have to make sure the record is not
>locked by the form before you attempt to put the tcursor in edit mode.
>This is just a matter of issuing a formvar.endedit() before attaching
>the tcursor. Also, it might save you some grief if you do an
>action(datapostrecord) before ending edit mode to prevent the record
>from flying away on you.

Alternatively, you could use dmPut(<table filename>, <field name>,
value). This also automatically points to the active record.

Stephen Brown
London



Thu, 04 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

I have placed a detail table on a form. Five of the table's seven
fields are on the form. I want to do some background processing on the
current record in the two fields that are not on the form.
I cannnot find a way to pass a record number to the TCursor and sync
it to the form's detail table. I must be missing something pretty
obvious.
I'd appreciate a pointer to a method or a dribble of explanatory
sample code.

Thanks for the guidance!



Thu, 04 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

Quote:

>I have placed a detail table on a form. Five of the table's seven
>fields are on the form. I want to do some background processing on the
>current record in the two fields that are not on the form.

But they are in the data model!!  So maybe you can use DMGET() and
DMPUT()  This methods provide access to all fields in the data model
And you dont need a tcursor!  

<<<<<<<<<<<<<<>>>>>>>>>>>
Nanne Koers Automatisering
Amsterdam



Fri, 05 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

It isn't neccesary (and common) to pass the recordnummer for locating a
record in the detailtabel.
Just attach the tCursor to the an UIObject that is attached to the record
you want to process.
I don't know exact what you want to do but it could be that you need to
unlock the record before processing some background actions.
--
Daan Stam
StamData
The Netherlands
Paradox Applications & Training

fax: +3123272331


Quote:
> I have placed a detail table on a form. Five of the table's seven
> fields are on the form. I want to do some background processing on the
> current record in the two fields that are not on the form.
> I cannnot find a way to pass a record number to the TCursor and sync
> it to the form's detail table. I must be missing something pretty
> obvious.
> I'd appreciate a pointer to a method or a dribble of explanatory
> sample code.

> Thanks for the guidance!



Sat, 06 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

Quote:


> >I have placed a detail table on a form. Five of the table's seven
> >fields are on the form. I want to do some background processing on the
> >current record in the two fields that are not on the form.

> Just attach the tcursor to the tableframe and do what you need to do.
> The tcursor will be pointing to whichever record has focus in the
> tableframe so you can immediately start working on that record.

I have solved this issue by placing the other field(s) on the form and making
it/them invisible.  While this circumvents the locked record and flyaway issues,
I'm not sure if it incurs performance or reliability problems, since I'm new to
ObjectPAL... does anybody else know which is preferable: invisible fields or TCursors?

Brian Feifarek



Sat, 06 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

Quote:



>> >I have placed a detail table on a form. Five of the table's seven
>> >fields are on the form. I want to do some background processing on the
>> >current record in the two fields that are not on the form.

>> Just attach the tcursor to the tableframe and do what you need to do.
>> The tcursor will be pointing to whichever record has focus in the
>> tableframe so you can immediately start working on that record.
>I have solved this issue by placing the other field(s) on the form and making
>it/them invisible.  While this circumvents the locked record and flyaway issues,
>I'm not sure if it incurs performance or reliability problems, since I'm new to
>ObjectPAL... does anybody else know which is preferable: invisible fields or TCursors?
>Brian Feifarek

I personally use the dmPut and dmGet methods to solve exactly that
problem.  Invisible fields is the way that had/has to be done in Pdox
DOS, as you mentioned there is a record locking problem if you use a
tCursor.  Using the data Model is clean, elegant, and easy.  These
methods are available in PdoxWin 5 and 7.
Send me an e-mail if you need more info.

 Straehley Associates - Computer Consulting and Programming

 http://www.strassoc.com



Mon, 08 Feb 1999 03:00:00 GMT
 Sync TCursor to UIobject

Use Tcursors. From your remark I'm guessing that you haven't worked yet
with TCursors.
TCursors are on of the most powerfull tools of OPAL.

--
Daan Stam
StamData
The Netherlands
Paradox Applications & Training

fax: +3123272331



Quote:


> > >I have placed a detail table on a form. Five of the table's seven
> > >fields are on the form. I want to do some background processing on the
> > >current record in the two fields that are not on the form.

> > Just attach the tcursor to the tableframe and do what you need to do.
> > The tcursor will be pointing to whichever record has focus in the
> > tableframe so you can immediately start working on that record.

> I have solved this issue by placing the other field(s) on the form and
making
> it/them invisible.  While this circumvents the locked record and flyaway
issues,
> I'm not sure if it incurs performance or reliability problems, since I'm
new to
> ObjectPAL... does anybody else know which is preferable: invisible fields
or TCursors?

> Brian Feifarek



Wed, 10 Feb 1999 03:00:00 GMT
 
 [ 9 post ] 

 Relevant Pages 

1. record locking on Tcursors attached to UIObjects

2. Beginner Paradox Question Re : TableFrames/UIObjects/TCursors

3. Help! TCursor and UIObject

4. Help! TCursor and UIObject

5. TCursors and UIObjects

6. PdxWin7/16: Syncing two TCursors

7. TCursor.Locate() and TCursor.qLocate() both fail

8. Manual Sync, how to use the xxxx.tmp file created by the sync task

9. Question: Reuse of code and it's attachment to UIObjects

10. array of UIObjects?

11. "First"-Property of UIObjects / Setting Focus

12. UIObject.class


 
Powered by phpBB® Forum Software