How to use "move object [from startLoc] to pointlist&qu

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

How to use "move object [from startLoc] to pointlist&qu

Post by alex298 » Tue Apr 15, 2008 11:18 am

Hi,

I think this must be a very simple question. However I cannot figure it out. I read the move documents:
move object [from startLoc] to pointlist

The pointList is a return-separated list of destination points. The object is moved to each point in turn during the move.
I have a set of point list, e.g. (200, 200), (250, 300), (380, 420). How can I use the list of destination points in the move syntax?

P.S. I draw a graphic (e.g. rectangle, polygon). When I use "answer the points of grc 1", it return empty. Therefore the "move grc 3 to the points of grc 1" is not working. Why? The Line graphic is always working, but not the Rectangle and Polygon.

Thanks and best regards
Alex
Nice to meet all of you.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Tue Apr 15, 2008 11:54 am

only the line and the irregular polygon type of graphics have points, all others don't.

A list of points is this:

Code: Select all

12,123
193,54
34,60
so always two numbers, seperated by comma, and each on it's own line.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to use "move object [from startLoc] to pointlis

Post by Klaus » Tue Apr 15, 2008 1:12 pm

alex298 wrote:...
I have a set of point list, e.g. (200, 200), (250, 300), (380, 420). How can I use the list of destination points in the move syntax?
...s
Hi Alex,

the docs are a bit misleading here.

It should read:
...
move XYZ from startloc to endloc
...
OR
...
move XYZ to (pointlist)
...

Where "pointlist" INCLUDES the starting point and has to be a CR separated list of coordinates as Björnke said.

So you can:
...
move btn XYZ to your_pointlist
## or ... to fld "your pointlist"
...


Best

Klaus

alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

Post by alex298 » Tue Apr 15, 2008 3:23 pm

Hi all,

Thannnnnnnnnnnnnks :) It works!

I have one more question about Grid.

Sometimes this is quite difficult to use free hand to draw some shapes on the card. I noticed that the Grid feature is checked by default under the View Menu. When I turn off and turn on the Grid, nothing happens on the card. No grid lines appear on the card. I am using Windows XP. Is the Grid feature not working in Windows platform?

Thanks and best regards
Alex
Nice to meet all of you.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Tue Apr 15, 2008 5:29 pm

Hi Alex,

you DID look up GRID in the docs, didn't you?! ;-)

Grid is only working for objects and not for drawing unfortunately.
But since the default value = 2 pixel one does not even notice it.

Set the value in the prefs to 10 or more and then drag an object slowly over your your card to "feel" the effect :-)


Best

Klaus

Post Reply