Child Objects "Dead" - not responding
Tuesday, February 21, 2006 by J Stein | Discussion: DesktopX
This is driving me nuts ! I have a parent object which contains various buttons to manipulate an objects appearance -
Hue, Brightness, etc. Rather than setting mouse events for each button (with multiple scripts running), I'm taking advantage of the "Ex" feature "OnMouseEnterEX" to have one script running which handles the children in the parent script.
When I'm in DX builder, everthing works great ! When I create the widget, those buttons are "dead" not responding to their mouse events in the parent's code? I have tried everthing possible such as setting focus in code to ensure their availability, registering controller to reinforce trapping their events, etc. I've tried to solve this for days !
The funny thing is how it works fine in development mode but not on runtime !
I'm positive the parent - child relations are correct ( remember it works in the bulder).
As a stubborn coder, rarely do I "belly up" like this.
Please help
Joe
Reply #2 Friday, April 21, 2006 8:38 PM
Make your parent object's 'Activation' to Default or rectangular or something. I'm betting it's on NONE. Then make your widget. I bet the buttons work now. There was an issue I remember where on widgetisation for some reason my child objects took on the activation of the parent. which if the parent was none, make all the other children none as well. but i think its been fixed. Or I could be wrong, and something else is doing it. but give it a try.
Reply #3 Saturday, April 22, 2006 10:05 AM
I checked the activation as suggested on the parent object, and it was already on Default. Since I "solved" the problem with my workaround, I've continued with my scripting and code optimization, etc.
Just for the hell of it, I went back to the original way by hiding the object within the parent script again.
It works !?!?!? Very strange indeed. You wouldn't belive how many times I tried to no avail before.I have also discovered that the order of placing commands in the script seems to be a factor. (I'm not referring to variables or values before they exist, to which you would obviously get an error).
Don't know which method to use or trust. Very curious.
Thanx again - Joe

Reply #4 Monday, April 24, 2006 8:25 AM
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 Sunday, April 16, 2006 2:41 PM
As a past and long time VB coder, it seems that DesktopX does not truly expose itself to VBScripting. This is a fact that I'm slowly learning & making adjustments accordingly when in the DesktopX environment. Try scripting API & you'll see what I mean ! Not a complaint actually, but just a learning experience to break some of my known VB scripting practises.
It seems (although I don't know why or fully understand), that if you render a parent object invisible from a child object in the same script, it has the same effect of actually closing that object and it's script even though the script is reported as running.
With much experimentation, I simply put the "button" (to hide) script (Object.visible = false)in another script object and called it from there. Works without fail 1000%. Why? - doesn't make sense, just fact.
Just thought you guys might be interested or made aware of. I'm trying to share my wealth of VB code snippets that I have written over the years for you DesktopX guys, but am finding that the coversion process to this environment is not as simple as I originally thought.
Thoughts - Ideas ?
Regards - Joe