Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] Works with variables(#variables #dynamic #global variables #static variable)
icon7.gif  [SOLVED] Works with variables [message #1710379] Tue, 06 October 2015 06:48 Go to next message
Eclipse UserFriend
Dear all,
How to handle global variable ?
How to assign static variable ?
At the moment I'm creating a lot of procedures to pass them but the code start to be a little heavy. Rolling Eyes

Please let me know.
Angelo Luciani

[Updated on: Mon, 12 October 2015 08:56] by Moderator

Re: Works with variables [message #1710380 is a reply to message #1710379] Tue, 06 October 2015 07:01 Go to previous message
Eclipse UserFriend
Hi Angelo,

1) Declare and assign static variable with val and use it inside let block.

let [val -name varName -value varValue]{

$varValue | str | log

}


2) Declare and assign global variable with global:


// declaring an empty list:

global [val myList [list]]



// filling the list with all New/... menu items:

repeat [val index] -times [get-elements-count] -command {

let [val oldlist [$myList]] [val itemName [get-item-property [$index] "getText()"]] {

// check if the item is not separator or Other...

if [and [$itemName | not-eq ""][$itemName | not-eq "&Other.*"]] {

global [val myList [appendToList [$oldlist] [$itemName]]] -override

}

}

}

Kind regards,
Ulyana.

[Updated on: Tue, 06 October 2015 07:02] by Moderator

Previous Topic:Reading file and clipboard content.
Next Topic:RCPTT Eclipse Mars Plugin NullPointerException
Goto Forum:
  


Current Time: Tue Jun 17 17:32:49 EDT 2025

Powered by FUDForum. Page generated in 0.03810 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top