Normal Topic not complaining  just trying to understand (Read 1032 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
not complaining  just trying to understand
Dec 28th, 2003 at 6:44pm
Print Post Print Post  
I am not complaining I am just trying to understand why things are the way they are so I can better understand Sesame.

I am confused at the method I am using @commands. I can use @color for example by just adding @color(zip, 14,0) in the program editor of a command button. When I press the command button it executes the command and the color changes. But I can not use the same simple logic to call @selectTreeItem

I can successfully create command buttons that use @selectTreeItem the way your example shows on page 160 of the Advanced Functions & Commands manual. I create the variable for @selectTreeItem to return its integer 1 or 0  for success or not. I do not understand why I have to have an if statement for this to work even when I want this action to take place every time. Why cant I just create the variable  and call @selectTreeItem?

For example one of the ones I use that works is:

var vtable as int

if lastname <>  "mcsd" // something that should never be


{

     Vtable=@selectTreeitem ("Search Update Menu!Other Commands!Table View (Shift-F6)")
}

Why does this not work?

var vtable as int

{

     Vtable=@selectTreeitem ("Search Update Menu!Other Commands!Table View (Shift-F6)")
}

Again I am not complaining I am just trying to get a handle on Sesame

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: not complaining  just trying to understand
Reply #1 - Dec 28th, 2003 at 7:36pm
Print Post Print Post  
First, you're allowed to complain.  Wink

Second, the example you show won't compile because of the stray curly braces. Without the curly braces, it works just fine.

var vtable as int

vtable=@SelectTreeitem ("Search Update Menu!Other Commands!Table View (Shift-F6)")

The difference with @Color arises because of the need to retain Q&A syntax in programming. @Color does not actually return a value, even though it has an @ sign. @SelectTreeItem does return a value, so you have to assign that value to a variable or element. We would have liked to make the programming syntax more consistent, but retaining Q&A compatibility took precedence, in this case.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged