File handling ShowValue question

Problem: I load the example code for files, special folders and it runs fine. So I created a new desktop app with basically only one line in the app.activate event:

MsgBox ShowValue(SpecialFolder.ApplicationData)

Which I copied directly from your example source:
'Me.AddRow(“ApplicationData”, ShowValue(SpecialFolder.ApplicationData))

Compile throws an error:
App.Activate, line 1
This item does not exist
MsgBox ShowValue(SpecialFolder.ApplicationData)

When I added the line: MsgBox ShowValue(SpecialFolder.ApplicationData) to the example source it worked fine there.

I’m not a newbie as far as vb6 is concerned but I’m learning that although Xojo generally looks like VB it is definitely NOT vb6.

So what am I missing?

The ShowValue method possibly? It not built in to anything, so if you didn’t bring that over that’s what’s missing.

This is the perfect example of why copying and pasting code doesn’t help at all.

You should read into the documentation (use the old documentation if you can get ahold of it) to learn how to use Xojo. Once you know how to use the tool that’s when the Rapid App Development comes into play.

[quote]First, if you’re an absolute beginner to programming, there’s the textbook. It teaches you to program as well as use Xojo at the same time. Great two-in-one system.

There’s also a manual that comes with Xojo that teaches you the ins and outs of using the IDE, the language, and the features within. You can find that in the Documentation folder next to your installation of Xojo. There’s also an online language reference http://documentation.xojo.com

Lastly, when you’re ready to learn from examples, there’s a folder full of example projects next to your Xojo install called “Example Projects” It helps when you don’t intend to reinvent the wheel. Do not copy and paste code from example projects, that won’t help you at all.

Best of luck to you :)[/quote]

Yes

ShowValue() is a method defined in the sample project
Just as

AddTwoNumbers()
or
WriteToLog()
might be.

Its not ‘part of the language’
So in this regard, no difference from VB6
If you didnt copy over the function, it wouldnt work there either