[Anthill-pro] Stamp scripting
Steve Boone
sbb at urbancode.com
Mon Jul 30 09:54:30 CDT 2007
Uldis,
I forgot to mention, Stamps are different because they do not automatically
import the helper methods. You will need to add
import com.urbancode.anthill3.runtime.scripting.helpers.*;
at the start of your script.
Regards,
Steve
On 7/30/07, Uldis Karlovs-Karlovskis <uldisk at ctco.lv> wrote:
>
> Hello again!
> I`m trying to script my own stamp strategy but without success. Everything
> what I`m trying to script in Stamp Templates fails with kind of error "...
> Attempt to resolve method: mostRecentSuccess() on undefined variable or
> class name: BuildLifeLookup : at Line: 1 : in file: inline evaluation of:
> ..."
> Even scripts from examples are failing. The script can`t get any objects
> from system. What`s the problem?
>
> This is one example of my scripts:
>
> String current = StampLookup.getLatestStampValue();
> int startIndex = 0;
> int endIndex = 0;
>
> String result = "0.0.1.1"; //default value
>
> if(current.length()>="0.0.0.0".length())
> {
> startIndex = current.indexOf(".", startIndex) + 1;
> startIndex = current.indexOf(".", startIndex) + 1;
> endIndex = current.indexOf(".", startIndex);
>
> long lastDigits = Long.parseLong(current.substring(startIndex,
> endIndex));
> lastDigits ++;
> result = current.substring(0,startIndex) + String.valueOf(lastDigits)
> +
> current.substring(endIndex,current.length());
> }
> return result;
>
>
>
> And where can I find those AntHill packages to import as said in
> https://www.anthillpro.com/anthill3-help-3.2/html/default.html. I can`t
> find
> any of them!
>
> Uldis
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20070730/41a01ead/attachment.htm
More information about the Anthill-pro
mailing list