Strange compile error
Ralph DiMola
rdimola at evergreeninfo.net
Thu Apr 25 15:15:32 EDT 2013
Pete,
As you said.... Shouldn't this be
something that's checked at run time rather than compile time?
I ran into this similar situation.
put "W" & Index into pName -- Just the control name
create field pName in group "pubs" -- Create the control in group. The pName
var can't contain "field blah" and then do a (create pName in group "pubs")
put "field W" & Index into pName -- Now you can set various properties
without using the "field" keyword
set the fixedlineheight of pName to false
set the backgroundcolor of pName to "white"
set the borderwidth of pName to 1
set the showborder of pName to false
The compiler will flag the following as an error:
create pName in group "pubs"
compilation error at line 240 (create: no alias or directory name supplied)
near "pName", char 7
Maybe the dreaded "Do" is a way around this?
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Peter Haworth
Sent: Thursday, April 25, 2013 3:00 PM
To: How to use LiveCode
Subject: Re: Strange compile error
On Thu, Apr 25, 2013 at 11:46 AM, J. Landman Gay
<jacque at hyperactivesw.com>wrote:
> The menu item will be something like "my item". There won't be an ID for
> "my item". There just may be an ID for control "my item". ;)
>
> getPropertyValues the long ID of control pitemname of group "TestControls"
>
Hi Jacque,
Adding "control" worked but I'm still puzzled as to the issue for a couple
of reasons.
pitemname is guaranteed to contain the abbreviated name of a control in the
referenced group since that's how I populate the menu. Shouldn't this be
something that's checked at run time rather than compile time?
Also, I could swear I've seen runtime errors with constructs that like
"control tVar" where tVar contains an abbreviated or long id/name, u.e. one
that starts with a control tyype.
Anyway, thanks for the solution
Pete
lcSQL Software <http://www.lcsql.com>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list