I wrote a mobile app. I am now converting it to desktop. I basically just
created a new desktop project and copied all of my files into it from the
previous mobile project. Pretty much everything is working as I expected
except for one thing, none of my button skins will respond to a MouseOver
I have set up a test with one of the buttons, and on "MouseOver", it does
trace out that it was affected, so the MouseOver event is working. But NONE
of my button skins that have an over state are showing it. It is as if the
entire app thinks that it is on a mobile device still where there is no
I have looked over the application descriptor and seen nothing out of the
ordinary. I am using a couple of mobile components in the app, so I don't
know if that can *force* an app into thinking it is a mobile device. But I
have wasted two days trying to figure this out.
Does anyone have a clue why my desktop app skins will not respond to a
mouseover event? Anything in this conversion that I need to change?
I am beginning to think this is a deeper issue than I initially thought.
Since my apps was originally written for mobile, it has a few mobile
components and skins for those components. I simply left them in my desktop
versions so that I would have as few changes to make as possible because
these are very large apps, and there are three of them. I am beginning to
think that if you add ANY mobile components, or perhaps a mobile skin, then
the app defaults to a "mobile mentality" for lack of a better word and
behave like a mobile application. Here is an small example.
This is a simple little desktop app that adds a button and a TextInput in
it, but I have added the skinClass ScrollingStageTextInputSkin in the CSS
for the textInput, which was designed for mobile. To get it to work, you
need to add these two swc's:
If you run this app after adding the code and swc's, the application works,
but the button will no longer display an over state, just an up state, and
down state. If you simply delete the s|TextInput CSS, then the button
behaves exactly as you would expect with all three states demonstrated.
Unless you have any other ideas, my early thoughts are that I am going to
have to go through each of my apps and meticulously replace all the
mobilegrids and other mobile components with their desktop counterparts to
get this issue resolved.
Any Thoughts??? I would really love to avoid this if there is any other
Have you given thought to just adding type descriptors to your CSS that changes the skins to spark throughout your app? Seems you could do this for the grid, text inputs, and buttons in a few minutes per app. Or if you have custom skins, just derive them from the spark skins instead of mobile skins? All you really need is for the skin to declare an "over" state, and then set "over.color" and other attributes for the "over" state.
Well, I can tell you that I have definitely narrowed down the problem to
skins. I can add mobile components to my app without it affecting the
behavior of my app, but if I add even a single mobile skin, the entire app
quits responding to the over state. I will have to look into it because I
am not a wiz at skins, but I am not sure how hard it will be to make a skin
for a mobile component that does not extend MobileSkin, or if it is even
possible. Do you know?
Does a mobile component require a MobileSkin, or just any skin that defines
the appropriate states of the component?
Thanks, I will give this a try and see how it goes. To be fair to the
framework, though, I don't believe that it defaulted to mobile skins
necessarily, but every component that I add to an app, I specifically give
it a skin that I want. Since the MobileGrid by default has a mobile skin, I
simply edited it and added it to my application to give it the right colors
and display for my brand. So I specifically put a mobile skin on my mobile
components. The thing that I don't understand is why if I use one mobile
skin, ALL of the app skins lose their over state representation in a desktop
app? That is a question I would like to know the answer to.