Field calculations

J. Landman Gay jacque at hyperactivesw.com
Thu Sep 12 14:57:48 EDT 2013


I'm glad you found the scripting conferences useful. I think as you work 
with LiveCode you'll find that the dictionary does a pretty good job of 
pointing out most things you need to know, but sometimes you need to 
know what it is you need to know before the lightbulb goes on.

Using numberFormat as an example, the dictionary gives a clear sample 
command: set the numberFormat to "#.00". On first glance, it seems that 
is all you need. But farther down in the Comments section:

"Important! Changing the numberFormat does not automatically change the 
format of a number that's already in a container. It affects numbers 
only when they are calculated and then displayed or used as strings. 
Otherwise, the number retains its full numeric precision."

So, just issuing that command doesn't change the value of the variable 
until you either do a math operation on it, or convert it to a string, 
or both. You will see scripts like this that do that:

   set the numberFormat to "#.00"
   add 0 to myVar -- a math operation
   put myVar into fld "total" -- putting it in a field converts it to a 
string

So it's all in there, but sometimes it's a little opaque. And the above 
assumes you know that field display is always just text.

I do agree with you that the lessons RR provides aren't organized as 
well as they could be, and that the learning materials are scattered and 
hard to locate. If it helps, RR knows that too and have plans to improve 
that, but they need to finish the Kickstarter goals first. In the 
meantime, there's us.


On 9/12/13 12:13 PM, Vaughn Clement wrote:
> Hi Richard
>
> Actually if you take any Opp language or database development language the
> complexity is 10 times that of LiveCode. and the Help system is so good it
> covers just about any variation you might encounter. This is an example of
> what I mean; take formatting a numeric field this should be a very simple
> description. Yet the format command lacks any clear options and notation as
> to variations in the LC dictionary. Ms. Gay's link had a description and
> examples of script usage for math calculation that was neither in the
> dictionary or in the LiveCode University program I paid $50.00 for to help
> me learn LC. If LiveCode is to be a success and be a player in the IDE
> product market in the future, they need to consolidate the training is such
> a way as the new user's can locate answers in a timely manner. Also they
> should not be charging for what is by my review basic product information
> that should be available to the user community.
>
> Another issue, the debugger explanation of an error is not adequate for
> learning LC. It has a HINT why not a reference to help where the user can
> get a better description of the actual error correction options. This is
> basic to a product support for users to gain knowledge. "If your not a part
> of the solution, then you're a part of the problem." This is the the basis
> of instructional development where a complete analysis of the users
> requirements are used to define the needed instruction. The organization of
> the materials and testing of those materials will determine the student
> outcome. Right now I would give LiveCode a grade of "F" for failure to meet
> the minimum requirements of the student population.
>
> As trainers yourself you must recognize this in the fragmented approach
> being used to present instructional materials from LiveCode.
>
> Thank you
>
> Vaughn Clement
>
> Apps by Vaughn Clement (Support)
> *http://www.appsbyvaughnclement.com/tools/home-page/*
> Skype: vaughn.clement
> https://secure.join.me/appsbyvclement
> FaceTime: vclement at gmail.com
> LogMeIn also avaialble
> Call on "ooVoo" at address:  vaughnclement or 9282549062
> Ph. 928-254-9062
> Cloud Hosting Registration Web Site:
> https://my.oditech.com/cart.php?a=add&pid=41
>
>
> On Thu, Sep 12, 2013 at 9:12 AM, Richard Gaskin
> <ambassador at fourthworld.com>wrote:
>
>> Vaughn Clement wrote:
>>
>>> The dictionary gives little in the way of script help to debug the
>>> reason why it did not work. I am finding this true of many of the
>>> dictionary descriptions. Maybe a developer will write a new
>>> dictionary stack for new users that includes sample code like the
>>> example you have at your link.
>>
>> Long before they went open source, RunRev added community enhancement
>> capabilities in the Dictionary through its Comments feature, so anyone can
>> annotate it with useful additions.
>>
>> With a language this broad and used in so many different ways, this sort
>> of crowdsourcing is much more useful for all of us than assigning that task
>> to a single person who can't have the breadth of experience of the
>> community as a whole.
>>
>> Perhaps you'll add some debugging tips there?
>>
>> --
>>   Richard Gaskin
>>   Fourth World
>>   LiveCode training and consulting: http://www.fourthworld.com
>>   Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>>   Follow me on Twitter:  http://twitter.com/**FourthWorldSys<http://twitter.com/FourthWorldSys>
>>
>>
>>
>> ______________________________**_________________
>> 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<http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
> _______________________________________________
> 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
>


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list