LB Booster
« LOCATE command without width/height »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:18am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: LOCATE command without width/height  (Read 281 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx LOCATE command without width/height
« Thread started on: Mar 14th, 2017, 5:16pm »

The LB 4.50 Help file describes the graphics LOCATE command as follows:

Code:
print #handle, "locate x y width height" 

There is no mention that any of the parameters can be omitted, but I've recently encountered this command in a Liberty BASIC program:

Code:
    #DG.GB, "locate -1 -1" 

What does this do? Whatever it is, it doesn't (currently) work in LBB!

Richard.
User IP Logged

Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: LOCATE command without width/height
« Reply #1 on: Mar 15th, 2017, 6:12pm »

I think it is just crap code. It used to be necessary to locate off screen to draw hidden graphics and then show the graphics. That was prior to show and hide. Also getbmp used to behave differently for an off screen graphicbox but not now, and not for a long time.

Liberty fails to notice the missing parameters however it ignores the locate/refresh pair unless they are properly formatted

I would throw an error if the parameters are missing.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LOCATE command without width/height
« Reply #2 on: Mar 18th, 2017, 10:41am »

on Mar 15th, 2017, 6:12pm, Rod wrote:
I would throw an error if the parameters are missing.

That (or simply ignoring the command) would be a simple solution, but I'm thinking that a useful language extension might be to interpret the missing parameters as meaning 'change the position but don't change the size'. It would then be possible to use LOCATE to move a control without needing to know how big it is.

Does that sound sensible?

Richard.
User IP Logged

RobM
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 91
xx Re: LOCATE command without width/height
« Reply #3 on: Mar 18th, 2017, 4:27pm »

on Mar 18th, 2017, 10:41am, Richard Russell wrote:
Does that sound sensible?

Yes. Most of the time when I use the locate command I do not need to resize the control, just move it where needed.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls