Can anyone show some good good performance in Xojo 2014?

So, I just downloaded Xojo 2014 for OS X and up to this point I found it to be a fairly simple and efficient development environment.

However, I tried to make a function or subroutine for 45 minutes. Every time I try to follow the tutorials or Xojo documentation I get the following error:

enter image description here

I followed (although I might have missed something) here: http://docs.xojo.com/index.php/Function

Even if there is no full version in the documentation (bad development environment).

Also, the screenshot shows an example function that I copied and pasted on the Xojo forums and should work. I am not programming newb for everyone, but more Xojo newb. I've also had experiences with silly bugs in RealStudio in the past.

Can someone please point out what I cannot be missing?

+3


source to share


3 answers


You can not use the line Function

, Sub

, End Function

or End Sub

in the method editor. This will result in a syntax error because method declarations are automatically added to the IDE based on the values ​​entered in the names, parameters, and type fields of the method editor.



eg. enter image description hereenter image description here

+6


source


as said

Function, Sub, End Function or End Sub is done for you,



you can do "exit sub" if nothing needs to be returned, otherwise just return the correct value

as some events need true or false, so if you need to exit the function just return false

+1


source


You cannot add inline functions to your Xojo code. You add methods to your projects this way:

  • Insert-> Method
  • "+" on the editor toolbar, then "Method"
  • Insert a button on the main toolbar, then choose a method
  • Option-Command-M (on OS X)
0


source







All Articles