Object_OnMouseEnterEx sub doesn't work...
... neither do other subs
Thursday, May 12, 2005 by Fix | Discussion: DesktopX
I've created several objects. One of them contains a script that should control all the other objects. The name of the other objects is "Update_1", "Update_2", "Update_3", etc.
The following script just doesn't do anything, and I can't understand why :
'OnMouseEnter subs
Sub Object_OnMouseEnterEx(Obj)
If InStr(Obj.Name,"Update") <> 0 Then
ObjNum = Right(Obj.Name,1)
If DesktopX.Object("Update_" & ObjNum) = "away" Then
DesktopX.Object("Update_" & ObjNum).State = "over"
SetUpdateFrequencyText(ObjNum)
End If
End If
End Sub
If you want to help me and download these little objects, please click here : http://www.contedefaits.com/Web_Objects.desktop and you'll see that nothing happens when you mouse over / mouse away / click on any of the little black bars on the desktop (they should normally set the update frequency of the object).
Thank you very much in advance, and have a good day everyone !
Reply #2 Thursday, May 12, 2005 11:24 AM
But the workaround isn't all that bad or hard:
Sub Object_OnStateChangeEx(state)
If state = "Mouse over" Then
'Mouse over code here
End If
End Sub
Reply #3 Thursday, May 12, 2005 11:50 AM
Reply #4 Thursday, May 12, 2005 12:48 PM
So what am I doing wrong ?
Thanx very much.
Reply #5 Thursday, May 12, 2005 1:23 PM
Reply #6 Thursday, May 12, 2005 1:30 PM
In your widget you got an object named "scripts" to handle the scripting. However, none of your other objects passess any messages on to the "scripts" object because none of them is set as child to it. Select your other object, right-click, go "Set Parent" then select "scripts". Then everything starts to come to life.

Reply #7 Thursday, May 12, 2005 4:34 PM

Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Thursday, May 12, 2005 4:56 AM
If DesktopX.Object("Update_" & ObjNum).State = "away" Then
etc...
By the way, shouldn't DesktopX.Object("Obj.Name).State = "away" work too ? Or simply Obj.State ?
I've tried all I can think of, but nothing works... Please help me !
Thanx.