Populate Spin Control in Edit In Place 
Author Message
 Populate Spin Control in Edit In Place

...help...

First things first: C5EE.

My problem is that I have succesfully created a spin box on a browse,
populated the spin box from a queue I filled in but when I click the
spin buttons the values cycle to the highest value and then "stick"
no matter what I do.

Details:

I have a file of purchases (called Purchases) an employee can make.
The types of puchases are subway fare denominations ($1, $5 , $10,
etc) stored in another file named Denominations.  The Purchases file
is linked to the Denominations file in a many-to-one relationship via
fields named respectively PUR:DenominationsID and
DEN:DenominationsID.

I have created a spin control on the appropriate column in a Browse
of the Purchases.  The spin control gets its data from a Queue that looks
like this and is inserted in \Local Data\Generated Declarations\Views &
Queues:

Queue:DollarTypes    QUEUE !Queue declaration for spin control in
?PurchaseList
DEN:DollarType               LIKE(DEN:DollarType)
PUR:DenominationsID    LIKE(PUR:DenominationsID)
                                      END

I populate the queue in \Local Objects\This Window\CODE\Init\Open the
window\
and it looks like this:

! Fill queue for DollarTypes spin control in ?PurchaseList
SET(Denominations)
LOOP
  NEXT(Denominations)
  IF ERRORCODE() THEN BREAK.
  Queue:DollarTypes.DEN:DollarType=DEN:DollarType
  Queue:DollarTypes.PUR:DenominationsID=DEN:DenominationsID
  ADD(Queue:DollarTypes)
  CLEAR(Queue:DollarTypes)
END

In \EditInPlace::PUR:DenominationsID\Init\CODE\Parent Call\ I have:

SELF.Feq{PROP:Text} = Listbox{PROPLIST:Picture,FieldNumber}
SELF.Feq{PROP:From} = Queue:DollarTypes.DEN:DollarType

And in \EditInPlace::PUR:DenominationsID\TakeEvent\CODE\Parent Call\ I have:

CASE EVENT() ! EVENT:Accepted
OF EVENT:Accepted
  PUR:DenominationsID = DEN:DenominationsID
ELSE
END

Please help; what am I doing wrong?

TIA
Don Stallone



Mon, 25 Mar 2002 03:00:00 GMT  
 Populate Spin Control in Edit In Place
Greetings Don,

At first, I thought your PROP:From might be the problem, but it
looks okay.  You have this at the end of your init section, right
after the ADD:

Quote:
>   CLEAR(Queue:DollarTypes)

I suspect it should be CLEAR(Queue:DollarTypes:Record) or whatever
the notation is in ABC.  It seems like this would be clearing the
entire QUEUE on each Denominations value in the init pass; then
it could have only one value, the last one in the file (which
apparently would be the highest).  So,
Quote:
> when I click the
> spin buttons the values cycle to the highest value and then "stick"
> no matter what I do.

the "cycle to the highest value" would be the init pass; after that
it's stuck on the one value left in your queue.

HTH
Mark Kroflich
mark(a)lists-inc.com

Quote:

> ...help...

> First things first: C5EE.

> My problem is that I have succesfully created a spin box on a browse,
> populated the spin box from a queue I filled in but when I click the
> spin buttons the values cycle to the highest value and then "stick"
> no matter what I do.

> Details:

> I have a file of purchases (called Purchases) an employee can make.
> The types of puchases are subway fare denominations ($1, $5 , $10,
> etc) stored in another file named Denominations.  The Purchases file
> is linked to the Denominations file in a many-to-one relationship via
> fields named respectively PUR:DenominationsID and
> DEN:DenominationsID.

> I have created a spin control on the appropriate column in a Browse
> of the Purchases.  The spin control gets its data from a Queue that looks
> like this and is inserted in \Local Data\Generated Declarations\Views &
> Queues:

> Queue:DollarTypes    QUEUE !Queue declaration for spin control in
> ?PurchaseList
> DEN:DollarType               LIKE(DEN:DollarType)
> PUR:DenominationsID    LIKE(PUR:DenominationsID)
>                                       END

> I populate the queue in \Local Objects\This Window\CODE\Init\Open the
> window\
> and it looks like this:

> ! Fill queue for DollarTypes spin control in ?PurchaseList
> SET(Denominations)
> LOOP
>   NEXT(Denominations)
>   IF ERRORCODE() THEN BREAK.
>   Queue:DollarTypes.DEN:DollarType=DEN:DollarType
>   Queue:DollarTypes.PUR:DenominationsID=DEN:DenominationsID
>   ADD(Queue:DollarTypes)
>   CLEAR(Queue:DollarTypes)
> END

> In \EditInPlace::PUR:DenominationsID\Init\CODE\Parent Call\ I have:

> SELF.Feq{PROP:Text} = Listbox{PROPLIST:Picture,FieldNumber}
> SELF.Feq{PROP:From} = Queue:DollarTypes.DEN:DollarType

> And in \EditInPlace::PUR:DenominationsID\TakeEvent\CODE\Parent Call\ I have:

> CASE EVENT() ! EVENT:Accepted
> OF EVENT:Accepted
>   PUR:DenominationsID = DEN:DenominationsID
> ELSE
> END

> Please help; what am I doing wrong?

> TIA
> Don Stallone



Mon, 25 Mar 2002 03:00:00 GMT  
 Populate Spin Control in Edit In Place
Don,
I had a similar problem, and solved it as follows:
After creating the sping control in edit in place, try setting the ranges of
the variables - i.e.

feq{Prop:RangeHigh}=100
feq{Prop:RangeLow}=5
feq{Prop:Step}=100    !dunno if this is the right syntax for step.

Best regards,
James Cooke
Certified Clarion Developer



Mon, 25 Mar 2002 03:00:00 GMT  
 Populate Spin Control in Edit In Place
Hello Mark -

Thanks for taking the time to reply.  It's nice to know how much
help there is out there.  Anywho I tried your suggestion:

Quote:
>>I suspect it should be CLEAR(Queue:DollarTypes:Record)

or whatever the notation is in ABC.<<

I couldn't find anything in the documentation that allowed an
individual to clear a single record in a queue - sometimes I'm
amazed at how blind I can be. I tried it anyway and got an er-
ror message for my troubles.

In any event, I commented out the CLEAR statement just to
see what would happen next.

Nothing...zero, zip, nada, bupkis.  The application presented
the same symptoms - as my nurse practitioner lady would say.
And so here I am with my teeth in my mouth wondering what
to do next.

If you have any other ideas, please fling 'em in my direction,
but thanks again for trying.

TIA
Don Stallone

Quote:

>Greetings Don,

>At first, I thought your PROP:From might be the problem, but it
>looks okay.  You have this at the end of your init section, right
>after the ADD:
>>   CLEAR(Queue:DollarTypes)
>I suspect it should be CLEAR(Queue:DollarTypes:Record) or whatever
>the notation is in ABC.  It seems like this would be clearing the
>entire QUEUE on each Denominations value in the init pass; then
>it could have only one value, the last one in the file (which
>apparently would be the highest).  So,
>> when I click the
>> spin buttons the values cycle to the highest value and then "stick"
>> no matter what I do.
>the "cycle to the highest value" would be the init pass; after that
>it's stuck on the one value left in your queue.

>HTH
>Mark Kroflich
>mark(a)lists-inc.com


>> ...help...

>> First things first: C5EE.

>> My problem is that I have succesfully created a spin box on a browse,
>> populated the spin box from a queue I filled in but when I click the
>> spin buttons the values cycle to the highest value and then "stick"
>> no matter what I do.

>> Details:

>> I have a file of purchases (called Purchases) an employee can make.
>> The types of puchases are subway fare denominations ($1, $5 , $10,
>> etc) stored in another file named Denominations.  The Purchases file
>> is linked to the Denominations file in a many-to-one relationship via
>> fields named respectively PUR:DenominationsID and
>> DEN:DenominationsID.

>> I have created a spin control on the appropriate column in a Browse
>> of the Purchases.  The spin control gets its data from a Queue that looks
>> like this and is inserted in \Local Data\Generated Declarations\Views &
>> Queues:

>> Queue:DollarTypes    QUEUE !Queue declaration for spin control in
>> ?PurchaseList
>> DEN:DollarType               LIKE(DEN:DollarType)
>> PUR:DenominationsID    LIKE(PUR:DenominationsID)
>>                                       END

>> I populate the queue in \Local Objects\This Window\CODE\Init\Open the
>> window\
>> and it looks like this:

>> ! Fill queue for DollarTypes spin control in ?PurchaseList
>> SET(Denominations)
>> LOOP
>>   NEXT(Denominations)
>>   IF ERRORCODE() THEN BREAK.
>>   Queue:DollarTypes.DEN:DollarType=DEN:DollarType
>>   Queue:DollarTypes.PUR:DenominationsID=DEN:DenominationsID
>>   ADD(Queue:DollarTypes)
>>   CLEAR(Queue:DollarTypes)
>> END

>> In \EditInPlace::PUR:DenominationsID\Init\CODE\Parent Call\ I have:

>> SELF.Feq{PROP:Text} = Listbox{PROPLIST:Picture,FieldNumber}
>> SELF.Feq{PROP:From} = Queue:DollarTypes.DEN:DollarType

>> And in \EditInPlace::PUR:DenominationsID\TakeEvent\CODE\Parent Call\ I
have:

>> CASE EVENT() ! EVENT:Accepted
>> OF EVENT:Accepted
>>   PUR:DenominationsID = DEN:DenominationsID
>> ELSE
>> END

>> Please help; what am I doing wrong?

>> TIA
>> Don Stallone



Tue, 26 Mar 2002 03:00:00 GMT  
 Populate Spin Control in Edit In Place
Hello James Cooke -

Are you any relation to the great explorer who sailed the south
Pacific?

Anyway, isn't your solution for a spin control showing a series
of continuous numbers as opposed to a discontinuos series
of values which may be alpha/numeric?  As my question implies
I'm trying to do the latter.

Thanks for taking the time to reply.  I wouldn't have a prayer if
it weren't for people like you and Mark taking time away from
your own problems.

Thanks,
Don

Quote:

>Don,
>I had a similar problem, and solved it as follows:
>After creating the sping control in edit in place, try setting the ranges
of
>the variables - i.e.

>feq{Prop:RangeHigh}=100
>feq{Prop:RangeLow}=5
>feq{Prop:Step}=100    !dunno if this is the right syntax for step.

>Best regards,
>James Cooke
>Certified Clarion Developer



Tue, 26 Mar 2002 03:00:00 GMT  
 Populate Spin Control in Edit In Place
Hi Don,

To remove a record from the queue, I believe you could use
DELETE(Queue:DollarTypes).  What I was suggesting, though, was
to clear your memory record; that's what I think you wanted.
I probably should have suggested this instead:
CLEAR(Queue:DollarTypes.DEN:DollarType)
CLEAR(Queue:DollarTypes.PUR:DenominationsID)
since that's how the queue is generated (as far as I can see).

If commenting out the CLEAR didn't change it, though, there's
probably no need to CLEAR it.  Its purpose is to make sure data
isn't "left over" from one entry to the next.

Can you manually type valid Denomination entries in the field?
(Probably not, but you might not have tried.)  I'm also wondering
if there's a way you can see what's in your queue at runtime,
other than this spin-box.  Can you populate a browse from the
queue and see what values are actually there?  If the browse is
empty or shows only the last record, the problem is somewhere
in your queue; if it has all the values, the spin-box or EIP is
probably at fault.  (If you see it spinning to the top value
every time you use it, it's the spin-box because the queue is
there.)

You'll have to forgive me since I'm not that familiar with queues.
I'm basically treating it as a keyless file structure that you
only use inside the program (no data file) and checking my ideas
against the help files.  I also haven't had any experience with
EIP, so I'm not even trying to debug THAT.  By the way, you're not
any more blind than I am, probably; you just don't know what it is
that you're seeing.

HTH
Mark Kroflich
mark(a)lists-inc.com

Quote:

> Hello Mark -

> Thanks for taking the time to reply.  It's nice to know how much
> help there is out there.  Anywho I tried your suggestion:

> >>I suspect it should be CLEAR(Queue:DollarTypes:Record)
> or whatever the notation is in ABC.<<

> I couldn't find anything in the documentation that allowed an
> individual to clear a single record in a queue - sometimes I'm
> amazed at how blind I can be. I tried it anyway and got an er-
> ror message for my troubles.

> In any event, I commented out the CLEAR statement just to
> see what would happen next.

> Nothing...zero, zip, nada, bupkis.  The application presented
> the same symptoms - as my nurse practitioner lady would say.

> If you have any other ideas, please fling 'em in my direction,
> but thanks again for trying.

> TIA
> Don Stallone


> >Greetings Don,

> >At first, I thought your PROP:From might be the problem, but it
> >looks okay.  You have this at the end of your init section, right
> >after the ADD:
> >>   CLEAR(Queue:DollarTypes)
> >I suspect it should be CLEAR(Queue:DollarTypes:Record) or whatever
> >the notation is in ABC.  It seems like this would be clearing the
> >entire QUEUE on each Denominations value in the init pass; then
> >it could have only one value, the last one in the file (which
> >apparently would be the highest).

> >HTH
> >Mark Kroflich
> >mark(a)lists-inc.com


> >> ...help...

> >> First things first: C5EE.

> >> My problem is that I have succesfully created a spin box on a browse,
> >> populated the spin box from a queue I filled in but when I click the
> >> spin buttons the values cycle to the highest value and then "stick"
> >> no matter what I do.

> >> Details:

> >> I have a file of purchases (called Purchases) an employee can make.
> >> The types of puchases are subway fare denominations ($1, $5 , $10,
> >> etc) stored in another file named Denominations.  The Purchases file
> >> is linked to the Denominations file in a many-to-one relationship via
> >> fields named respectively PUR:DenominationsID and
> >> DEN:DenominationsID.

> >> I have created a spin control on the appropriate column in a Browse
> >> of the Purchases.  The spin control gets its data from a Queue that looks
> >> like this and is inserted in \Local Data\Generated Declarations\Views &
> >> Queues:

> >> Queue:DollarTypes    QUEUE !Queue declaration for spin control in
> >> ?PurchaseList
> >> DEN:DollarType               LIKE(DEN:DollarType)
> >> PUR:DenominationsID    LIKE(PUR:DenominationsID)
> >>                                       END

> >> I populate the queue in \Local Objects\This Window\CODE\Init\Open the
> >> window\
> >> and it looks like this:

> >> ! Fill queue for DollarTypes spin control in ?PurchaseList
> >> SET(Denominations)
> >> LOOP
> >>   NEXT(Denominations)
> >>   IF ERRORCODE() THEN BREAK.
> >>   Queue:DollarTypes.DEN:DollarType=DEN:DollarType
> >>   Queue:DollarTypes.PUR:DenominationsID=DEN:DenominationsID
> >>   ADD(Queue:DollarTypes)
> >>   CLEAR(Queue:DollarTypes)
> >> END

> >> In \EditInPlace::PUR:DenominationsID\Init\CODE\Parent Call\ I have:

> >> SELF.Feq{PROP:Text} = Listbox{PROPLIST:Picture,FieldNumber}
> >> SELF.Feq{PROP:From} = Queue:DollarTypes.DEN:DollarType

> >> And in \EditInPlace::PUR:DenominationsID\TakeEvent\CODE\Parent Call\ I
> have:

> >> CASE EVENT() ! EVENT:Accepted
> >> OF EVENT:Accepted
> >>   PUR:DenominationsID = DEN:DenominationsID
> >> ELSE
> >> END

> >> Please help; what am I doing wrong?

> >> TIA
> >> Don Stallone



Sat, 30 Mar 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Spin Control - Edit In Place

2. place control in edit in place

3. Edit In Place - Spin Box

4. How to: Edit-in-place SPIN box and Up/Down arrow keys

5. Controlling Edit-In-Place

6. Edit in Place Controls

7. Edit drop list Edit in place - problem

8. Up-Down (SPin Controls and Win32 API

9. SPIN CONTROL !

10. Creating A Spin Control - A Stupid Question

11. Changing SPIN control

12. filter browse and spin control

 

 
Powered by phpBB® Forum Software