text toggle

Questions, tips and tricks and techniques for scripting in Servoy

text toggle

Postby Ron » Fri Jun 06, 2003 1:00 pm

Hope this time I need a break (or brake perhaps).
I want to toggle the following text, like in CRM companies is done with
the sortlabel, but it doesn't work.
Replacing the if-statement by ELSE: same problem.
Something to do with globals?

if (elements.tekst_wijziging.text=="ron")
{
elements.tekst_wijziging.text="nop"
}
if (elements.tekst_wijziging.text=="nop")
{
elements.tekst_wijzing.text="ron"
}
Ron
 
Posts: 315
Joined: Fri May 23, 2003 12:30 am
Location: Netherlands

solved!

Postby Ron » Fri Jun 06, 2003 1:43 pm

I am so used to the exit-script command in FMP....
After checking the first if statement the mehods just proceeds.
No idea what went wrong with the else script.
This one does the job just fine.
(sorry guys).

if (elements.tekst_wijziging.text=="ron")
{
elements.tekst_wijziging.text="nop";
}
else
{
elements.tekst_wijziging.text="ron"
}
Ron
 
Posts: 315
Joined: Fri May 23, 2003 12:30 am
Location: Netherlands

Postby edward » Fri Jun 06, 2003 1:47 pm

Ron
Sorry, but i'm not clear what you're trying to achieve.. Which CRM form?

Will try and help....
Edward Callaghan
Servoy
edward
 
Posts: 142
Joined: Wed Apr 23, 2003 9:35 pm
Location: London, UK

Postby Ron » Fri Jun 06, 2003 1:56 pm

I was just a bit sooner!
The idea was to toggle a text with a button, just checking if this works.
First click: text becomes RON second click: text becomes NOP etc.
This is also done with the Sort example in the CRM, but there is
also a sort-command involved.
BTW is there a command to EXIT a method like in FMP?
Sorry Edward.

Ron
Ron
 
Posts: 315
Joined: Fri May 23, 2003 12:30 am
Location: Netherlands

Postby edward » Fri Jun 06, 2003 2:19 pm

So... are you sorted?

re: Exit record... well with debugger turned on, you can use the break option..simple huh - A fully functional USEFUL debugger!

But also within a looping method you can either continue to the next iteration of the loop or Break to exit the loop. Return exits the method but does not break it...

HTH
Edward Callaghan
Servoy
edward
 
Posts: 142
Joined: Wed Apr 23, 2003 9:35 pm
Location: London, UK


Return to Methods

Who is online

Users browsing this forum: No registered users and 15 guests