Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
btray77
Visitor

CreateObject at Runtime

What is the best way to create objects at runtime?

Example I have a xml file I download which has text, screen location and color for each item to be typed out on to the canvas. Then I need to be able to use other information in the XML file to move the text or change it in some way, so I still need the handle for the item I'm creating.

Thanks

-Brad
Tags (1)
0 Kudos
3 REPLIES 3
TheEndless
Channel Surfer

Re: CreateObject at Runtime

It's not entirely clear what you're trying to accomplish, but I think Eval() might be what you're looking for: http://sdkdocs.roku.com/display/RokuSDK ... tAsInteger
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Tags (1)
0 Kudos
RokuJoel
Binge Watcher

Re: CreateObject at Runtime

Once you have your xml file downloaded and parsed you can pass the parsed xml object or variables derived from it to any function and extract whatever relevant data from it when it is needed.

Eval is used if you want to generate and execute a line of Brightscript code within your Brightscript code, similarly, you can download and execute a whole Brightscript function or program with the Run function within your Brightscript program.

- Joel
Tags (1)
0 Kudos
btray77
Visitor

Re: CreateObject at Runtime

I think I was able to figure out what I wanted to do looking at the dfNewBitmapSet code.

Thanks

-Brad
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!