imageMedia

Questions and answers for designing and implementing forms in Servoy

imageMedia

Postby peterbliskavka » Tue Jun 25, 2013 11:57 pm

I have a really quick question with something I'm seeing in 7.1.0.

When I select a Label/Button in the form editor, there are the options for imageMedia and rolloverImageMedia in the properties for that element. However, if I go to Solution Explorer to my solution > my form > my element, these options are not available and instead the options imageURL and rolloverImageURL are present. Is there a specific reason why these are not the same?
peterbliskavka
 
Posts: 30
Joined: Tue May 21, 2013 3:42 pm

Re: imageMedia

Postby ROCLASI » Wed Jun 26, 2013 11:01 am

Hi Peter,

In the properties pane you insert the imageMedia via a picker, what is stored is the UUID of this media. When you do it via code you need to use an URL notation (media://imageName.extension) for this. So these are 2 different ways to accomplish the same thing, hence the different names.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: imageMedia

Postby peterbliskavka » Wed Jun 26, 2013 4:15 pm

Hmm... okay, thanks for that information. I guess what I really wanted to ask was: why are they different? For instance if I set an image through the picker, there is no way for me to dynamically change that image then set it back to the original without doing controller.recreateUI(). Shouldn't elements.[elementName].imageURL at least return something other than null so that I could do this?
peterbliskavka
 
Posts: 30
Joined: Tue May 21, 2013 3:42 pm

Re: imageMedia

Postby ROCLASI » Wed Jun 26, 2013 7:45 pm

peterbliskavka wrote:Shouldn't elements.[elementName].imageURL at least return something other than null so that I could do this?

Yep, you would expect that but it doesn't. This will change in the upcoming 7.2 version (see https://support.servoy.com/browse/SVY-4414).
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: imageMedia

Postby peterbliskavka » Wed Jun 26, 2013 8:31 pm

Ah okay, fantastic. Thanks again Robert, you have been a great help.
peterbliskavka
 
Posts: 30
Joined: Tue May 21, 2013 3:42 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 7 guests