Page 1 of 1

imageMedia

PostPosted: Tue Jun 25, 2013 11:57 pm
by peterbliskavka
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?

Re: imageMedia

PostPosted: Wed Jun 26, 2013 11:01 am
by ROCLASI
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.

Re: imageMedia

PostPosted: Wed Jun 26, 2013 4:15 pm
by peterbliskavka
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?

Re: imageMedia

PostPosted: Wed Jun 26, 2013 7:45 pm
by ROCLASI
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).

Re: imageMedia

PostPosted: Wed Jun 26, 2013 8:31 pm
by peterbliskavka
Ah okay, fantastic. Thanks again Robert, you have been a great help.