Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Need Help in this ECL Script
Need Help in this ECL Script [message #1707678] Tue, 08 September 2015 13:31 Go to next message
Jeevan Rex is currently offline Jeevan RexFriend
Messages: 80
Registered: March 2015
Location: Bangalore
Member
Hi,

I have this situvation to test if this menu contains Login or Logout. If it is login, i need to do something and go to test or else, i need to do something else and go to the test. I need help with this if else statement in ECL.
index.php/fa/23179/0/
proc "has-item" [val tree -input] [val titem] {
	try {
		$tree | get-item $titem
		bool true // return true
	} -catch {
		bool false // return false
	}
}
if [get-view "Model" | get-tree | select "test-d" |  has-item "Login"]{
log "test-d is not Logged in"
} -else {
log "test-d is Logged in already"
}

But it did not work. Can some one help me with this ECL Script?
How to put has-item procedure inside menu?

I also tried getting a menu like this
if [get-view "Model" | get-tree | select "test-d" |  get-menu has-item "Login"] {


Thank you
Jeevan
  • Attachment: if.png
    (Size: 12.43KB, Downloaded 207 times)

[Updated on: Tue, 08 September 2015 13:36]

Report message to a moderator

Re: Need Help in this ECL Script [message #1707693 is a reply to message #1707678] Tue, 08 September 2015 14:02 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Jeevan,

Please try this way:

proc "has-menu" [val tree -input] [val titem] {
try {
$tree | get-menu $titem
bool true // return true
} -catch {
bool false // return false
}
}
if [get-view "Model" | get-tree | get-item "test-d" | has-menu "Login"]{
log "test-d is not Logged in"
} -else {
log "test-d is Logged in already"
}

Kind regards,
Ulyana.
Re: Need Help in this ECL Script [message #1707702 is a reply to message #1707693] Tue, 08 September 2015 14:53 Go to previous message
Jeevan Rex is currently offline Jeevan RexFriend
Messages: 80
Registered: March 2015
Location: Bangalore
Member
Thanks Ulyana, I will check and let you know.

[Updated on: Tue, 08 September 2015 15:00]

Report message to a moderator

Previous Topic:Obtaining dependencies not included in the main update site
Next Topic:[SOLVED] #set up RCPTT TEST RUNNER
Goto Forum:
  


Current Time: Fri Apr 26 19:39:08 GMT 2024

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

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

Back to the top