Brand new to this - quick question on embedding text file.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
waxhawmacguy
Posts: 1
Joined: Tue Jul 28, 2009 3:37 am

Brand new to this - quick question on embedding text file.

Post by waxhawmacguy » Tue Jul 28, 2009 3:50 am

Hi Everyone,

I'm brand new to revMedia and am working with the new alpha version on a small in-house app.

I want to embed a text file with placeholders in it into the app itself that I can take text field values from a Stack window and use the merge function to replace the placeholders with the text field values and then save the text file to a folder on my hard drive.

My question is, is it possible to embed a text file within a revMedia app? I know in Realbasic it's very easy to add a file to an app and I'm hoping it can be done just as easily in revMedia as well.

I've done a search for this and not had any luck so I'm posting the question. Any help or direction anyone can give me would be greatly appreciated. I'm really liking what I've seen so far with RevMedia.

Thanks,
Charlie
Charlie Lockhart

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Tue Jul 28, 2009 10:30 am

I'm not sure what you mean by embeding. to load a file into a container, you can use the put url commadn and file/binfile:

Code: Select all

on mouseUp
  answer file "a file"
  if it = "" or the result = "cancel" then
    exit mouseUp
  end if
  put it into filePath
  put url ("file:" & filePath) into aVar
  put url ("file:" & filePath) into field "a field"
end mouseUp
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Re: Brand new to this - quick question on embedding text fil

Post by shadowslash » Tue Jul 28, 2009 1:53 pm

waxhawmacguy wrote:Hi Everyone,

I'm brand new to revMedia and am working with the new alpha version on a small in-house app.

I want to embed a text file with placeholders in it into the app itself that I can take text field values from a Stack window and use the merge function to replace the placeholders with the text field values and then save the text file to a folder on my hard drive.

My question is, is it possible to embed a text file within a revMedia app? I know in Realbasic it's very easy to add a file to an app and I'm hoping it can be done just as easily in revMedia as well.

I've done a search for this and not had any luck so I'm posting the question. Any help or direction anyone can give me would be greatly appreciated. I'm really liking what I've seen so far with RevMedia.

Thanks,
Charlie
If you need to add a text content into your revolution stack, simply drag it from the Tools palette into your revolution stack. You can choose from a variety of field controls (field controls are those that handle text in Revolution).
Parañaque, Philippines
Image
Image

Post Reply