LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.
Moderators: LCMark, LCfraser
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Thu Mar 05, 2015 5:20 pm
Why does this code not compile? I'm not seeing an error message but the widget won't display.
Code: Select all
variable tParam as String
put the x of tTipOfMenuPoint parsed as string & "," & the y of tTipOfMenuPoint parsed as string into tParam
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
LCMark
- Livecode Staff Member

- Posts: 1232
- Joined: Thu Apr 11, 2013 11:27 am
Post
by LCMark » Thu Mar 05, 2015 5:22 pm
@trevordevore: I think you want 'formatted as string' here, rather than 'parsed as string' - you are formatting a number as a string to concatenate with other strings.
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Thu Mar 05, 2015 5:25 pm
Ah, I had seen the "parsed as number" example and assumed string would be the same. Works now.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
LCMark
- Livecode Staff Member

- Posts: 1232
- Joined: Thu Apr 11, 2013 11:27 am
Post
by LCMark » Thu Mar 05, 2015 5:26 pm
Ah - 'parsing' is the term we are using to turn a string into another type (from its string representation); formatting is for going the other way (from a type to its string representation).
-
trevordevore
- VIP Livecode Opensource Backer

- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
-
Contact:
Post
by trevordevore » Thu Mar 05, 2015 5:30 pm
That makes sense.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
LCMark
- Livecode Staff Member

- Posts: 1232
- Joined: Thu Apr 11, 2013 11:27 am
Post
by LCMark » Thu Mar 12, 2015 3:50 pm